Repository navigation
[ATT-01] Persist current approval and input attention #3
Description
ID: ATT-01 (F-002). Priority: P0. Dependency: #2 (complete). Backlog: #1.
Implemented locally on phase2/current-attention:
source bbbaf1c50bdac692f29ab595f772b2a23c1aea0e, full Foundation attestation
1ac6da6732aa44c531c5c72f8c27e5f0576a6686, clean verified tip
6cc650d507d3ff80e23919d687fbc2920497da5f. No push or PR.
As approved, ownership stays in phase1-foundation, not a second overlapping
tpatch root. Fork migration 46 and the independent current-request projector
preserve the immutable audit and both supported upgrade histories.
Sending a reply remains intent until canonical resolution. Revert resolves
remaining requests; deletion/recreation isolates incarnations; imported
requests cannot become actionable. Ambiguous turnless replies are logged and
ignored, not matched to a newer reused request ID. Completion/failure/disconnect
awareness is deferred to #4, and delivery/RPC to #5.
Problem and reuse
The immutable local audit records evidence, not the current actionable set.
Add a mutable projection from persisted orchestration events using the existing
decider/projector/receipt model. Keep the audit unchanged.
Scope
Typed current approval/input items with opaque identity, open/resolved state,
material revision, source event sequence and bounded reason codes. Separate
the durable projection cursor from client delivery cursors. Use the owning
environment's authenticated identity at the transport boundary.
Acceptance criteria
- Opening a request creates one stable item; duplicate replay does not increment
revision. Multiple pending requests in one thread remain independently visible. - Matching resolution changes only that request. Response failure keeps it open
with a bounded failure reason and material revision change. - One source event may update multiple rows. Do not make
source_event_id
unique across current rows; use event application/cursor transactionality. - Full rebuild derives current state from persisted orchestration events,
including events absent from the compact audit. Revert/import/delete policies
are explicit and do not produce phantom requests. - Current rows and projection cursor commit atomically; publication happens
only after commit. Historical replay cannot trigger notifications. - Additive migrations preserve existing audit data and both supported upgrade
paths. Focused tests cover duplicate replay, multiple requests, stale replies,
restart, rebuild and deletion.
Coverage and non-goals
Server/contracts slice, consumed later by every client. Approval/input comes
from canonical events for Codex, Claude, Cursor, Grok, OpenCode, Antigravity and Copilot;
unavailable capabilities produce no fabricated request. Existing environment
authorization applies regardless of connection mode.
No RPC/UI yet, failure/disconnect heuristics, relay dependency, seen/ack storage,
notification delivery, prompts or tool-output duplication.
Activity
jdbencardinop commentedon Sep 27, 2026
ATT-01 implemented locally
phase2/current-attentionbbbaf1c50bdac692f29ab595f772b2a23c1aea0e1ac6da6732aa44c531c5c72f8c27e5f0576a66866cc650d507d3ff80e23919d687fbc2920497da5f02abd6f050e22cb872dafa64806cba698beab7c5As approved, this extends the existing
phase1-foundationtpatch root. Itscomplete 41-path canonical patch preserves the earlier audit, TWS, hosting
contracts and migration bridge; it was not replaced by the 12-path ATT-01
increment. The unused
current-request-attentionrequest is retained with anexplicit pre-implementation superseded disposition.
Delivered
Typed current approval/input items carry an opaque deterministic identity,
thread/project/request/turn references, open/resolved state, material revision,
bounded reason codes, source event/sequence and timestamps. No prompts,
commands, questions or raw errors are duplicated in the current rows.
Fork migration 46 adds
projection_thread_attention_currentand a smallprivate thread-incarnation context. The projector joins the existing atomic
event/projection/receipt pipeline with its own durable projection cursor.
Normal runtime batches cannot rewind a cursor on a duplicate/older event;
the existing explicit single-cursor reset/bootstrap behavior is retained.
The compact audit implementation, migration and repository are unchanged.
Current-state rebuild reads the full persisted orchestration stream, not
the audit or another projector's already-advanced read model.
Approved state policies
input does not increment revisions; reason/status transitions do.
request. Response failure keeps it open with
response_failed.Thread/turn/kind scope isolates reused request IDs; an unscoped reply with
multiple historical candidates is logged and ignored rather than guessed.
its source event ID; there is no per-row unique-source-event constraint.
identity incarnation. Imported historical request events do not create or
resolve actionable requests.
client snapshot/delivery cursors that ATT-03 will define.
No RPC, inbox, client notification, relay dependency, seen/ack state or
provider-loss heuristic was introduced. All seven providers continue through
their existing canonical ingestion mappings. Capabilities that emit no request
produce no invented attention.
Proof and scope
97 focused cases passed across seven contract, current-state, pipeline,
engine, audit and migration files. Coverage includes independent requests,
stale/ambiguous replies, multi-row reverts, deletion/recreation, import, cursor
monotonicity, rollback/retry, bounded paging, disk reopen and exact rebuild.
Existing transaction and audit regressions remain green.
Server/contracts typechecks, changed-source lint and server bundle passed.
Upstream-only, legacy shared-ledger and established fork-ledger upgrades
preserve existing audit data/cursor and the prior migration records. New fork
IDs cannot be mistaken for the historical upstream 44/45 collisions.
All five maintained roots verify and the DAG has zero violations. Verification
exposed a retired Windows-portability test record's obsolete hard dependency
on the fork Foundation. The retirement audit flagged dependency cleanup;
that edge was removed, while the already-upstreamed state, reachable
satisfied_bySHA and historical source artifacts were preserved.No live database was opened or migrated, no browser was launched and no
packaged-platform claim is made for this new backend slice. The earlier
qualified stable source and published Windows handoff remain unchanged.
No push or PR was created.
Next
ATT-02 / #4 can now become ready: add authoritative thread awareness,
completion/failure/disconnect state and their exact resolving transitions.
ATT-03 / #5 remains blocked by #4; this slice does not prematurely expose the
current projection before those lifecycle rules exist.
Model/harness: GPT-6 Astra (
gpt-6-astra), GitHub Copilot CLI. No subagents ortpatch provider inference were used.