Skip to content

ci(town-crier): auto-resolve bus thread on 2-approval consensus#7

Closed
jasperboerhof wants to merge 2 commits into
mainfrom
ci/crier-2approval-consensus
Closed

ci(town-crier): auto-resolve bus thread on 2-approval consensus#7
jasperboerhof wants to merge 2 commits into
mainfrom
ci/crier-2approval-consensus

Conversation

@jasperboerhof

Copy link
Copy Markdown
Contributor

Adds the 2-approval consensus auto-resolve job to this repo's town-crier producer workflow, matching the version merged to kendo (development, 2026-06-23).

What it does: on an approved review of an Agent Review Requested PR, it tallies distinct current-head approvals; once ≥2 agree with no outstanding CHANGES_REQUESTED it POSTs /resolve to the bus to de-announce the thread (further review turns are churn once two independent approvals agree). Stale approvals cast on an earlier head are filtered out, so a regression pushed onto a reviewed head can't satisfy consensus.

Also adds the synchronize re-announce trigger (re-review on push) — this repo's workflow was missing it, bringing it to parity with the other producers.

No new secrets — reuses the existing TOWN_CRIER_URL variable + TOWN_CRIER_TOKEN secret; the consensus job only adds in-workflow pull-requests: read.

The announce-pr.yml is byte-identical to kendo's deployed version (sha256 eb9ccfe3…).

🤖 Generated with Claude Code

@jasperboerhof jasperboerhof added the Agent Review Requested Requesting review of specialized AI review agents. label Jun 24, 2026
@jasperboerhof

Copy link
Copy Markdown
Contributor Author

Town Crier Review · 9/10 · PASS · 🔎 Independent

kendo-report-tool #7 · AC anchor: PR description · head b2fc049fa1 · via the town-crier bus (request #157)

Tip

Single-file CI-config PR adding a 2-approval consensus auto-resolve job (plus a synchronize re-announce trigger) to this repo's town-crier producer; I independently simulated the consensus jq across the off-happy-path cases (stale CHANGES_REQUESTED, dismissed/pending reviews, empty review set, approve-then-CR) and verified the byte-identical-to-kendo claim, finding the head-filtered approval tally, the fail-open-but-loud-on-missing-provisioning policy, and the job-scoped pull-requests: read all correct. Clean parity port of an already-deployed workflow with no defect.

No findings — clean against the review checklist.

Goosterhof
Goosterhof previously approved these changes Jun 24, 2026

@Goosterhof Goosterhof left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approve-worthy

0 blockers · 0 concerns · 1 nit · 1 praise · 0 inline

Round 1. Bus thread round 2 — confirming @Jasper's independent PASS 9/10.

Single-file CI-config PR porting the 2-approval consensus auto-resolve job (plus the synchronize re-announce trigger) into this repo's town-crier producer, bringing it to parity with kendo's deployed announce-pr.yml. The byte-identity claim checks out: the head file hashes to eb9ccfe3b280577ae8a9f08c4afee134da8e9185d56e8cb1b97118636f3e3074, identical to origin/development:.github/workflows/announce-pr.yml on kendo. CI green (announce, check (8.4), check (8.5)); consensus/resolve skip correctly on this event.

Cross-file findings

Head-filter asymmetry (nit, not a defect). The consensus tally filters approvals to the current head (.state == "APPROVED" and .commit_id == $head) but counts CHANGES_REQUESTED head-blind. I walked the two regimes: with dismiss_stale_reviews on, a stale CR is DISMISSED and the latest-per-reviewer group_by | max_by(.submitted_at) drops it; with the setting off, a CR cast on an earlier head stays CHANGES_REQUESTED and blocks consensus even after the concern is fixed on a new head. That is the conservative direction — a stale CR holds the thread open rather than waving a regression through — so it is correct as written. Worth a one-line comment that the asymmetry is deliberate, since a future reader will ask why one side is head-filtered and the other is not.

Praise: the NDJSON-via---paginate --jq '.[]'-then-jq -s slurp explicitly avoids gh api --slurp (newer-gh only) — a real portability decision against the runner's gh version, not boilerplate, and the inline comment naming it earns its place.

Verified parity against kendo and re-simulated the head-filter edge that @Jasper already covered; nothing to add to the consensus correctness case. Clean port.

Automated war-room agent review — posted because this PR carries the Agent Review Requested label.

@jasperboerhof jasperboerhof dismissed Goosterhof’s stale review June 24, 2026 09:53

The merge-base changed after approval.

@jasperboerhof jasperboerhof requested a review from Goosterhof June 24, 2026 10:44
@jasperboerhof

Copy link
Copy Markdown
Contributor Author

Town Crier Review · 9/10 · PASS · 🤝 Confirm

kendo-report-tool #7 · AC anchor: PR description (config-only parity port of kendo's announce-pr.yml 2-approval consensus auto-resolve job; no board issue) · head 2244e78cb9 · via the town-crier bus (request #157)

Tip

Single-file CI-config PR porting kendo's deployed 2-approval consensus auto-resolve job (plus the synchronize re-announce trigger) into this repo's town-crier producer. Corroborates the prior reviews: byte-identity to kendo's origin/development verified independently (sha256 eb9ccfe3…), and the consensus jq holds across the off-happy-path cases — head-filtered approval tally, latest-per-reviewer dedup, and job-scoped pull-requests:read least-privilege all check out. The one nit raised on the thread (CHANGES_REQUESTED tally is head-blind, unlike the head-filtered approvals) is benign by direction — a stale CR can only block consensus, never cause a false auto-resolve. Clean parity port; nothing refuted.

No findings — clean against the review checklist.

Bus thread · 2 prior review(s):

  • jasper (independent): Independent first look (empty thread). PASS 9/10 — no findings. Single-file CI-config PR adding a 2-approval consensus a
  • general (confirm): Approve-worthy. Confirm @Jasper's PASS — byte-identity to kendo verified (sha256 eb9ccfe3…), CI green. One nit: CHANGES_

@jasperboerhof

Copy link
Copy Markdown
Contributor Author

Town Crier Review · 9/10 · PASS · 🔎 Independent

kendo-report-tool #7 · AC anchor: PR description (task, no linked issue) · head 2244e78cb9 · via the town-crier bus (request #110)

Tip

Single-file CI-config PR adding a consensus job to announce-pr.yml that retires a bus thread once two distinct current-head approvals agree with no outstanding change request; I traced the new job's trigger gate, jq tally, stale-approval guard, dismissed-review handling, off-happy-path failure modes, and job-scoped permissions. The logic is robust and the failure policy fails loud on missing provisioning yet fails safe (thread stays open, never a wrong resolve) on transients — no defect found.

No findings — clean against the review checklist.

@jasperboerhof

Copy link
Copy Markdown
Contributor Author

removed the file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Agent Review Requested Requesting review of specialized AI review agents.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants