Enable proactive assistant follow-through and verifiable ownership #276
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
key-store/key.store!276
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "codex/assistant-wakeups"
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?
The assistant could exchange founder SMS but could not schedule a follow-up, and founder requests were left without actual assignees. Add authenticated MCP tools for durable one-time/recurring resident wake-ups and a read-only Redmine membership lookup. Assistant/COO prompts now keep a commitments ledger and carry work through acknowledgment, review, deployment and verification, with quiet two-hour checks and evidence-linked founder updates.
Merged dispatch PR22 stores owner-scoped schedules in the existing queue, coalesces missed/pending ticks and preserves resident authorship and existing spending controls. This change wires the existing protected host secret to hub control, adds isolated PostgreSQL coverage to the authoritative Nix Go check, and records the KSE0197 decision. The placement smoke test derives expected exclusions from the actual supervisor configuration.
Validation: full Nix forge/HQ systems and both runtime packages passed, including the full Go suite against SQLite and isolated PostgreSQL. Three Bazel targets passed (schedule tools, SMS recipient routing, resident prompts). Packaged authenticated MCP-to-dispatcher integration proved owner isolation, stale/cross-owner rejection, an actual timed enqueue and no duplicate after restart using only synthetic credentials and no model/provider calls. See the validation comment for exact artifacts.
Final follow-up changes only dispatch ref from the review branch to main, retaining the approved revision and identical source narHash. Final generation build and review of this pin-only diff precede rollout. No spending cap change, new secret channel or machine SMS path. Queued work and signed memory are preserved. Rollback by pausing/removing schedules or restoring prior hub/dispatcher generations; the additive table remains intact.
Senior security review — exact head
f47f15f(f47f15f6452fe7f5d6816fd005ce144d1bc4506c) — APPROVE.Verified against the founder checklist (13 files, +306/−9): (1) MCP caller-derived ownership — owner/action are injected server-side from authenticated claims (
identityCandidatesFromRequestAuth: username/email/role-* groups) and override untrusted tool args (pinned by unit test);scheduleCallthrows whenrequestAuthis absent, and empty candidates resolve to no credential mapping — anonymous denied at two layers. (2) Hub rejectsfounderas owner by regex guard, and dispatchisResidentActorindependently excludes founder — defense in depth. (3) HMAC-SHA256 bindstimestamp\n/endpoint\nbodywith the existing protected host secret; endpoint binding defeats cross-endpoint replay against the shared Forgejo-webhook key. (4) Local-only transport: http + loopback allowlist (127.0.0.1/[::1]/localhost),redirect:"error", 15s timeout; remote-destination unit test proves the secret never leaves the host. (5) Secret wiring reuses the existingagentDispatcherForgejoWebhookSecretvia read-only bind +readNonPendingFilePENDING guard; per-request reads pick up rotation; no secret reaches residents (test asserts the serialized request contains no secret). (6) Stable-ID + optimistic-revision semantics are surfaced in tool schemas/descriptions (expected_id + expected_revision, 16-record cap, bounds) and enforced by paired dispatch PR22, whose exact-head approval (review 4676, head unchanged4be3e57) stands. (7)redmine_project_membersis GET-only under the caller's own mapped Redmine credential with pagination and limit<=100: no new Redmine privilege. (8) Assistant/COO two-hour quiet loops and KSE-0197 decision text explicitly deny fabricated founder instructions, machine SMS/voice paths, and spending changes; wakes preserve existing authority.Notes (non-blocking): flake pins dispatch
rev=4be3e57(content-addressed; safe) butref=codex/assistant-wakeups— restoreref=mainafter PR22 merges, retaining the rev.KEYSTORE_AGENT_DISPATCHER_REQUIRED_EXCLUDED_IDENTITIESis consumed by the dispatch-repo smoke script — confirm the running Nix/Bazel validation records its result before merge. Tests inspected, not executed locally (no toolchain in sandbox); merge after the reported forge/HQ/runtime builds + stable-ID regression go green.Review only — no merge, deploy, secret, or spending action.
Senior security review — exact head
f47f15f(f47f15f6452fe7f5d6816fd005ce144d1bc4506c) — APPROVE.Verified against the founder checklist (13 files, +306/−9): (1) MCP caller-derived ownership — owner/action are injected server-side from authenticated claims (
identityCandidatesFromRequestAuth: username/email/role-* groups) and override untrusted tool args (pinned by unit test);scheduleCallthrows whenrequestAuthis absent, and empty candidates resolve to no credential mapping — anonymous denied at two layers. (2) Hub rejectsfounderas owner by regex guard, and dispatchisResidentActorindependently excludes founder — defense in depth. (3) HMAC-SHA256 bindstimestamp, endpoint path, and body with the existing protected host secret; endpoint binding defeats cross-endpoint replay against the shared Forgejo-webhook key. (4) Local-only transport: http + loopback allowlist (127.0.0.1/[::1]/localhost), redirect error, 15s timeout; remote-destination unit test proves the secret never leaves the host. (5) Secret wiring reuses the existingagentDispatcherForgejoWebhookSecretvia read-only bind + PENDING guard; per-request reads pick up rotation; no secret reaches residents (test asserts the serialized request contains no secret). (6) Stable-ID + optimistic-revision semantics are surfaced in tool schemas/descriptions (expected_id + expected_revision, 16-record cap, bounds) and enforced by paired dispatch PR22, whose exact-head approval (review 4676, head unchanged4be3e57) stands. (7)redmine_project_membersis GET-only under the caller's own mapped Redmine credential with pagination and limit<=100: no new Redmine privilege. (8) Assistant/COO two-hour quiet loops and KSE-0197 decision text explicitly deny fabricated founder instructions, machine SMS/voice paths, and spending changes; wakes preserve existing authority.Notes (non-blocking): flake pins dispatch rev 4be3e57 (content-addressed; safe) but ref=codex/assistant-wakeups — restore ref=main after PR22 merges, retaining the rev. KEYSTORE_AGENT_DISPATCHER_REQUIRED_EXCLUDED_IDENTITIES is consumed by the dispatch-repo smoke script — confirm the running Nix/Bazel validation records its result before merge. Tests inspected, not executed locally (no toolchain in sandbox); merge after the reported forge/HQ/runtime builds + stable-ID regression go green.
Review only — no merge, deploy, secret, or spending action.
Final validation on dispatch
4be3e5781e338898f5a3af63a47568e593498387and key.storef47f15f6452fe7f5d6816fd005ce144d1bc4506cpassed:/nix/store/dd3fk9xs1k2n1yn90gqz9s1i9774xxij-agent-dispatcher-0.1.0.drv; checkPhase started PostgreSQL and passed internal/agentdispatcher and internal/harness.Runtime integration is ready to merge. Production schedules remain disabled by absence of records until the paired reviewed rollout; live same-session self-wake and founder follow-through verification remain pending.
Senior security review — exact final head
0b80bf4(0b80bf4192a3d2a027405b4426f9d412fb1eb621) — APPROVE (pin-only delta).Verified the full delta against my approved parent
f47f15f: exactly two files,flake.nix+flake.lock, changing onlydispatch_srcrefcodex/assistant-wakeups→main. Exact dispatch revision4be3e5781e338898f5a3af63a47568e593498387unchanged, sourcenarHash sha256-IQPEeif3UoAyYCO+D0YwN7Ofr9TJ7GsgFH5Zvi8q9Nw=unchanged,lastModified/revCountunchanged — the fetched dispatch content is bit-identical to the reviewed input (rev-pinned, so the ref is cosmetic). All prior findings from review 4695 stand: caller-derived ownership with anonymous denied twice, founder excluded at hub and dispatcher, timestamp/endpoint/body HMAC on the existing protected host secret, loopback-only transport with redirect error, read-onlyredmine_project_membersunder the caller's own credential, stable-ID+revision semantics from merged dispatch PR22. Validation as reported by founder (full system builds, PostgreSQL+SQLite Go suite, three Bazel tests, packaged MCP-to-dispatcher enqueue/restart/no-duplicate integration) ran on the prior head whose dispatch content is identical; merger must confirm final generation outputs equal the tested dispatcher/hub generations before merge.Review only — no merge, deploy, secret, or spending action.
Senior security review — exact final head
0b80bf4(0b80bf4192a3d2a027405b4426f9d412fb1eb621) — APPROVE (pin-only delta).Verified the full delta against my approved parent
f47f15f: exactly two files,flake.nix+flake.lock, changing onlydispatch_srcrefcodex/assistant-wakeups→main. Exact dispatch revision4be3e5781e338898f5a3af63a47568e593498387unchanged, sourcenarHash sha256-IQPEeif3UoAyYCO+D0YwN7Ofr9TJ7GsgFH5Zvi8q9Nw=unchanged,lastModified/revCountunchanged — the fetched dispatch content is bit-identical to the reviewed input (rev-pinned, so the ref is cosmetic). All prior findings from review 4695 stand: caller-derived ownership with anonymous denied twice, founder excluded at hub and dispatcher, timestamp/endpoint/body HMAC on the existing protected host secret, loopback-only transport with redirect error, read-onlyredmine_project_membersunder the caller's own credential, stable-ID+revision semantics from merged dispatch PR22. Validation as reported by founder (full system builds, PostgreSQL+SQLite Go suite, three Bazel tests, packaged MCP-to-dispatcher enqueue/restart/no-duplicate integration) ran on the prior head whose dispatch content is identical; merger must confirm final generation outputs equal the tested dispatcher/hub generations before merge.Review only — no merge, deploy, secret, or spending action.
Final head
0b80bf4192a3d2a027405b4426f9d412fb1eb621built both production generations successfully. Dispatcher/nix/store/qiqai83w27n3d633vqqgkgdkxsb4qaa8-agent-dispatcher-0.1.0and hub/nix/store/adqmj5f8azzx4h5j4hbfqihgxjdf7gfd-key-store-mcp-hub-0.8.0are exactly identical to the packages already tested through the full PostgreSQL/SQLite Go suite, Bazel and packaged authenticated timed-wake/restart integration. The final two-file change only restores the approved dispatch ref to main, with revision and narHash unchanged. Exact final-head senior review is recorded. Proceeding with the founder-authorized merge and protected rollout; live same-session wake-up evidence is still pending.Live acceptance, 2026-09-14: self-owned commitment checks
PR276 main0b80bf41 and dispatchPR22 4be3e578 are merged and deployed on forge/HQ. Both live APIs and supervisors resolve through /proc to the tested qiqai83w dispatcher package; both hosts have zero failed units and no rollout hold remains. Fresh encrypted resident/queue/unpublished-work/world backups were restore-verified before switching.
The residents themselves called authenticated resident_schedule_list/set. Assistant created founder-commitments (7200s, f9b3a947); COO created coo-commitments (7200s, fdbd26a1). PG shows exactly one first-fire steer each, delivered at 01:47:06Z and01:48:02Z, then schedules advanced to revision2 and next03:47/03:48Z. Both resumed their pre-existing sessions (assistant9e3b242a, COO5c6d82c3), called complete_task, and synchronized signed memory. Assistant's independently verified memory HEAD is1dacb893 and clean.
The assistant read real owner/PR/conversation state, recorded #43 evidence, and wrote its own concise founder SMS with a direct ticket link. Quo reports AC0aaaafc43a114306b898c2c95fa732a4 delivered01:47:39.549Z. COO's first unchanged check produced no outbound message. Existing real inbound founder SMS records also resolve to the same9e3b242a assistant session. Root did not create their schedules or send the acceptance SMS.
Qualifications: HQ activation again hit the successful-oneshot start-limit issue; the target generation was live, a single reset/start recovered it, and durable correction is tracked at https://todo.key.store/issues/47 / PR277. HQ still depends on forge PostgreSQL and MCP, so this does not prove outage independence. Peer-event subscription wakeups are separate work (dispatchPR23 / key.storePR274), not deployed. The live cap remains$50; #45 records future$5000. Per-wake cost attribution and quiet-hours policy remain follow-through with #41/COO; no blanket22:00–07:00 policy was silently introduced. The stale placement-smoke expectation was corrected in this PR, but the service's last exit timestamp still predates rollout, so this is not claimed as a newly passed end-to-end smoke run.
Detailed local acceptance record: /root/work/codex-assistant-wakeups-rollout-20260914/live-acceptance.json. Relevant canonical Nix/Go/PostgreSQL/Bazel/package tests and exact-head senior reviews are recorded in comment5826.