Skip to content

JWB-946: GitHub Issues tracker adapter on gh auth - #96

Merged
JarenKempton merged 3 commits into
mainfrom
task/JWB-946
Nov 13, 2026
Merged

JarenKempton merged 3 commits into
mainfrom
task/JWB-946

Conversation

@JarenKempton

@JarenKempton JarenKempton commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Adds src/adapters/trackers/github/, an assignee-only tracker over gh api that uses gh auth. Interlock stores no GitHub secret.
    • It reads the issue, its dependencies/blocked_by and dependencies/blocking edges, and its sub-issue parent, which becomes the map. listWork reads every sub-issue of a map in full.
    • The mirror is the assignee plus an interlock label; the Git ref stays the authority. complete closes the issue as completed, and linkArtifact comments the PR link once and verifies it by readback.
    • Keys are GH-<n>. A ref is github:<owner>.<repo>:GH:ticket:GH-<n>, so cross-repo blockers resolve.
  • Registry: one githubIssues entry. The registry interface also gains setting: "jira_site" | "github_repo", signIn(services) so tests can inject a gh transport, and optional siteOf(instance).
  • Config: a github_repo user setting (config edit --set github_repo OWNER/NAME).
  • Fixes the two latent bugs the JWB-945 lane found:
    1. doctor showed a none tracker as not signed in. It now renders "needs no sign-in" and checks only the configured tracker, so Jira users without gh aren't failed.
    2. The lane tracker required a saved site even for external_cli sign-in. It now derives the site from the ref (siteOf).
  • executionTarget (release) now reads the configured tracker's site instead of jira_site only.

Outside the adapter folder (AC4 asked for registry + config schema only): registry.ts, configuration/schema.ts, configuration/inputs.ts (the --set enum), signed-in.ts and doctor.ts (the requested bug fixes), pickup/runtime.ts (executionTarget, 2 lines), README, and docs/domain-model.md.

Acceptance evidence

AC1–3: reads, mirror, complete/link, conformance at the assignee-only tier

$ bun test test/adapters/trackers/github test/app/tracker/signed-in.test.ts test/sign-in
 35 pass
 0 fail

test/adapters/trackers/github/tracker.test.ts: "GitHub Issues passes the conformance suite at the assignee-only tier" runs all 6 trackerConformance cases, none failing.

Checks at head 2c38ee4

$ vp check
pass: All 201 files are correctly formatted
pass: Found no warnings, lint errors, or type errors in 182 files
$ vp run typecheck      # exit 0
$ vp run test
 709 pass
 0 fail

AC5: one real GitHub issue from pickup to closed

Run in the private sandbox repo JarenKempton/interlock-e2e-sandbox, with interlock = bun src/main.ts at this branch and XDG_STATE_HOME pointed at a scratch folder (scratch state DB, not ~/.local/state/interlock).

$ interlock config edit --set github_repo JarenKempton/interlock-e2e-sandbox
$ interlock doctor
✓ GitHub Issues signed in as JarenKempton (external cli)
✓ Claim lock dry-run push to origin from /tmp/agent-jwb946-m9xZ/sandbox
✓ Database /tmp/agent-jwb946-m9xZ/xdg/interlock-dev/interlock.db
✓ Config /tmp/agent-jwb946-m9xZ/sandbox/interlock.toml (not found)

$ interlock pickup GH-1 --json
  "ticket": "github:jarenkempton.interlock-e2e-sandbox:GH:ticket:GH-1",
  "branch": "task/GH-1",
  "state": "claimed",
  "run": "interlock-run:2dffc5b7-dfe2-4e28-a64f-89c2f68b7ed4",
  "claim": "interlock-claim:3ad1d395-5a46-4e85-9b13-ecec724d6b0a",
$ gh issue view 1 --json state,assignees,labels
{"assignees":[{"login":"JarenKempton",...}],"labels":[{"name":"interlock",...}],"state":"OPEN"}
$ git ls-remote origin 'refs/interlock/*'
82299601fb4be522c5fb676bfe3dac6007083a89	refs/interlock/v2/jarenkempton.interlock-e2e-sandbox/GH-1

$ interlock lane attach --ticket github:jarenkempton.interlock-e2e-sandbox:GH:ticket:GH-1 --json
  "ok": true, "id": "interlock-lane:e8bd9bb5-ace5-4a55-933c-826d5e5ec1c3", "state": "implementing"
$ interlock lane submit interlock-lane:e8bd9bb5-… --head e01ea862c58c2808a95705ae8f3cd6c19ef31845 --json
  "ok": true, "artifact": "https://github.com/JarenKempton/interlock-e2e-sandbox/pull/2"
$ gh api repos/JarenKempton/interlock-e2e-sandbox/issues/1/comments --jq '.[].body'
Linked pull request: [task/GH-1](https://github.com/JarenKempton/interlock-e2e-sandbox/pull/2)

$ interlock lane submit … --gate manual-file-check --evidence-url …/blob/e01ea86…/hello.txt --json
$ interlock lane review … --json
$ interlock lane attention … --reason review_required   → "state": "attention"
$ interlock lane resume …                                → "state": "reviewing"
$ interlock lane verdict … --head e01ea86… --decision approved → "state": "approved"
$ gh pr merge 2 -R JarenKempton/interlock-e2e-sandbox --merge   # sandbox only, approved by Jaren
MERGED e01ea862c58c2808a95705ae8f3cd6c19ef31845

$ interlock lane complete --ticket github:jarenkempton.interlock-e2e-sandbox:GH:ticket:GH-1 --json
  "state": "done",
  receipts: pull_request_merged 504ecc07… · ticket_done "Done" · claim_mirror_removed "removed_verified" · claim_lock_released cb1b1497…
$ gh issue view 1 --json state,stateReason,assignees,labels
{"assignees":["JarenKempton"],"labels":[],"state":"CLOSED","stateReason":"COMPLETED"}
$ git show cb1b1497 --format=%B
interlock release refs/interlock/v2/jarenkempton.interlock-e2e-sandbox/GH-1
{"action":"release","ticket":"github:jarenkempton.interlock-e2e-sandbox:GH:ticket:GH-1",...,"owner":"JarenKempton","version":2,"authorizedBy":"JarenKempton"}

The sandbox repo, issue #1 and PR #2 stay up as evidence.

🤖 Generated with Claude Code

- src/adapters/trackers/github/ is an assignee-only tracker over gh api:
  issues, blocked_by/blocking dependencies and sub-issue parents; the mirror
  is the assignee plus an interlock label; complete closes the issue and
  linkArtifact comments the PR link. Interlock stores no GitHub secret.
- Keys are GH-<number>; refs carry the repository as the instance, so the
  lane tracker derives the site from the ref (siteOf) and needs no saved
  site for external_cli sign-in.
- doctor checks only the configured tracker and renders a none sign-in as
  ready instead of not signed in.
- github_repo user setting; release reads the configured tracker's site.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JarenKempton JarenKempton changed the title task/JWB-946 JWB-946: GitHub Issues tracker adapter on gh auth Nov 13, 2026
JarenKempton and others added 2 commits November 13, 2026 11:51
# Conflicts:
#	src/app/pickup/runtime.ts
- configuredTracker(settings, key) prefers the tracker whose narrower key
  grammar serves the key; pickup and supervisor maps use it, release takes
  the site of the claimed ticket's tracker, and doctor checks every
  configured tracker.
- GitHub connect verifies gh sign-in, so a signed-out gh surfaces as
  tracker_unavailable before lane work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JarenKempton
JarenKempton merged commit 9331883 into main Nov 13, 2026
8 checks passed
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