package provision // Record-write census entries for pro-6214-service-runs (Linear PRO-6214: // run-role service credentials, keyed run create; spec // docs/superpowers/specs/2026-10-24-service-runs-design.md), layered on // secSidecarCreateGateWriteCensusInventory (main's last at 3d7cbe30). // Reviewed by the branch author; census-ruling-pro-6214-service-runs, // approved by Paul (census owner), in session, 2026-10-24, at tip ffe8f40a // (docs/superpowers/notes/census-proposal-pro-6214-service-runs.md). // Every unit keeps its class and its site kinds; only digests move, and no // write site is added, moved to another class or removed. // - Server.admitRun passes the keyed create's scoped key, request digest // and caller into RunAdmit, and answers a *RunKeyReplay naming its own // id as its admission. Still one SetRecordRun (RunAdmit): the key is // recorded in run_keys by that same compare-and-swap, never by a write // of its own. record-writer. // - Server.handleAPIRunAck, Server.handleAPIRunCancel and // Server.handleAPIRunExpire: refusal codes only (jsonErrorCode); their // RunClear, RunCancelTransition and RunExpire writes are unchanged, and // none of them touches run_keys. A run service reaches them only for a // run its own credential started (runGate, no census site). // record-writer. // - Server.auditRunEnd adds a service's run's requester line to the // run-end activity detail; its one Put, the audited marker under // runs//, is unchanged. nonrecord. // - Server.registerCLIRoutes registers the five run doors with // svcrole.Exactly(svcrole.Run) instead of svcrole.Set{}, and adds GET // .../instances/{host}/runs (handleAPIRunKeyLookup, which writes // nothing). Route lines only. key-site. // // provision.RunAdmit, the transition admitRun applies, names no census // identifier, so it is not a site here; its run_keys change is in the // root-read overlay plan14-root-reads-pro-6214-service-runs.tsv. func serviceRunsWriteCensusInventory() []censusEntry { entries := append([]censusEntry(nil), secSidecarCreateGateWriteCensusInventory()...) replacements := []censusEntry{ {"internal/console/apiruns.go", "Server.admitRun", "record-writer", "key:SetRecordRun", "b2d56d70b24aeecbe191fc868a8afb8c2ee4c9eb73371edad17210441e0bd8ce"}, {"internal/console/apirunsfollow.go", "Server.auditRunEnd", "nonrecord", "sel:Put", "e112ac93c83aebf1325fca43f4d94a257783f5d2f3983b462d8f7c84459297f6"}, {"internal/console/apirunsfollow.go", "Server.handleAPIRunAck", "record-writer", "key:SetRecordRun", "2680a0bb0550b3c4811487dfffb8ec56ec9c381085d67ef4b6af0e3b17035587"}, {"internal/console/apirunsfollow.go", "Server.handleAPIRunCancel", "record-writer", "key:SetRecordRun", "4a7f3b95ccdffb9c868d92a368036fb7af8115972ea060c0949f065c27f93581"}, {"internal/console/apirunsfollow.go", "Server.handleAPIRunExpire", "record-writer", "key:SetRecordRun", "fd67215764cf8c0ae94a240f2637fd126e79675bd17ab72603cb43e7b7ba7277"}, {"internal/console/authcli.go", "Server.registerCLIRoutes", "key-site", "lit:instances,lit:sidecars", "12e06989835b4de0d1fc2e8082cb2f62d1e961b689a61c886d6e201ac350285f"}, } for _, r := range replacements { found := false for i, e := range entries { if e.File == r.File && e.Unit == r.Unit { entries[i], found = r, true } } if !found { entries = append(entries, r) } } return entries }