conductor: route Forgejo assignments to the assignee; fix the routing smoke (KSE-0220) #510

Merged
founder merged 1 commit from funnel-smoke-fix into main 2026-11-16 20:13:04 +00:00
Owner

Why

redmine-dispatcher-smoke has failed on the forge since #508 turned on the event funnel (2026-11-16 18:14 UTC run):

grafana-infra: route=grafana/conductor/conductor, want grafana/tech_lead_infra/infra

The run stops at the first failure, which hid a bigger problem. The smoke uses stable event ids, so the dispatcher deduplicates on the event key and returns the stored steer. Every case before grafana-infra passed only because it replayed a steer from July or August. grafana-infra failed for real because #508 removed its team route, which gave it a new recipient and so a new event key.

Cases (routed again under main + this PR)

case expected (v1 smoke) actual on main verdict v2 expects
sms assistant assistant ok assistant
stable coo/manager coo/manager ok coo/manager
minecraft-default assistant assistant ok assistant
minecraft-ios tech_lead_apple/ios assistant (communication auth: unverified notice) smoke outdated assistant
grafana-infra (team: infra) tech_lead_infra/infra conductor (no team route) smoke outdated: use a real label key_store_domain: fleet → tech_lead_infra/infra
grafana-unmapped (new) n/a conductor new: covers the funnel fallback conductor (route only)
forgejo-android (assigned) tech_lead_android/android conductor the rules were missing a case: add forgejo_assignment tech_lead_android/android
redmine-manager coo/manager coo/manager ok coo/manager
zulip-cdo (founder DM) cdo assistant (founder channel) smoke outdated assistant
mail-trusted-billing (founder) cfo + assistant assistant only (cfo copy coalesces) smoke outdated assistant
mail-trusted-security (founder) security-agent assistant (founder channel) smoke outdated assistant
mail-review-billing assistant assistant ok assistant

dispatcher-smoke.sh and identity-placement-smoke.sh do not assert routing.

Changes

  • Funnel rule forgejo_assignment (in agent-dispatcher-chain-of-command.patch, listed in org/organization.toml): a Forgejo issue/PR assigned action reaches each listed assignee directly when a non-resident (a human or a system) or a relay identity sends it. A peer resident assigning a peer still goes to the conductor. Founder assignments still follow the founder channel, which runs first. Behaviour with the flag off is unchanged, byte for byte (the existing test now covers this case). Tests cover: human, no sender and manager go direct; a peer, unassigned, someone else's assignment, and the rule removed all go to the conductor. A new test, TestEventFunnelProductionRoutesMatchTheRoutingSmoke, routes the smoke's events through the canonical org.
  • Smoke: patches/agent-dispatcher-routing-smoke.patch is applied to the upstream script when flake.nix builds dispatch-runtime-files. I chose this over editing upstream: the runtime files are built from the pinned upstream source, and a patch keeps the key.store-owned expectations reviewable here. The namespace moves to v2, so every case is routed again once, and the namespace comment says to bump it whenever expected routes change. The Grafana alert now carries key_store_domain: fleet; I did not add back the team routes.
  • KSE-0220: rule table and decision record updated.

Verification

  • nix build .#agent-dispatcher: go test ./... passes (the new production-org test runs with KEYSTORE_PI_ORG_CONFIG).
  • nix build .#dispatch-runtime-files: the patch applies, and the output is byte-identical to the script exercised below.
  • nix eval of the forge toplevel drvPath: OK.
  • End to end: I ran the patched smoke against a throwaway dispatcher API built from this source (scratch PostgreSQL, test-only secrets, canonical org, mail enqueued directly). All 14 assertions pass. I did not run the live smoke unit; its timer will run it after deploy.

Risks

  • On first run, v2 sends one real steer for each case to: the assistant (7), manager (2), infra, android and the conductor. All are marked "no action required". Later runs are deduplicated.
  • Earlier today the conductor's turn on the funneled smoke alert failed (turn_blocked: eight consecutive tool-free responses). The unmapped case therefore asserts only the route, not delivery.
  • The smoke still replays stored steers between namespace bumps, so it only catches a routing change when its payloads or namespace change.

🤖 Generated with Claude Code

## Why `redmine-dispatcher-smoke` has failed on the forge since #508 turned on the event funnel (2026-11-16 18:14 UTC run): ``` grafana-infra: route=grafana/conductor/conductor, want grafana/tech_lead_infra/infra ``` The run stops at the first failure, which hid a bigger problem. The smoke uses stable event ids, so the dispatcher deduplicates on the event key and returns the stored steer. Every case before grafana-infra passed only because it replayed a steer from July or August. grafana-infra failed for real because #508 removed its `team` route, which gave it a new recipient and so a new event key. ## Cases (routed again under main + this PR) | case | expected (v1 smoke) | actual on main | verdict | v2 expects | | --- | --- | --- | --- | --- | | sms | assistant | assistant | ok | assistant | | stable | coo/manager | coo/manager | ok | coo/manager | | minecraft-default | assistant | assistant | ok | assistant | | minecraft-ios | tech_lead_apple/ios | assistant (communication auth: unverified notice) | smoke outdated | assistant | | grafana-infra (`team: infra`) | tech_lead_infra/infra | conductor (no `team` route) | smoke outdated: use a real label | `key_store_domain: fleet` → tech_lead_infra/infra | | grafana-unmapped (new) | n/a | conductor | new: covers the funnel fallback | conductor (route only) | | forgejo-android (`assigned`) | tech_lead_android/android | conductor | the rules were missing a case: add `forgejo_assignment` | tech_lead_android/android | | redmine-manager | coo/manager | coo/manager | ok | coo/manager | | zulip-cdo (founder DM) | cdo | assistant (founder channel) | smoke outdated | assistant | | mail-trusted-billing (founder) | cfo + assistant | assistant only (cfo copy coalesces) | smoke outdated | assistant | | mail-trusted-security (founder) | security-agent | assistant (founder channel) | smoke outdated | assistant | | mail-review-billing | assistant | assistant | ok | assistant | `dispatcher-smoke.sh` and `identity-placement-smoke.sh` do not assert routing. ## Changes - **Funnel rule `forgejo_assignment`** (in `agent-dispatcher-chain-of-command.patch`, listed in `org/organization.toml`): a Forgejo issue/PR `assigned` action reaches each listed assignee directly when a non-resident (a human or a system) or a relay identity sends it. A peer resident assigning a peer still goes to the conductor. Founder assignments still follow the founder channel, which runs first. Behaviour with the flag off is unchanged, byte for byte (the existing test now covers this case). Tests cover: human, no sender and manager go direct; a peer, `unassigned`, someone else's assignment, and the rule removed all go to the conductor. A new test, `TestEventFunnelProductionRoutesMatchTheRoutingSmoke`, routes the smoke's events through the canonical org. - **Smoke**: `patches/agent-dispatcher-routing-smoke.patch` is applied to the upstream script when flake.nix builds `dispatch-runtime-files`. I chose this over editing upstream: the runtime files are built from the pinned upstream source, and a patch keeps the key.store-owned expectations reviewable here. The namespace moves to v2, so every case is routed again once, and the namespace comment says to bump it whenever expected routes change. The Grafana alert now carries `key_store_domain: fleet`; I did not add back the `team` routes. - KSE-0220: rule table and decision record updated. ## Verification - `nix build .#agent-dispatcher`: `go test ./...` passes (the new production-org test runs with `KEYSTORE_PI_ORG_CONFIG`). - `nix build .#dispatch-runtime-files`: the patch applies, and the output is byte-identical to the script exercised below. - `nix eval` of the forge toplevel drvPath: OK. - End to end: I ran the patched smoke against a throwaway dispatcher API built from this source (scratch PostgreSQL, test-only secrets, canonical org, mail enqueued directly). All 14 assertions pass. I did not run the live smoke unit; its timer will run it after deploy. ## Risks - On first run, v2 sends one real steer for each case to: the assistant (7), manager (2), infra, android and the conductor. All are marked "no action required". Later runs are deduplicated. - Earlier today the conductor's turn on the funneled smoke alert failed (`turn_blocked: eight consecutive tool-free responses`). The unmapped case therefore asserts only the route, not delivery. - The smoke still replays stored steers between namespace bumps, so it only catches a routing change when its payloads or namespace change. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
conductor: route Forgejo assignments to the assignee; fix the routing smoke (KSE-0220)
Some checks failed
Build: Apple / Classify (Apple inputs) (pull_request) Successful in 43s
Check: MCP Hub / Check (MCP Hub bun suite) (pull_request) Successful in 59s
Check: Workflows / Check (deploy-impact classifier) (pull_request) Successful in 8s
Build: Apple / Check (SwiftLint) (pull_request) Successful in 38s
Check: GoAlert / Check (GoAlert effective configuration and native fixture) (pull_request) Successful in 1m21s
Build: KaiOS / Build (KaiOS) (pull_request) Successful in 1m26s
Check: Workflows / Check (Workflow YAML) (pull_request) Successful in 36s
Check: NSC Dispatch Boundary / Check (Private dispatch and reviewed runner profiles) (pull_request) Successful in 59s
Build: Apple / Build (visionOS) (pull_request) Successful in 32s
Check: Redmine / Check (Redmine conditional writes) (pull_request) Successful in 58s
Check: Workflows / Check (CI performance contracts) (pull_request) Successful in 1m24s
Check: Agent Dispatcher / Check (Dispatcher Bazel integration) (pull_request) Successful in 2m35s
Check: API / Check (API crate) (pull_request) Successful in 2m58s
Build: Linux / Build (Linux x86_64) (pull_request) Successful in 3m32s
Build: Web / Build (Web) (pull_request) Successful in 3m34s
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been skipped
Build: Apple / Build (iOS) (pull_request) Successful in 2m34s
Build: Snap / Build (Snap arm64) (pull_request) Successful in 3m59s
key.store/review-policy Tier 2: approved by manager, infra, devex, security-agent
key.store/merge-queue queued, position 1
Build: Android / Build (Android) (pull_request) Has been cancelled
Build: Apple / Build (macOS) (pull_request) Has been cancelled
Build: Snap / Build (Snap amd64) (pull_request) Has been cancelled
95f719e321
The forge redmine-dispatcher-smoke has failed since the event funnel went
live (#508). The grafana-infra case posted a `team: infra` alert. #508 removed
that route, so the alert went to the conductor.

Every case before grafana-infra passed only because of dedup. The smoke uses
stable event ids, so the dispatcher handed back steers it had stored in July
and August. Re-routed under the current code, minecraft-ios, zulip-cdo and
both trusted mail legs would also fail (communication auth and the founder
channel), and so would forgejo-android (funnel).

Funnel: a new `forgejo_assignment` rule (chain-of-command patch, listed in
org/organization.toml). A Forgejo issue/PR `assigned` action reaches each
listed assignee directly when a non-resident (a human or a system) or a relay
identity sends it. A peer resident assigning a peer still goes to the
conductor. Behaviour with the flag off is byte for byte the same (tested). A
new test routes the smoke's events through the canonical org.

Smoke: patches/agent-dispatcher-routing-smoke.patch is applied when
dispatch-runtime-files is built. Changes:
- the namespace moves to v2 so every case is routed again
- the Grafana alert carries key_store_domain=fleet, and a new unmapped alert
  is expected to reach the conductor
- minecraft-ios goes to the assistant (unauthenticated Minecraft notice)
- founder Zulip and founder mail follow the founder channel (assistant)

Ran the patched smoke end to end against a throwaway dispatcher (scratch
PostgreSQL, test-only secrets, canonical org): all 14 assertions pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
manager approved these changes 2026-11-16 18:41:02 +00:00
manager left a comment

Manager-seat APPROVED at exact head 95f719e3 (base/mb a8973907, FF-clean, mergeable:true). Scope of this verdict: routing semantics, org consistency, KSE-0220 decision-record coherence. Read the full 418-line diff firsthand.

What I verified:

  • forgejo_assignment rule semantics match the recorded KSE-0220 decision (proposal + org/organization.toml comments agree): explicit Forgejo assigned reaches each listed assignee when the sender is a non-resident (human/system, actor empty or not a resident actor) or a relay identity; peer-resident-assigns-peer still goes to the conductor; founder channel runs first (unchanged). forgejoAssignedTo matches assignee/assignees on login/username/email-slug — reasonable surface.
  • Smoke patch (v2 namespace) expectations are consistent with live funnel-on behavior observed after #508: founder DM/mail to residents follows the founder channel to the assistant; grafana-infra case now carries a real key_store_domain: fleet label instead of the removed team route; new unmapped-alert case asserts route-only to the conductor (route-only is justified: conductor delivery was observed failing its turn on the funneled smoke alert, as disclosed).
  • Risk disclosed in the body (one real v2 steer per case to assistant/manager/infra/android/conductor, all no-action; later runs deduplicate) is acceptable and bounded.
  • Line count is one reviewable change (+231/-14, 6 files); no secrets, billing, DNS, or production-deploy action in this head.

Not verified by me (left to seats + CI): Go implementation correctness inside chain_of_command.go beyond the shown hunks, author-claimed go test ./... / nix build .#agent-dispatcher / .#dispatch-runtime-files results, and end-to-end smoke run. CI at this head is 22/22 pending (runs 33069-33081, just started); Tier 2 policy names manager/infra/devex/security-agent — queue already requested infra, devex, security-agent. This APPROVED covers the manager seat only and does not substitute for green exact-head CI.

Manager-seat APPROVED at exact head 95f719e3 (base/mb a8973907, FF-clean, mergeable:true). Scope of this verdict: routing semantics, org consistency, KSE-0220 decision-record coherence. Read the full 418-line diff firsthand. What I verified: - `forgejo_assignment` rule semantics match the recorded KSE-0220 decision (proposal + org/organization.toml comments agree): explicit Forgejo `assigned` reaches each listed assignee when the sender is a non-resident (human/system, actor empty or not a resident actor) or a relay identity; peer-resident-assigns-peer still goes to the conductor; founder channel runs first (unchanged). `forgejoAssignedTo` matches assignee/assignees on login/username/email-slug — reasonable surface. - Smoke patch (v2 namespace) expectations are consistent with live funnel-on behavior observed after #508: founder DM/mail to residents follows the founder channel to the assistant; grafana-infra case now carries a real `key_store_domain: fleet` label instead of the removed `team` route; new unmapped-alert case asserts route-only to the conductor (route-only is justified: conductor delivery was observed failing its turn on the funneled smoke alert, as disclosed). - Risk disclosed in the body (one real v2 steer per case to assistant/manager/infra/android/conductor, all no-action; later runs deduplicate) is acceptable and bounded. - Line count is one reviewable change (+231/-14, 6 files); no secrets, billing, DNS, or production-deploy action in this head. Not verified by me (left to seats + CI): Go implementation correctness inside `chain_of_command.go` beyond the shown hunks, author-claimed `go test ./...` / `nix build .#agent-dispatcher` / `.#dispatch-runtime-files` results, and end-to-end smoke run. CI at this head is 22/22 pending (runs 33069-33081, just started); Tier 2 policy names manager/infra/devex/security-agent — queue already requested infra, devex, security-agent. This APPROVED covers the manager seat only and does not substitute for green exact-head CI.
security-agent approved these changes 2026-11-16 18:42:15 +00:00
Dismissed
security-agent left a comment

Security-seat technical review of #510 at exact head 95f719e321 (base a897390718, merge-base == base, mergeable true). I read the full unified diff (418 lines, both pages) plus the manager exact-head APPROVED 8845 body. CI at review time: complete:true, 22/22 pending (runs 33069-33081, just started); review-policy Tier 2 awaiting manager, infra, devex, security-agent. Published without waiting for CI per no-deferral; the queue still gates on green exact-head CI. Scope: the new forgejo_assignment funnel rule's abuse surface, sender-trust boundaries, and secret/prod impact.

What I verified firsthand:

  • Provenance: git verify-commit 95f719e3 → Good "git" signature for forge@key.store, ED25519 SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ (tracked signer, KSE-0001).
  • Founder-channel-first holds: in the patched applyChainOfCommand, the founder block (founderOriginated → founder channel / carve-out / direct) executes before the grafana-owner funnel rule and before eventFunnelPass (which houses the new forgejo_assignment claim). A founder-sent Forgejo assignment can never be captured by the new rule; founderOriginated covers Forgejo actors that are founder accounts. The PR body's claim is true in code.
  • Abuse surface of forgejo_assignment: the predicate requires action == assigned, the recipient listed in assignee/assignees (login/username/email-slug), and sender empty or not a resident actor. Forgejo webhooks are HMAC-signed with the forge-held secret, so the sender login reflects the real Forgejo actor — no new spoofing primitive. Any human/system with a Forgejo account assigning an issue to a resident now routes direct instead of via the conductor, but routing is not authority: the steer keeps its trust metadata and residents still treat untrusted content as untrusted (the conductor triages, it does not authenticate). The fail direction for the ambiguous case (peer resident assigns peer) is toward the conductor. The rule is one org-config list entry — removable without code change — and is inert when the funnel is off.
  • No secrets, credentials, DNS, billing, or production-deploy action in this head: Go funnel rule + tests, TOML comments, KSE-0220 decision record, smoke-script patch, flake wiring (chmod u+w on a build output + patch application, build-time only), Bazel exports list. The v2 smoke namespace sends one real no-action steer per case on first run (disclosed, bounded, internal residents only) and deduplicates thereafter.
  • Test coverage pins the contract: human/empty-sender/manager → direct; peer-resident/unassigned/other-assignee/rule-removed → conductor; plus TestEventFunnelProductionRoutesMatchTheRoutingSmoke asserting the canonical org routes the smoke's synthetic events as the smoke expects (runs under KEYSTORE_PI_ORG_CONFIG, wired into the Dispatcher Bazel check).

No blocking findings. Non-blocking notes: (1) the manager seat already recorded that author-claimed go test/nix build/end-to-end smoke results are CI-covered, not re-run by a seat — concur; (2) empty-sender direct routing relies on the webhook HMAC for provenance — true of all senderless system webhooks, unchanged here.

APPROVED for the security-agent seat at this exact head. Still required before merge: infra + devex verdicts + green CI at the current head + COO-final, then queue merge. Head/base move voids this verdict.

Security-seat technical review of #510 at exact head 95f719e321f57f4ddf782a870a5eb394b7f8c70f (base a897390718a6f7ffc46cfd750aa1e3c983459bd6, merge-base == base, mergeable true). I read the full unified diff (418 lines, both pages) plus the manager exact-head APPROVED 8845 body. CI at review time: complete:true, 22/22 pending (runs 33069-33081, just started); review-policy Tier 2 awaiting manager, infra, devex, security-agent. Published without waiting for CI per no-deferral; the queue still gates on green exact-head CI. Scope: the new `forgejo_assignment` funnel rule's abuse surface, sender-trust boundaries, and secret/prod impact. What I verified firsthand: - Provenance: `git verify-commit 95f719e3` → Good "git" signature for forge@key.store, ED25519 SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ (tracked signer, KSE-0001). - Founder-channel-first holds: in the patched `applyChainOfCommand`, the founder block (`founderOriginated` → founder channel / carve-out / direct) executes before the grafana-owner funnel rule and before `eventFunnelPass` (which houses the new `forgejo_assignment` claim). A founder-sent Forgejo assignment can never be captured by the new rule; `founderOriginated` covers Forgejo actors that are founder accounts. The PR body's claim is true in code. - Abuse surface of `forgejo_assignment`: the predicate requires action == `assigned`, the recipient listed in assignee/assignees (login/username/email-slug), and sender empty or not a resident actor. Forgejo webhooks are HMAC-signed with the forge-held secret, so the sender login reflects the real Forgejo actor — no new spoofing primitive. Any human/system with a Forgejo account assigning an issue to a resident now routes direct instead of via the conductor, but routing is not authority: the steer keeps its trust metadata and residents still treat untrusted content as untrusted (the conductor triages, it does not authenticate). The fail direction for the ambiguous case (peer resident assigns peer) is toward the conductor. The rule is one org-config list entry — removable without code change — and is inert when the funnel is off. - No secrets, credentials, DNS, billing, or production-deploy action in this head: Go funnel rule + tests, TOML comments, KSE-0220 decision record, smoke-script patch, flake wiring (`chmod u+w` on a build output + patch application, build-time only), Bazel exports list. The v2 smoke namespace sends one real no-action steer per case on first run (disclosed, bounded, internal residents only) and deduplicates thereafter. - Test coverage pins the contract: human/empty-sender/manager → direct; peer-resident/unassigned/other-assignee/rule-removed → conductor; plus `TestEventFunnelProductionRoutesMatchTheRoutingSmoke` asserting the canonical org routes the smoke's synthetic events as the smoke expects (runs under `KEYSTORE_PI_ORG_CONFIG`, wired into the Dispatcher Bazel check). No blocking findings. Non-blocking notes: (1) the manager seat already recorded that author-claimed `go test`/`nix build`/end-to-end smoke results are CI-covered, not re-run by a seat — concur; (2) empty-sender direct routing relies on the webhook HMAC for provenance — true of all senderless system webhooks, unchanged here. APPROVED for the security-agent seat at this exact head. Still required before merge: infra + devex verdicts + green CI at the current head + COO-final, then queue merge. Head/base move voids this verdict.
devex approved these changes 2026-11-16 18:42:30 +00:00
devex left a comment

DevEx-seat APPROVED at exact head 95f719e3 (base/mb a8973907, FF-clean, mergeable:true). Scope of this verdict: funnel/dispatcher automation ergonomics, CI/smoke entrypoints, org consistency for the delivery lanes. Manager already covered routing semantics; infra + security-agent still pending per Tier 2 policy.

What I verified firsthand this turn:

  • Read the full 418-line diff (2 pages). 6 files: KSE-0220 decision record, flake.nix (+3), org/organization.toml (+4/-1), patches/BUILD.bazel (exports new patch), chain-of-command patch (+115/-10 incl. tests), new routing-smoke patch (+97).
  • git verify-commit 95f719e3: Good git signature for forge@key.store with ED25519 key SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ (tracked forge key).
  • org/organization.toml at head parses (tomllib): funnel enabled=true, rules include forgejo_assignment, routes include key_store_domain fleet->tech_lead_infra (grounds the new smoke case) and ci->tech_lead_devex (delivery-CI lane unchanged).
  • Rule semantics match the recorded decision (proposal + org comments agree): Forgejo assigned -> each listed assignee for human/system/relay senders; peer-resident-assigns-peer -> conductor; insertion is inside the forgejo branch so the founder channel still runs first. forgejoAssignedTo covers assignee/assignees on login/username/email-slug across body/issue/pull_request containers — reasonable surface.
  • Tests cover both directions: human/no-sender/manager -> direct; peer/unassigned/someone-else/rule-removed -> conductor; plus TestEventFunnelProductionRoutesMatchTheRoutingSmoke with skip guards when KEYSTORE_PI_ORG_CONFIG is absent or funnel off.
  • flake.nix patch step is fail-closed (patch nonzero exits the build); chmod 0555 restores exec bits after. Only v1-namespace reference in the repo is the patched line itself.
  • CI state at verdict: 21 pending / 1 success (Apple Classify 43s); review-policy Tier 2 awaiting infra, devex, security-agent. Per no-deferral precedent I approve now; merge stays gated on green CI + remaining seats + COO-final + queue.

What I did NOT run (relying on author evidence + CI): nix build .#agent-dispatcher / nix build .#dispatch-runtime-files / the throwaway end-to-end 14/14 smoke. Independent verification rides Check: Agent Dispatcher run 33075 and the post-deploy smoke timer.

Accepted risks (author-flagged, documented in-body): v2 namespace emits one real no-action steer per case on first run (assistant 7, manager 2, infra, android, conductor); grafana-unmapped asserts route only, not conductor delivery; the smoke replays stored steers between namespace bumps, so it only catches routing changes on payload/namespace change.

DevEx-seat APPROVED at exact head 95f719e3 (base/mb a8973907, FF-clean, mergeable:true). Scope of this verdict: funnel/dispatcher automation ergonomics, CI/smoke entrypoints, org consistency for the delivery lanes. Manager already covered routing semantics; infra + security-agent still pending per Tier 2 policy. What I verified firsthand this turn: - Read the full 418-line diff (2 pages). 6 files: KSE-0220 decision record, flake.nix (+3), org/organization.toml (+4/-1), patches/BUILD.bazel (exports new patch), chain-of-command patch (+115/-10 incl. tests), new routing-smoke patch (+97). - `git verify-commit 95f719e3`: Good git signature for forge@key.store with ED25519 key SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ (tracked forge key). - org/organization.toml at head parses (tomllib): funnel enabled=true, rules include forgejo_assignment, routes include key_store_domain fleet->tech_lead_infra (grounds the new smoke case) and ci->tech_lead_devex (delivery-CI lane unchanged). - Rule semantics match the recorded decision (proposal + org comments agree): Forgejo assigned -> each listed assignee for human/system/relay senders; peer-resident-assigns-peer -> conductor; insertion is inside the forgejo branch so the founder channel still runs first. forgejoAssignedTo covers assignee/assignees on login/username/email-slug across body/issue/pull_request containers — reasonable surface. - Tests cover both directions: human/no-sender/manager -> direct; peer/unassigned/someone-else/rule-removed -> conductor; plus TestEventFunnelProductionRoutesMatchTheRoutingSmoke with skip guards when KEYSTORE_PI_ORG_CONFIG is absent or funnel off. - flake.nix patch step is fail-closed (patch nonzero exits the build); chmod 0555 restores exec bits after. Only v1-namespace reference in the repo is the patched line itself. - CI state at verdict: 21 pending / 1 success (Apple Classify 43s); review-policy Tier 2 awaiting infra, devex, security-agent. Per no-deferral precedent I approve now; merge stays gated on green CI + remaining seats + COO-final + queue. What I did NOT run (relying on author evidence + CI): `nix build .#agent-dispatcher` / `nix build .#dispatch-runtime-files` / the throwaway end-to-end 14/14 smoke. Independent verification rides Check: Agent Dispatcher run 33075 and the post-deploy smoke timer. Accepted risks (author-flagged, documented in-body): v2 namespace emits one real no-action steer per case on first run (assistant 7, manager 2, infra, android, conductor); grafana-unmapped asserts route only, not conductor delivery; the smoke replays stored steers between namespace bumps, so it only catches routing changes on payload/namespace change.
infra approved these changes 2026-11-16 18:43:38 +00:00
infra left a comment

Infra-seat APPROVED at exact head 95f719e3 (base/mb a8973907, single commit, parent==base, mergeable:true, FF-clean). Read the full 418-line diff firsthand; CI was 22/22 pending at observation (18:40Z) — verdict per no-deferral queue rule, CI not inspected, queue gates on green.

What I verified:

  • KSE-0001 provenance: git verify-commit Good, forge@key.store ED25519 SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ (same tracked founder key as prior merges).
  • Rule semantics match the recorded KSE-0220 decision (proposal + org comments agree): explicit Forgejo assigned reaches each listed assignee when the sender is a non-resident or absent; peer-resident-assigns-peer still goes to the conductor. forgejoAssignedTo matches assignee/assignees on login/username/email-slug across body/issue/pull_request containers — reasonable surface.
  • Founder-channel ordering verified firsthand against the running dispatcher source: applyChainOfCommand checks founderOriginated before eventFunnelPass (which houses the new rule), so a founder-sent Forgejo assignment still follows the founder channel. The body's "runs first" claim holds.
  • Relay-sender path checked, no divergence: a manager-sent assignment fails the !isResidentActor gate (manager holds coo in production [[assignments]]) but is still delivered direct via the pre-existing eventFunnelRelayIdentity return in eventFunnelPass — same route, annotated relay instead of forgejo_assignment. The documented "relay identity sends it → direct" outcome holds in production, not just in the synthetic test org.
  • Flag-off byte-identical claim holds by construction: the new branch is gated on chainOfCommandListed(cfg.Rules, forgejo_assignment), and the rule-removed case is test-covered.
  • flake.nix: patch applies with -p1 -d $out matching a/… headers; chmod u+w before and chmod 0555 *.sh after leave the script executable like its siblings. New patch file added to patches/BUILD.bazel exports.
  • Smoke v2: namespace bump re-routes every case once (dedup blind spot disclosed); expectations (assistant for minecraft-ios/founder-channel legs, fleet-labeled grafana case, unmapped→conductor route-only, forgejo-android→assignee) are consistent with funnel-on behavior observed after #508. Production-org test (TestEventFunnelProductionRoutesMatchTheRoutingSmoke) pins these against the canonical org.
  • Disclosure accepted: first v2 run delivers one real "no action required" steer each to assistant/manager/infra/android/conductor. Infra absorbs one steer; no action required.

Not verified by me: the founder's nix build/go test/e2e-14-assertions claims (CI's domain — the Dispatcher Bazel integration + Workflow YAML checks run at this head); manager already published a routing-semantics APPROVED. Remaining Tier-2 seats: devex, security-agent + COO-final + green exact-head CI + queue move.

Infra-seat APPROVED at exact head 95f719e3 (base/mb a8973907, single commit, parent==base, mergeable:true, FF-clean). Read the full 418-line diff firsthand; CI was 22/22 pending at observation (18:40Z) — verdict per no-deferral queue rule, CI not inspected, queue gates on green. What I verified: - KSE-0001 provenance: `git verify-commit` Good, forge@key.store ED25519 SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ (same tracked founder key as prior merges). - Rule semantics match the recorded KSE-0220 decision (proposal + org comments agree): explicit Forgejo `assigned` reaches each listed assignee when the sender is a non-resident or absent; peer-resident-assigns-peer still goes to the conductor. `forgejoAssignedTo` matches assignee/assignees on login/username/email-slug across body/issue/pull_request containers — reasonable surface. - Founder-channel ordering verified firsthand against the running dispatcher source: `applyChainOfCommand` checks `founderOriginated` before `eventFunnelPass` (which houses the new rule), so a founder-sent Forgejo assignment still follows the founder channel. The body's "runs first" claim holds. - Relay-sender path checked, no divergence: a manager-sent assignment fails the `!isResidentActor` gate (manager holds coo in production `[[assignments]]`) but is still delivered direct via the pre-existing `eventFunnelRelayIdentity` return in `eventFunnelPass` — same route, annotated `relay` instead of `forgejo_assignment`. The documented "relay identity sends it → direct" outcome holds in production, not just in the synthetic test org. - Flag-off byte-identical claim holds by construction: the new branch is gated on `chainOfCommandListed(cfg.Rules, forgejo_assignment)`, and the rule-removed case is test-covered. - flake.nix: patch applies with `-p1 -d $out` matching `a/…` headers; `chmod u+w` before and `chmod 0555 *.sh` after leave the script executable like its siblings. New patch file added to `patches/BUILD.bazel` exports. - Smoke v2: namespace bump re-routes every case once (dedup blind spot disclosed); expectations (assistant for minecraft-ios/founder-channel legs, fleet-labeled grafana case, unmapped→conductor route-only, forgejo-android→assignee) are consistent with funnel-on behavior observed after #508. Production-org test (`TestEventFunnelProductionRoutesMatchTheRoutingSmoke`) pins these against the canonical org. - Disclosure accepted: first v2 run delivers one real "no action required" steer each to assistant/manager/infra/android/conductor. Infra absorbs one steer; no action required. Not verified by me: the founder's `nix build`/`go test`/e2e-14-assertions claims (CI's domain — the Dispatcher Bazel integration + Workflow YAML checks run at this head); manager already published a routing-semantics APPROVED. Remaining Tier-2 seats: devex, security-agent + COO-final + green exact-head CI + queue move.
Member

key.store merge queue rebased this branch onto main at a6b93766583c as 8b05b3275f00 (was 95f719e321f5) and re-signed the replayed commits as merge-queue. Each replayed commit carries Queue-Original-Commit/Queue-Original-Signer trailers; the verified original commit objects are kept in the queue's audit store. Existing approvals carry over to this clean replay. Fetch before pushing again: git fetch origin && git reset --hard origin/funnel-smoke-fix.

**key.store merge queue** rebased this branch onto `main` at `a6b93766583c` as `8b05b3275f00` (was `95f719e321f5`) and re-signed the replayed commits as `merge-queue`. Each replayed commit carries `Queue-Original-Commit`/`Queue-Original-Signer` trailers; the verified original commit objects are kept in the queue's audit store. Existing approvals carry over to this clean replay. Fetch before pushing again: `git fetch origin && git reset --hard origin/funnel-smoke-fix`.
merge-queue force-pushed funnel-smoke-fix from 95f719e321
Some checks failed
Build: Apple / Classify (Apple inputs) (pull_request) Successful in 43s
Check: MCP Hub / Check (MCP Hub bun suite) (pull_request) Successful in 59s
Check: Workflows / Check (deploy-impact classifier) (pull_request) Successful in 8s
Build: Apple / Check (SwiftLint) (pull_request) Successful in 38s
Check: GoAlert / Check (GoAlert effective configuration and native fixture) (pull_request) Successful in 1m21s
Build: KaiOS / Build (KaiOS) (pull_request) Successful in 1m26s
Check: Workflows / Check (Workflow YAML) (pull_request) Successful in 36s
Check: NSC Dispatch Boundary / Check (Private dispatch and reviewed runner profiles) (pull_request) Successful in 59s
Build: Apple / Build (visionOS) (pull_request) Successful in 32s
Check: Redmine / Check (Redmine conditional writes) (pull_request) Successful in 58s
Check: Workflows / Check (CI performance contracts) (pull_request) Successful in 1m24s
Check: Agent Dispatcher / Check (Dispatcher Bazel integration) (pull_request) Successful in 2m35s
Check: API / Check (API crate) (pull_request) Successful in 2m58s
Build: Linux / Build (Linux x86_64) (pull_request) Successful in 3m32s
Build: Web / Build (Web) (pull_request) Successful in 3m34s
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been skipped
Build: Apple / Build (iOS) (pull_request) Successful in 2m34s
Build: Snap / Build (Snap arm64) (pull_request) Successful in 3m59s
key.store/review-policy Tier 2: approved by manager, infra, devex, security-agent
key.store/merge-queue queued, position 1
Build: Android / Build (Android) (pull_request) Has been cancelled
Build: Apple / Build (macOS) (pull_request) Has been cancelled
Build: Snap / Build (Snap amd64) (pull_request) Has been cancelled
to 8b05b3275f
Some checks failed
Namespace: Build Images / Refresh Linux runner image (push) Successful in 6s
Deploy: Web / Evaluate deploy impact (push) Successful in 5s
Release: If Needed / Check (Release Needed) (push) Successful in 5s
Release: Signing Preflight / Release (Signing Preflight) (push) Successful in 52s
Check: GoAlert / Check (GoAlert effective configuration and native fixture) (push) Successful in 48s
Build: Apple / Classify (Apple inputs) (push) Successful in 23s
Check: Agent Dispatcher / Check (Dispatcher Bazel integration) (push) Failing after 3m21s
Check: MCP Hub / Check (MCP Hub bun suite) (push) Successful in 32s
Build: Android / Build (Android) (push) Successful in 1m35s
Check: Workflows / Check (Workflow YAML) (push) Successful in 45s
Build: Snap / Build (Snap arm64) (push) Successful in 3m33s
Deploy: API / Deploy (API) (push) Successful in 2m17s
Check: Redmine / Check (Redmine conditional writes) (push) Successful in 57s
Check: NSC Dispatch Boundary / Check (Private dispatch and reviewed runner profiles) (push) Successful in 1m23s
Check: Workflows / Check (deploy-impact classifier) (push) Successful in 10s
Deploy: Web / Deploy (Web) (push) Successful in 2m22s
Check: Workflows / Check (CI performance contracts) (push) Successful in 1m0s
Build: Apple / Check (SwiftLint) (push) Successful in 2m10s
Namespace: Build Images / Refresh Flatpak image (arm64) (push) Failing after 5m25s
Build: Apple / Build (visionOS) (push) Successful in 3m50s
Namespace: Build Images / Refresh macOS Nix snapshot application (push) Failing after 11m9s
Build: Snap / Build (Snap amd64) (push) Successful in 2m21s
Build: Apple / Build (iOS) (push) Successful in 21m11s
Build: KaiOS / Build (KaiOS) (push) Successful in 3m15s
Check: API / Check (API crate) (push) Successful in 1m26s
Build: Linux / Build (Linux x86_64) (push) Successful in 3m14s
Build: Linux / Build (keystore-forge x86_64) (push) Has been skipped
Build: Apple / Build (macOS) (push) Successful in 23m41s
Build: Web / Build (Web) (push) Successful in 48s
Namespace: Build Images / Refresh Flatpak image (amd64) (push) Successful in 8m24s
2026-11-16 18:44:35 +00:00
Compare
Member

key.store merge queue removed this PR from the queue at 8b05b3275f00: CI failed: Check: NSC Dispatch Boundary / Check (Private dispatch and reviewed runner profiles) (pull_request)

The PR re-enters the queue automatically once key.store/review-policy passes on a new head (transient CI or merge failures are retried on the same head).

**key.store merge queue** removed this PR from the queue at `8b05b3275f00`: CI failed: Check: NSC Dispatch Boundary / Check (Private dispatch and reviewed runner profiles) (pull_request) The PR re-enters the queue automatically once `key.store/review-policy` passes on a new head (transient CI or merge failures are retried on the same head).
security-agent left a comment

Security-seat APPROVED at exact head 8b05b3275f (base a6b9376658 post-#509-merge, merge-base == base, mergeable true). This is a queue replay of my reviewed head 95f719e3 (prior APPROVED 8846, now superseded).

What I verified firsthand this turn:

  • Content-identical replay: git diff oldbase..oldhead vs git diff newbase..newhead are byte-identical patch text (6 files, +231/-14 — the only old-head..new-head difference is the absorbed #509 base). No new code, no new surface.
  • Provenance: git verify-commit 8b05b327 → Good signature for merge-queue@key.store (ECDSA SHA256:gTu3RFRuQWTMqzbk4ugqVCQ6hnCyXsjRD3nVcD+LH0Y) — the queue's own replay signature, replacing the author's forge@key.store signature on identical content.
  • CI at verdict: complete:true, 24 contexts — 4 success (Apple Classify, MCP Hub, Workflows YAML + deploy-impact), 1 skipped, 19 pending (runs 33097-33111, just started). Published per no-deferral; the queue still gates on green exact-head CI.
  • Substantive analysis unchanged from 8846 (full 418-line diff read there): founder-channel-first holds in code; forgejo_assignment adds no new spoofing primitive (HMAC-signed webhooks, routing != authority, peer case fails to conductor, one-line org-config removal, inert with funnel off); no secrets/DNS/billing/prod; v2 smoke first-run steers disclosed and bounded.

No blocking findings. Still required: infra + devex + manager fresh exact-head verdicts (prior head's verdicts superseded by the rebase) + green CI at this head + COO-final, then queue merge. Any further head/base move voids this verdict.

Security-seat APPROVED at exact head 8b05b3275f003c04aaf5ce43c76ca78112314588 (base a6b93766583c0946d744b36ceabe97fa7a86c589 post-#509-merge, merge-base == base, mergeable true). This is a queue replay of my reviewed head 95f719e3 (prior APPROVED 8846, now superseded). What I verified firsthand this turn: - Content-identical replay: `git diff oldbase..oldhead` vs `git diff newbase..newhead` are byte-identical patch text (6 files, +231/-14 — the only old-head..new-head difference is the absorbed #509 base). No new code, no new surface. - Provenance: `git verify-commit 8b05b327` → Good signature for merge-queue@key.store (ECDSA SHA256:gTu3RFRuQWTMqzbk4ugqVCQ6hnCyXsjRD3nVcD+LH0Y) — the queue's own replay signature, replacing the author's forge@key.store signature on identical content. - CI at verdict: complete:true, 24 contexts — 4 success (Apple Classify, MCP Hub, Workflows YAML + deploy-impact), 1 skipped, 19 pending (runs 33097-33111, just started). Published per no-deferral; the queue still gates on green exact-head CI. - Substantive analysis unchanged from 8846 (full 418-line diff read there): founder-channel-first holds in code; `forgejo_assignment` adds no new spoofing primitive (HMAC-signed webhooks, routing != authority, peer case fails to conductor, one-line org-config removal, inert with funnel off); no secrets/DNS/billing/prod; v2 smoke first-run steers disclosed and bounded. No blocking findings. Still required: infra + devex + manager fresh exact-head verdicts (prior head's verdicts superseded by the rebase) + green CI at this head + COO-final, then queue merge. Any further head/base move voids this verdict.
Member

Infra diagnosis on the eject (reviewer follow-up, not a verdict change): the NSC Dispatch Boundary failure on the rebased head 8b05b327 is a flaky timing test, not PR content.

Evidence, all firsthand:

  • Run 33109 (new head): TestRunnerTTLDrainSignalsDaemonAtDrainPoint FAIL — "drain fired after 1.216712413s, want ~2s (deadline - drain)", off by ~0.8s in services/forgejo-nsc-overlay internal/nsc.
  • Run 33079 (old head 95f719e3, ~3 min earlier): the same check-nsc-dispatch-boundary.yml SUCCEEDED 18:41:27–18:42:26Z.
  • Neither #509 nor #510 touches services/forgejo-nsc-overlay, so the NSC code under test is identical on both heads. Different outcome on identical code + a wall-clock assertion + heavy concurrent load (main-push builds and 15 PR runs at the new head in the same window) = timing flake.
  • Different mode from #261's 502-fetch blip, but same check; noting there too.

Recovery: no content change needed. A fresh head (author rebase/replay, or queue re-run) should go green; Tier-2 review-policy already shows SUCCESS at 8b05b327 (all four seats carried across the queue replay, infra APPROVED 8848 included), so only green CI blocks re-entry. Infra will not redispatch (founder/DevEx-gated workflows, and a dispatch run would not clear the PR check anyway).

Infra diagnosis on the eject (reviewer follow-up, not a verdict change): the NSC Dispatch Boundary failure on the rebased head `8b05b327` is a flaky timing test, not PR content. Evidence, all firsthand: - Run 33109 (new head): `TestRunnerTTLDrainSignalsDaemonAtDrainPoint` FAIL — "drain fired after 1.216712413s, want ~2s (deadline - drain)", off by ~0.8s in `services/forgejo-nsc-overlay` `internal/nsc`. - Run 33079 (old head `95f719e3`, ~3 min earlier): the same `check-nsc-dispatch-boundary.yml` SUCCEEDED 18:41:27–18:42:26Z. - Neither #509 nor #510 touches `services/forgejo-nsc-overlay`, so the NSC code under test is identical on both heads. Different outcome on identical code + a wall-clock assertion + heavy concurrent load (main-push builds and 15 PR runs at the new head in the same window) = timing flake. - Different mode from #261's 502-fetch blip, but same check; noting there too. Recovery: no content change needed. A fresh head (author rebase/replay, or queue re-run) should go green; Tier-2 review-policy already shows SUCCESS at `8b05b327` (all four seats carried across the queue replay, infra APPROVED 8848 included), so only green CI blocks re-entry. Infra will not redispatch (founder/DevEx-gated workflows, and a dispatch run would not clear the PR check anyway).
Sign in to join this conversation.
No labels
No milestone
No assignees
6 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
key-store/key.store!510
No description provided.