tracker: warren-tracker/v1 requires open/closed/other; the bridge rejects anything else - #1180
Open
PatrickKalkman wants to merge 1 commit into
Open
Conversation
…dge rejects anything else The protocol text told a server to send its raw status string and promised the bridge would normalize it, but normalizeIssueStatus only knows the literal words open and closed and folds the rest to other. A remote tracker's Done or Closed therefore never read as closed: plan-run creation never saw a plan as finished, the coordinator never skipped a finished child on resume, and auto-plan-run detection never fired. tracker-jira sent the raw Jira status name and was broken this way; the conformance suite accepted any non-empty string and never noticed. Only the server knows which of its states are terminal, so the fold is the server's job. The protocol now requires every issue status to be one of the three words, RemoteTracker rejects any other string as a malformed payload, the conformance suite checks the vocabulary and that a closed issue reads closed, and tracker-jira folds statusCategory.key (new → open, indeterminate → other, done → closed). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rf5tbgdUDmHzKnNXpiJLvg
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
4 tasks
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
src/tracker/remote/protocol.tsanddocs/design/issue-tracker.mdtell a server to send its raw status string and promise the bridge normalizes it. The bridge (normalizeIssueStatus,src/core/wire-tracker.ts) only recognizes the literal stringsopenandclosedand folds everything else toother. A remote tracker'sDoneorClosedtherefore never reads as closed:src/plan-runs/create.tsnever sees a plan as finished,src/plan-runs/coordinator.ts:241never skips a finished child on resume, andsrc/runs/reap/auto-plan-run.ts:145never fires.extensions/tracker-jirasends the raw Jira status name, so it is broken this way today; the conformance suite accepts any non-empty string, so it never noticed.Done,ResolvedorRemovedis terminal, so the protocol now requires every issuestatusto be one ofopen | closed | other.RemoteTrackerrejects any other string as a malformed payload (TrackerError: remote tracker returned unknown issue status "Done" for issue X …) instead of silently folding it — a non-conformant server fails loud on its first read rather than never finishing.POST /issues/{id}/close, the issue must readclosedon both views (issues/close-reads-closed). A new self-test proves the suite fails a server that reports raw statuses.tracker-jiramapsstatusCategory.key—new→open,indeterminate→other,done→closed, no category →other— the same field it already used to decide whether an issue is terminal.Changes
src/core/wire-tracker.ts—normalizeIssueStatusdoc: for in-core trackers only, and why the bridge must not use it.src/tracker/remote/protocol.ts— status fields typedIssueStatus; header text corrected.src/tracker/remote/remote-tracker.ts—requireIssueStatusreplaces the fold; three call sites (issue read, status map, scheduled issues).src/tracker/remote/remote-tracker.test.ts— rejection tests forgetIssueandlistIssueStatuses; fixtures moved onto the vocabulary.src/tracker/conformance-parity.test.ts— header wording.extensions/tracker-conformance/—ISSUE_STATUSES/isIssueStatusin the published protocol copy; vocabulary checks on the status map, the issue read, and scheduled issues; theissues/close-reads-closedcase; FakeTracker fixture typed; README; self-test for a raw-status server.extensions/tracker-jira/—issueStatus()injira/map.ts, used by the issue read and the search-page status map;JIRA_NEW_CATEGORY; protocol copy; README fold table; tests.docs/design/issue-tracker.md§1 andCHANGELOG.md[Unreleased].Not in this PR: an optional
rawStatuspass-through for display. Easy to add if you want the tracker's own spelling visible in the UI; left out to keep this to the correctness fix.Test plan
bun run check:all— 12/12 with test: pin platform in git-preflight probes that assumed a Linux host #1179's one-line test fix applied locally; without it, on this macOS host,check:coveragefails only on the threeprobeSandboxGittests test: pin platform in git-preflight probes that assumed a Linux host #1179 fixes (Linux CI is unaffected)bun test src/tracker src/core— 144 passextensions/tracker-conformance:typecheck+bun test— 16 pass, including the new raw-status failure caseextensions/tracker-jira:typecheck+bun test— 67 passCompatibility
This is a protocol tightening. A third-party warren-tracker/v1 server that sends raw statuses was already non-functional (nothing it reported could ever be closed); after this change it fails on the first read with a message naming the fix. Both shipped servers (
tracker-jira, and the ADO tracker for #1173) send the vocabulary.Relates to #1173.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Rf5tbgdUDmHzKnNXpiJLvg