DD-469: Attention 2/6 — durable queue and commands #4
Labels
No labels
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:fire
svd:go
svd:hold
svd:respec
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/attention-mind-mcp#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Scope and authority
Parent: #1 (DD-469). Product decisions: ADR 0002. Agreed decomposition.
Implement attention/1.0 and binding 1.1 pinned to mind-spec
3da6a263e6aeb3f37d25590d6ab755045ff53786, including its schemas and conformance obligations. Preserve the single queue authority, independent grants and host-owned interruption policy. This issue is a bounded implementation brief; it does not claim working software or grant production deployment.Blocked by
None.
Completed prerequisite
Foundation #3 landed in PR #10 as
9b5a7c0b6e4con 2026-11-15. Implementation landed in PR #11 as04b0704842deon 2026-11-15 under the operator-approved T4 merge; the squash tree is identical to reviewed head0a1e335689d9. See the final review record.Deliverables and acceptance
Deliverables. Implement provider-authenticated seven-day admission windows, explicit submission, replacement, terminal withdrawal and dispositions through one transaction boundary. Persist the occurrence identity, item revision, queue mutation generation and minimal command outcome atomically. Bind retries to actor, queue, window and a fingerprint of the normalised request; authorise again before replay lookup. Preserve first acceptance time and disposition across replacement. No-op replacement/disposition does not advance item or queue mutation generation.
Enforce the candidate shape, canonical UUIDs, timestamp precision, capacity preflight and independent grants. Declare finite hard limits for content count/bytes, lifetime occurrence admissions, unexpired command records and pending delivery count/bytes. Reserve suppression and successful Forget capacity at admission; a full ordinary command store cannot prevent later erasure. Unexpired outcomes cannot be evicted to admit new work. Provide a persisted prepared-transition seam so slice 4 can block affected queue disclosure/delivery, establish surviving evidence and then atomically apply state plus outcome. Completion here is not acceptance of backup-backed recovery.
Acceptance. Race two clients at the same expected revision and prove one change commits. Kill the real writer before commit, after commit and before response; restart and retry the same request to establish the persisted outcome without double mutation. Check changed payload under the same key, equivalent defaults/member order, refusal replay, revoked grants and changed namespace association. Verify exactly seven-day expiry, near-expiry acceptance, expired-token refusal and original deadlines across restart. Fill each implemented capacity boundary and prove refusal has no partial state change, no valid-outcome eviction and no lost erasure reserve.
Boundary. Successful local queue tests do not prove S3 custody, restore completeness or Forget. Source-event feeds, contribution merging, grouping, person matching and inferred provenance remain absent.
Completion evidence
Link the implementing PR and exact commit, commands and results for the acceptance obligations above. Distinguish actual provider checks from reference-model tests; record unsupported checks as unsupported. Follow the repository's specification/review process before implementation. Do not close the parent epic from this slice.
Accepted landing — 2026-11-15
Accepted as complete after verifying PR #11 merged as
04b0704842de, its tree equals reviewed head0a1e335689d9, and clean local main is at the merge. The review and completion evidence establish all slice obligations: 255 unit/packaging tests plus 40 real HTTP/MCP tests, quality and native package build, final integration, and actual Linux CI. This readback reuses those completed checks; no new full test run is claimed. The merge grant isattention-pr11-t4-20261115-7ac1157b. Source rollback does not downgrade migrated v2 state. No deployment or full-provider conformance is claimed. Parent #1 remains open for the four remaining slices.⏸ SVD architect gate: dev/attention-mind-mcp#4 dd-469-attention-2-6-durable-queue-and-commands
Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity
substrate· dispatch efforthighRun:
20261115T093545Z-4cb555e7Held because: CLEAN but 8 open risk(s) (4 verification · 4 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
quarantined. A new offline CLIreadiness --releasemakes info reportready, which accepts local-only durability; backup_policy stays not_configured and--quarantinereverts it. The README defines ready as 'the five command tools accept work', not conformance. Question: is an operator-releasedreadytruthful partial readiness under the pinned contract? The alternatives are (a) commands always refusequarantinedin slice 2, leaving no real HTTP success evidence, or (b) ready automatically while no backup or restore has ever existed. [decision]until; instant normalisation in fingerprints; which refusals are persisted for replay. Question: confirm or correct these at the gate. Otherwise dispatch reads the pinned prose with git show before the first edit, the prose wins, and differences are reported as deviations. [decision]unsupported_operation, which is outside the admit-specific error enum. The alternative is to issue windows that later commands cannot use. Question: which behaviour should slice 2 have? [decision]uv run python3 -m pytest tests/test_commands.py -k candidate_shape_uuid_and_instant_semanticspasses, and includes a submit with due_at 2026-02-30T00:00:00Z that gets invalid_request. [verification]uv run python3 -m pytest tests/test_foundation.py -m unit -q, then-m transport, then the full file, on the pristine base before editing, and records the counts. Post-change, unit plus transport counts must equal the full count, and only the listed foundation tests may change. [verification]Change: Store schema v2 migration, following _migrate at store.py:121-135. It rebuilds the queue table to drop CHECK(quarantined=1) and add readiness, mutation_generation and lifetime_admitted, and adds the items, admissions (token digest plus at most one command record), suppressions and prepared_transitions tables. Every command runs in one Store.transaction() (store.py:137-152), with the effective-time floor read inside it (store.py:186-197). New commands.py holds admit and execute: seven-day digest-bound windows, reauthorisation before replay, sha256 fingerprints of the normalised request, CAS, no-op stability, persisted domain refusals and capacity preflight with a Forget reserve. New custody.py holds the EvidencePolicy seam, with LocalOnlyPolicy as the default and bounded prepared transitions. service.py command handlers follow the check order of service.info (service.py:28-72). contract.py gains operation_schemas(op), generalising info_schemas (contract.py:193-225). authority.py gets an admit path that defers ownership (authority.py:88-120). mcp_adapter.py generalises InfoTool into ContractTool for six exact tools (mcp_adapter.py:44-68, 170, 219-236). cli.py adds an offline readiness --release/--quarantine command, following selected-host (cli.py:58-61). The private _fault and _clock_us test seams follow store.py:70,75. Tests use the real-server and killed-child patterns at tests/test_foundation.py:216-267 and 447-471.
Files:
src/attention_mind_mcp/store.py·src/attention_mind_mcp/commands.py·src/attention_mind_mcp/custody.py·src/attention_mind_mcp/service.py·src/attention_mind_mcp/contract.py·src/attention_mind_mcp/authority.py·src/attention_mind_mcp/mcp_adapter.py·src/attention_mind_mcp/cli.py·tests/test_foundation.py·tests/test_commands.py·README.mdSource Hashes table: 1 of 22 row(s) malformed and skipped —
Each row issha256[:12]of a target-repo file at base9b5a7c0b6e. Measured in the Half-A sandbox on 2026-11-15 withshasum -a 256(cut -c1-12.createmarks a Primary File that does not exist at base.) — the drift guard cannot check them; Half-A will report HOLD.Decision: accept the 8 open risk(s) above and dispatch this spec (
svd:go), or park (svd:skip) / re-spec (svd:respec)?Your call (when this issue is held at the gate via
svd:hold):svd:go— approve; Half-B dispatch accepts exactly this spec (open risks accepted)svd:firebesidesvd:go— approve AND authorise the Half-B fire from the phone; never on its ownsvd:skip— park it; dispatch refuses it and the issue stays for a humansvd:respec— discard this spec; the next Half-A run re-produces it with this record as prior-attempt contextSpec:
/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-15-dd-469-attention-2-6-durable-queue-and-commands.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-15-dd-469-attention-2-6-durable-queue-and-commands.mdMeasured facts. Half-A run
20261115T093545Z-4cb555e7ended HOLD because its source-hash table contained a malformed prose row. Independent contract and storage reviews additionally found semantic errors: one-command-per-window, capacity-refusal persistence, replace/withdraw authorization, readiness release, and incomplete prepared-transition safety. The clean foundation baseline passed 219 tests on Python 3.12; Ruff and mypy also passed.Buckets. Already decided: pinned attention/1.0 semantics and ADR 0002, six-slice boundary, no deployment. Verification: correct the eleven-file spec against the immutable source excerpts now embedded in the issue anchor, then rerun all specification lenses. Genuinely open: no product fork is required; the draft's unread-source questions are resolved from the published specification.
Ruling. Re-spec within the same eleven-file write set. Do not dispatch this HOLD artifact. Fresh clean local queues may be ready for implemented operations; unresolved transitions remain quarantined. Ordinary command records and the finite per-occurrence Forget reserve are separate budgets. Authorized unsupported admission targets return the existing identity-free unsupported-operation refusal without allocation.
Drafted line. Correct the implementation specification and independently verify it before firing the isolated coding worker. Full recovery, queries, Forget and delivery remain in their later slices.
Delegation. Gate §17: “the delegation is standing (with ongoing open review)” and “I accept your leans on design rulings.” This ruling authorizes specification correction, not merge or deployment.
✅ SVD architect gate: dev/attention-mind-mcp#4 dd-469-attention-2-6-durable-queue-and-commands
Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity
unclassified· dispatch effortunclassifiedRun:
20261115T100331Z-3ef216f6Files:
src/attention_mind_mcp/store.py·src/attention_mind_mcp/commands.py·src/attention_mind_mcp/custody.py·src/attention_mind_mcp/service.py·src/attention_mind_mcp/contract.py·src/attention_mind_mcp/authority.py·src/attention_mind_mcp/mcp_adapter.py·src/attention_mind_mcp/cli.py·tests/test_foundation.py·tests/test_commands.py·README.mdWrite-set divergence: present table wins. 0 sourceHashes vs 18-row table.
Decision: dispatch this spec (
svd:go)?Your call (when this issue is held at the gate via
svd:hold):svd:go— approve; Half-B dispatch accepts exactly this spec (open risks accepted)svd:firebesidesvd:go— approve AND authorise the Half-B fire from the phone; never on its ownsvd:skip— park it; dispatch refuses it and the issue stays for a humansvd:respec— discard this spec; the next Half-A run re-produces it with this record as prior-attempt contextSpec:
/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-15-dd-469-attention-2-6-durable-queue-and-commands.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-15-dd-469-attention-2-6-durable-queue-and-commands.mdMeasured facts. Fresh verify run
20261115T100331Z-3ef216f6is CLEAN: zero blocking defects, no degraded or inconclusive lenses. Canonical specification SHA-25687e321e4ceaeac3e93998f57389797202f44e5033ff233692f054a5d467f6100; the independent final storage review found no remaining blocker. Target remains clean main/origin at9b5a7c0b6e4c3b7baded63a4ed7c8a569828030e. On the architect host, from the target checkout,uv run --locked --python 3.12 python -m pytest --basetemp /private/tmp/attention-commands-base-py312-20261115passed the entire pristine suite (219 tests, 64.94s, Python 3.12.12); Ruff and strict mypy passed. Declared failure floor:knownFailingTests: [].Buckets. Already decided: immutable attention/1.0 contract, ADR 0002, durable queue and commands only, exactly eleven Primary Files. Verification: implementation must sweep every readiness-dependent assertion and description in those files, including adapter instructions and README binding-check prose; the spec already requires this sweep. The baseline warning is resolved by the exact host command above. Remaining lens notes are documentation nits or limitations already covered by the independent pinned-source audits, not waived acceptance. Genuinely open: none. All crash, capacity, authority and preparation evidence is still owed by implementation.
Ruling. GO with riders; authorise Half-B against this specification and base, preserving the worktree through integration and review. No reuse of the earlier HOLD run. Gate §21 advice was refreshed before fire: thirteen needs-workaround entries, zero blocks-lane, each disposition recorded in
attention-commands-run/fire-evidence.md. Source references outside the verify fence were independently checked against mind-spec3da6a263e6aeb3f37d25590d6ab755045ff53786.Drafted line. Dispatch the isolated implementation, then run integration verification, independent standards/spec/security review, architect checks and actual CI. No later slice, deployment or merge is approved by this act.
Delegation. Gate §17: “the delegation is standing (with ongoing open review)” and “I accept your leans on design rulings.” The user directed “proceed, #4 — durable queue and commands”. A future T4 merge requires its own named-PR grant after review.
svc-svd-writer referenced this issue2026-11-15 10:38:29 +00:00
spec-verify-dispatch Half B for dev/attention-mind-mcp#4 dd-469-attention-2-6-durable-queue-and-commands completed integration verify.
6e3d0cf6c16e3d0cf: ci/woodpecker/pr/validation is green (combined commit status success). No blockers.codex-svd ship --run-id 20261115T101807Z-dcef0f7c --confirm-merge)spec-verify-dispatch Half B for dev/attention-mind-mcp#4 dd-469-attention-2-6-durable-queue-and-commands completed integration verify.
0a1e3356890a1e335: ci/woodpecker/pr/validation green. Local: 255 unit and 40 transport tests pass; ruff check, ruff format and mypy clean.codex-svd ship --run-id 20261115T101807Z-dcef0f7c --confirm-merge)Implementation is complete in PR #11 at
0a1e335689d9a553f4bf89e4eb19d386ca04201e; merge awaits the named T4 grant. Final review and gate record has zero unresolved Standards, Spec or Security findings, all sixteen acceptance mappings, and the preserved spec/pin provenance.Completion evidence is separated by what it establishes:
Clean local queues are ready for the implemented subset; unresolved prepared work remains quarantined. Schema v1 upgrades to v2 without changing queue identity, but the v1 runtime cannot reopen migrated v2 state. No live service or production state was changed.
Mind-spec remains unchanged at
3da6a263e6aeb3f37d25590d6ab755045ff53786. Messages liaison confirmed separate ownership; later custody planning should verify its snapshot-retention lesson before making deletion claims. Issues #4 and #1 remain open pending landing and the remaining slices respectively.