This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Repository navigation
test: run git_fetch_ref recovery projection contract in CI (#401) - #522
Merged
james3014-nexus-agent[bot] merged 2 commits intoOct 16, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ref-projection-ci
Author
Review record — head
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #401 (source/CI half; the live ChatGPT caller dogfood stays open on the Issue)
Summary
The #401 invariant is that
git_fetch_refmust be callable on every surface that can emitGIT_BASE_REF_NOT_LOCAL. The source fix already shipped (git_fetch_refis in bothDIRECT_CODING_TOOL_NAMESandDIRECT_DISPATCH_TOOL_NAMES). Its contract test, however, lives insrc/server.test.ts, which is excluded fromnpm test(DS-1-F6, needs the codex CLI), so CI never checked it.This PR adds
src/tool-projection-recovery.test.tsto thenpm testchain. The test:ToolMode. The mode table is typed asRecord<ToolMode, true>, so adding a mode fails compilation until the table is updated;git_fetch_refis listed wheneveropen_workspaceis listed, and whenever the instructions mentionGIT_BASE_REF_NOT_LOCAL;GIT_BASE_REF_NOT_LOCALerror text insrc/git-worktrees.tsstill namesgit_fetch_ref.No production code changes.
Evidence
npx tsx src/tool-projection-recovery.test.ts: 5/5 pass."git_fetch_ref"fromDIRECT_DISPATCH_TOOL_NAMESmakes exactly thedispatchcase fail (4 pass, 1 fail). The mutation was reverted.node scripts/check-test-chain.mjs: 131 chained, 7 excluded, 138 total.🤖 Generated with Claude Code