Repository navigation
JWB-945: Tracker port v2 — registry and vendor-neutral adapter contract - #95
Merged
Merged
Conversation
…ontract - src/app/tracker/registry.ts is the only file that imports a tracker adapter; lint (no-restricted-imports) rejects any other import from src/adapters/trackers/. - Port methods are camelCase; listWork, complete and linkArtifact are optional; removeMirror, pendingWrite and verifyPendingWrite are on the port. - Sign-in declares an auth kind: none, external_cli or token. - Adapters declare a mirror tier, structured or assignee_only; ADR 0002 is amended so the Git ref is the only exact authority for assignee-only. - One ticket type with optional kind (default task); the capability registry, Run.capabilities, ClaimLock.describe and Jira Rank/order are gone. - The fake tracker moves into src/conformance as the adapter kit and passes the tier-aware conformance suite in both tiers; domain-model.md gains a "Write an adapter" section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Interlock lane interlock-lane:49bb04be-ac4f-4a2a-9c33-123d5aebe3a4
Jira JWB-945. Tracker port v2: core reaches trackers only through a registry and a vendor-neutral port.
What changed
src/app/tracker/registry.tsis the only file that imports a tracker adapter. Pickup, release, supervisor, the lane tracker,login/logoutanddoctorall go through it.src/domain/tracker/port.ts): methods are camelCase.listWork,completeandlinkArtifactare optional.removeMirroris now part of the port, along with the journaled-write hooks.none,external_cliortoken.structured(claim and run are read back throughclaimMarker) orassignee_only. ADR 0002 is amended so the Git ref is the only exact authority for assignee-only trackers.domain/tracker/ticket.ts, andkindis optional (defaulttask). Removed: the capability registry (CAPABILITIES,requireCapabilities,Run.capabilities,ClaimLock.describe), Jira Rank discovery andTicket.order.src/conformance/fake-tracker.ts. The conformance suite now adjusts its checks to the mirror tier and gained aremove_mirrorscenario.docs/domain-model.mdhas a new "Write an adapter" section.Surface changes to know about
doctor --jsonreports tracker sign-in astrackers: { jira: {...} }. Before, it was a top-leveljirakey. The text output is unchanged.pendingTrackerWrite. Rows written under the oldpendingJiraWritekey are still read; there is a test for it.readis now a single issue GET. It no longer searches the parent map to compute order.listWorkstill sendsORDER BY Rank ASC, and the supervisor launches in that order.configkeys (jira_site,tracker.jira.site) are unchanged.Acceptance evidence (head c6fc069)
grep -rln "adapters/trackers/jira|JiraTrackerAdapter|jiraSignIn" src→ onlysrc/adapters/trackers/jira/{sign-in,tracker}.tsandsrc/app/tracker/registry.ts. Lint enforces it: with a probe filesrc/app/lane/probe-vendor.tsimporting../../adapters/trackers/jira/sign-in.ts,vp checkfails witheslint(no-restricted-imports) … help: Only src/app/tracker/registry.ts names a tracker adapter.listWork/complete/linkArtifact; auth kindsrc/domain/tracker/port.ts.grep -rn "link_artifact|list_work|\.transition(" src→ noneStructuredTracker/AssigneeOnlyTrackerare in the port, Jira declaresstructured, and the ADR amendment is indocs/adr/0002-…grep -rn "CAPABILITIES|requireCapabilities|rankField|\.order\b" src→ nonetest/conformance/runner.test.ts: the fake passes in both tiers (18 cases); Jira passes the same suite intest/adapters/trackers/jira/tracker.test.tsCommands run at this head:
Real path, read-only against live Jira (responsibid). Scratch copy of the ledger with
XDG_STATE_HOME; baseline is a detached worktree at 858f3e1 (main):Not verified live: Jira mirror writes (apply, restore,
complete,linkArtifact). Mutating real tracker state was not authorized, so the injected-transportFakeJiratests and the conformance suite cover these paths.🤖 Generated with Claude Code