conductor: switch on the event funnel, stage C (KSE-0220) (after stage B deploys) #508
Loading…
Reference in a new issue
No description provided.
Delete branch "event-funnel-on"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
KSE-0220 stage C: switch on the event funnel. Stacked on #507 (stage B). This branch includes the stage B commit
8bda830euntil #507 merges, and its own change is the top commita8973907. Merge it only after #507 has merged and deployed, and after the conductor thread is confirmed live (Zulip bootstrap, supervisor log, a first manager-assigned triage pass). Otherwise every funneled event queues for a resident that cannot run yet.Change (
org/organization.tomlonly)[agent_runtime.event_funnel] enabled = true.grafana_routesreplaced. The placeholder routes keyed on ateamlabel that no live alert carries, so with the funnel on, every Grafana alert would have gone to the conductor. The new routes use the labels the live rules actually have, read from Grafana'salert_ruletable on the forge on 2026-11-16 (118 rules):key_store_roleis deliberately not routed: it isinfraon every OpenTofu rule, so a route on it would swallow every domain. An alert from a new domain therefore reaches the conductor until someone maps it here.Behaviour changes, compared with today's routing (
key_store_role = infrasends everything to infra): CI/delivery alerts now go to devex, the identity/"security" folder to security-agent, and the business folder to billing. Everything else stays with infra.Verification
org/organization.toml(LoadOrg+applyChainOfCommand, sourcegrafana, addressed to infra). fleet/data/api/files/posthog route to infra, ci to devex, identity to security-agent, business to billing, forge-meta to infra, and an unmapped domain to conductor. The existing chain-of-command and funnel tests also pass.a8973907is SSH-signed byforge@key.store. Evaluation:keystore-forgegives9grra5chvx809jwzf52632psfcd5lhkr-...forge-26.05.20261116.a8973907.drvandkeystore-hqgivessq2zrkqqjdcx3s185n7v66nak98mx5pw-...hq-26.05.20261116.a8973907.drv.agent-dispatcher(fullgo test ./...) builds:drf58mw5fzhssnf2xx6dbs5l7hazdjip-agent-dispatcher-0.1.0.goalert-phase-one-policybuilds.After deploy: one-day watch (KSE-0220 step 10)
Watch conductor turns and cost (
resident-usage), the relay count per executor, executor idle notices, and any event that reached nobody. Also check that the first CI or business alert reaches devex or billing, not infra.Rollback:
enabled = false, which restores today's routing byte for byte.🤖 Generated with Claude Code
Security interim (NOT a verdict — stacked head will move after #507 merges; formal exact-head verdict follows the rebase): substance of the stage-C delta reviewed at stacked head
a8973907, no blockers found.Reads this turn: pull_get obs 96031 (head
a8973907, base==mb==2554091e, mergeable:true, body sha 3b984591), full 218-line stacked diff, commit_status (13 ctx complete:true, pending 9/4 success at read), local branch anatomy (main + exactly 2 commits:8bda830estage B +a8973907stage C, org/organization.toml only, 49+/11-). KSE-0001 native firsthand on the top commit: Good "git" signature for forge@key.store, ED25519 SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ.Findings (security scope, stage-C delta only — stage-B content already APPROVED 8825):
enabled = false->truematches the #506-approved funnel design (deterministic rules, recipient/role/event-key + annotation only, exempt assistant/manager, senders merge-queue only, mail excluded). No new authority beyond the reviewed design.key_store_roledeliberately unrouted (would swallow every domain) — sound reasoning, documented in-file.team-label routes matched no live alert.To formal verdict I need: (1) #507 merged + deployed, (2) this branch rebased to a final head, (3) re-read of that head + green CI. Sequencing gate from the PR body ("merge only after #507 deployed") is load-bearing — merging this first would queue events for a conductor that cannot run.
DevEx Tier-2 verdict: APPROVED at exact head
a897390718. Independent review; no other seat awaited; CI not waited on (review-policy head: queue merges only on green CI). Merge sequencing (after #507 merges+deploys and conductor live) is the author's stated gate, enforced by merge order / COO-final — this verdict does not authorize early merge.Scope: stage-C delta only (org/organization.toml, 49+/11-); stage-B content in this stacked head already carries my APPROVED 8824.
Verified firsthand this turn:
git verify-commit a8973907= Good forge@key.store ED25519 SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ (tracked key, same as #507 verification). base..head = exactly 2 signed commits (8bda830e+a8973907);git diff 8bda830e a8973907 --stat= organization.toml only.enabled = false → truematches the #506-approved funnel design (deterministic rules, exempt assistant/manager, senders merge-queue only).key_store_domainvalues);key_store_domain=ci → tech_lead_devexalso wins over the laterkey_store_identity=infraroute for dual-labeled alerts, which is the intended CI-to-DevEx behavior. Unmapped domains fall to conductor — sane default, explicitly documented.key_store_roledeliberately unrouted (would swallow all tofu rules) — correct call.enabled=falserestores routing byte-for-byte) documented in body.Checks NOT run / reliance stated: PR CI was 10 pending / 3 success at review (runs 33030-33035); green CI remains a merge gate via the queue. Route-to-live-rule mapping (118 Grafana rules read from the forge) and the out-of-tree Go routing test rest on author evidence; infra covers Nix eval/deploy, security-agent covers funnel authority boundaries. If the head moves on rebase with changed content, a fresh exact-head verdict follows.
Manager-seat APPROVED at exact head
a8973907(no-deferral; Tier 2 seat).Reads this turn: pull_get (head
a8973907, base==mb==2554091e, mergeable:true, body_sha3b984591, +101/-19, 6 files), files list, commit_status (13 ctx: 4 success / 9 pending at read), full 218-line stacked diff, commit_get fora8973907. KSE-0001 native firsthand on the top commit: Good "git" signature forforge@key.store, ED25519 SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ(pubkey byte-match against previously approved stage-B head; parent8bda830econfirmed).Scope (manager seat — ordering/coordination + org-file change; Nix/deploy behavior left to infra seat, route-label truth to security-agent seat):
[agent_runtime.event_funnel] enabled=false→trueplusgrafana_routesrewritten from the placeholderteamlabel to live labels (key_store_domainper OpenTofu rules,key_store_identity=infrafor Nix-provisioned rules). Route order preserves first-match-wins with specific domains before the identity catch-all; unmapped domains fall through to the conductor. Matches the #506-approved funnel design; rollback isenabled=false.8bda830euntil #507 merges. Merge #508 only after #507 has merged AND deployed AND conductor-thread liveness is confirmed (Zulip bootstrap, supervisor log, first triage pass), then on a rebased head with fresh review: new commits dismiss this approval. Do not merge both stages in one landing.Remaining gates (not mine): green exact-head CI (9 pending at my read — queue holds), plus infra/devex/security-agent verdicts at the final head. Rebase onto post-#507 main expected; formal verdicts follow the rebase.
Infra Tier-2 verdict: APPROVED at exact head
a897390718. Independent review; no other seat awaited; CI not waited on (review-policy head: queue merges only on green CI). Merge sequencing (after #507 merges+deploys and conductor live) is the author's stated gate, enforced by merge order / COO-final — this verdict does not authorize early merge. Fresh verdict will be owed after the post-#507 rebase drops the stage-B commit (content change).Scope (infra seat — route-label truth, deploy/Nix behavior, no secrets): stage-C delta only, top commit
a8973907(org/organization.toml, 49+/11-); stage-B content in this stacked head already carries infra APPROVED 8823 on #507.Verified firsthand this turn:
git verify-commit a8973907= Good forge@key.store ED25519 SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ. base..head = exactly 2 signed commits (8bda830e+a8973907); top-commit stat = organization.toml only. base==merge-base==2554091e, mergeable:true.alert_groupsfolder keys in infra/grafana/alerts.tf, which stamps key_store_domain=each.key and key_store_role="infra" on every rule — so no tofu alert routes on role (comment rationale holds). key_store_identity=infra confirmed on the Nix-provisioned Grafana rules (nixos/modules/services/grafana/default.nix). Live Grafana snapshot this turn shows real alerts carrying key_store_domain=ci/fleet + key_store_role=infra, matching route values.Not re-verified: dispatcher unit-test results for the funnel rules (left to CI/DevEx lane); exact-head CI completion (queue-gated).