Repository navigation
Follow dispatched fixes to the merge (0.9.7) - #33
Merged
Merged
Conversation
The gateway reads each dispatched fix's PR state with the owner's own gh, read-only, after every poll: at most 10 PRs a cycle, oldest-checked first, each at most every 30 minutes, never again once merged or closed; gh missing, logged out or rate-limited records unknown and backs off an hour. The state lands on fix_handoff.pr_state (app only; the record tool refuses it). A merge logs one "PR #N merged" event and flags possibly_resolved for the Thread Watcher. A merged or closed fix the Lead has not seen joins the Re-analyze set (fix_handoff.pr_state_seen_at, stamped by send_reanalyze), and the re-analyze prompt names each PR's state with the rule for a merged or closed-unmerged PR. The Board brings a merged fix back to Needs a decision as "Fix merged · PR #N" with Done, its line reads "PR #N merged", and Fixes in flight drops it and shows the other PRs' state; the Ledger tags it "fix merged". Brief v9, README, charter and contract updated.
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
Dispatched fixes are now followed to the merge. Before this, Re-analyze only saw a dispatched fix when its Slack thread moved, and nothing read the PR, so a merged fix stayed
triagedunder Fixes in flight.backend/github_state.py, called fromwatch.poll_onceafter the digest step):gh pr view <url> --json state,mergedAt,closedAt,isDraftwith the owner's owngh, read-only,asyncio.to_thread(subprocess.run, timeout=20). At most 10 URLs a cycle, oldest-checked first, each at most every 30 min, never again oncemerged/closed.ghmissing / logged out / rate-limited / timed out:unknownwith a shortwhy, no read for 1 h. Per-URL readings in<data>/pr_states.json; each item getsfix_handoff.pr_state = {state, at, checked_at, merged_at?, why?}. On the firstmerged: onedispatcheventPR #N mergedand apossibly_resolvedflag (fix PR #N merged) for the Thread Watcher, unless one is already there. Nothing setsresolved, regenerates a draft, posts, or writes to GitHub.store.needs_reanalysisis also true whenpr_stateismerged/closedandpr_state_seen_atis older thanpr_state.at.send_reanalyzestampspr_state_seen_at. The prompt printsPR <url> · merged 2026-09-30/· open/· closed, not mergedand the merged/closed rule.fix_handoffcarryingpr_stateorpr_state_seen_atis refused; a Lead rewrite keeps both; a new dispatch clears both.Fix merged · PR #Nwith Done; its line readsDispatched · <title> · PR #N merged ✓; Fixes in flight leaves it out and shows the other PRs' state; the Ledger row tags it fix merged / fix PR closed. The Re-analyze count includes it.desk/CHARTER.md,desk/CONTRACT.md,app.json0.9.7.Deviation from the request: the request said the Lead should "set
possibly_resolved". The record tool has no field for that (onlyclear_possibly_resolved), and an unknown field refuses the whole row. So the gateway sets the flag on the merge, the same way the poller flags a thread, and the prompt and brief tell the Lead to leave that flag to the Watcher or setresolvedwhen the thread also confirms./nowhas no dispatched-fix summary today, so nothing was added there.Tested
python -m pytest tests -q -p no:cacheprovider: 354 passed (25 new intests/test_pr_state.py, all with an injected fakeghrunner; an autouse fixture fails any realghcall).npm run build: clean;ui/dist/index.mjsrebuilt.docs/screenshots/capture/shoot.mjs: all checks pass, including the newfix-mergedcheck (row readsPR #412 merged, link, Done only,Re-analyze 3 stale, fold excludes it and showsPR #418 open, Ledger tagfix merged). New framedocs/screenshots/fix-merged.png.