Skip to content

Use repo-stable trajectory project IDs#30

Merged
willwashburn merged 2 commits into
mainfrom
codex/repo-stable-project-id
May 27, 2026
Merged

Use repo-stable trajectory project IDs#30
willwashburn merged 2 commits into
mainfrom
codex/repo-stable-project-id

Conversation

@willwashburn
Copy link
Copy Markdown
Member

Summary

  • add a project ID resolver that derives repo-stable IDs from package repository metadata or git remotes
  • stop defaulting core trajectory metadata to process.cwd(), omitting projectId when no stable ID exists
  • apply the resolver to CLI and SDK trajectory creation, with tests for URL normalization, monorepo directories, env/flag overrides, and local-path remotes

Tests

  • npm exec -- biome check src/core/project-id.ts src/core/trajectory.ts src/core/index.ts src/core/types.ts src/core/types.d.ts src/cli/commands/start.ts src/sdk/client.ts tests/core/project-id.test.ts tests/core/trajectory.test.ts tests/cli/commands.test.ts
  • npm run typecheck
  • npm run test:run
  • npm run build

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

Warning

Review limit reached

@willwashburn, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 3 minutes and 50 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4c7db478-4fc2-4b30-9102-d95026bb7afb

📥 Commits

Reviewing files that changed from the base of the PR and between a901db4 and 88c2a3b.

📒 Files selected for processing (11)
  • package.json
  • src/cli/commands/start.ts
  • src/core/index.ts
  • src/core/project-id.ts
  • src/core/trajectory.ts
  • src/core/types.d.ts
  • src/core/types.ts
  • src/sdk/client.ts
  • tests/cli/commands.test.ts
  • tests/core/project-id.test.ts
  • tests/core/trajectory.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/repo-stable-project-id

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a robust project ID resolution mechanism in src/core/project-id.ts that determines project IDs from explicit options, environment variables, package.json metadata (repository URLs or package names), or git remotes. This logic is integrated into the CLI start command and SDK client, replacing the previous fallback to process.cwd(). The review comments identify several valid improvement opportunities and bug fixes, including optimizing redundant disk I/O by passing pre-parsed package.json objects, continuing directory traversal when encountering malformed JSON files, ensuring cross-platform path handling for Windows backslashes, and refining object type guards to exclude arrays.

Comment thread src/core/project-id.ts
Comment thread src/core/project-id.ts Outdated
Comment thread src/core/project-id.ts
Comment thread src/core/project-id.ts
Comment thread src/core/project-id.ts
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85b1e2e79e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/core/project-id.ts
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

Copy link
Copy Markdown
Member Author

@willwashburn willwashburn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed review feedback in 88c2a3b and resolved the fixed threads. CI is green.

Comment thread src/core/project-id.ts
@willwashburn willwashburn merged commit e6cea50 into main May 27, 2026
8 checks passed
@willwashburn willwashburn deleted the codex/repo-stable-project-id branch May 27, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant