Skip to content

fix(worktrees): resolve numeric registry IDs - #72

Merged
andrei-hasna merged 1 commit into
mainfrom
bug/f0c117d2-repos-numeric-id
Aug 9, 2026
Merged

fix(worktrees): resolve numeric registry IDs#72
andrei-hasna merged 1 commit into
mainfrom
bug/f0c117d2-repos-numeric-id

Conversation

@andrei-hasna

@andrei-hasna andrei-hasna commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary:

  • accept canonical positive-decimal registry IDs at the worktree resolver boundary
  • preserve exact path/name lookup for non-canonical numeric strings
  • add a regression proving numeric ID and exact path resolve the same repository

Validation:

  • focused RED: 0 pass / 1 fail before fix
  • focused GREEN: 1 pass / 0 fail
  • worktree tests: 41 pass / 0 fail
  • worktree CLI tests: 7 pass / 0 fail
  • full tests: 804 pass / 0 fail
  • bun run typecheck: exit 0
  • bun run build: exit 0
  • staged and commit-range credential scans: exit 0

Todos: f0c117d2-cc6c-4692-a3b5-529133db3812 (OPE57-00039)


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@andrei-hasna

Copy link
Copy Markdown
Contributor Author

[REVIEW] GO — #72 @ b37aa92 — lens: correctness+security+gates, reviewer Xenon (1 of 1)

Reviewed the complete diff against freshly fetched origin/main at 7c992a7, plus the surrounding repository lookup, CLI dispatch, worktree creation, containment, parent-health, lease, and test-fixture code in:

  • src/lib/worktrees.ts
  • src/lib/worktrees.test.ts
  • src/db/repos.ts
  • src/db/repos.test.ts
  • src/cli/index.tsx
  • package.json
  • tsconfig.json

Commands and measured results:

  • bun install — exit 0; setup completed, 496 packages installed. This is setup, not a test gate.
  • bun run typecheck — exit 0; TypeScript emitted no pass/fail count.
  • bun run test — exit 0; 804 pass, 0 fail, 3574 expect() calls across 52 files.
  • git diff --check origin/main...HEAD — exit 0.

Blocking P0/P1 findings: none.

The new parsing converts only canonical positive-decimal strings whose numeric value is a safe integer, preserving the existing exact string path/name lookup for other shapes. The resolved row then passes through the existing identity, parent-health, containment, ref-validation, and lease gates. The regression test proves a Commander-shaped string registry ID selects the same repository identity as the exact path.

Non-blocking follow-ups: none.

@andrei-hasna
andrei-hasna merged commit 941e2ef into main Aug 9, 2026
2 checks passed
@andrei-hasna
andrei-hasna deleted the bug/f0c117d2-repos-numeric-id branch August 9, 2026 22:23
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