Repository navigation
[ATT-02] Project thread awareness and lifecycle failures #4
Description
ID: ATT-02 (F-002). Priority: P0. Dependency: #3 (complete). Backlog: #1.
Implemented locally on phase2/thread-awareness: source
21de9d720132e7f62051f26a52162a61593cd08f, complete Foundation attestation
ddd548eeee6c49e30afd4596a75369d079f73515, clean verified tip
d701ac195d8f7eb35f750e47747bebc073dac545. No push or PR.
The existing Foundation root carries optional bounded lifecycle evidence,
fork migration 47, static failure/disconnect items and saturated summary counts.
Matching turn recovery/completion, intentional stop, revert/delete, late
events and message-mode question preservation are explicit in the source and
the result comment. Legacy/turnless observations without authority stay unknown.
No RPC, client UI or notification delivery is included.
Problem and scope
An approval-only view cannot distinguish running, successful completion,
failure and provider disconnection. Extend the current projection with thread
awareness and authoritative failure/disconnect items, using upstream lifecycle
and awareness events rather than prompt classification.
Decisions and acceptance criteria
- Thread phase covers starting/running/waiting-for-approval/waiting-for-input/
completed/failed/stale. Use bounded counts, not an unbounded array of attention
IDs, in the thread summary. Detail queries enumerate the actual items. - Completion is awareness, not a new unresolved request. It resolves only
obsolete request/disconnect items for the completed turn. - A failed turn opens a failure item; matching authoritative retry/recovery
resolves it. Seen/dismissed state and unrelated turns never silently resolve
another active failure. Define each resolving transition in a table. - Only an environment-observed provider/runtime disconnect during active work
opens canonical disconnect attention. Losing a frontend WebSocket merely
makes that client's cached state stale. - Reconnect resolves a canonical disconnect only when provider/runtime evidence
establishes recovery; lack of an update is not completion. - Reason codes and static/redacted titles are bounded. No prompt-derived truth,
raw errors or commands in awareness payloads. - Tests cover completion, retry, response failure, late/out-of-order events,
actual provider loss, client-only network loss, replay and rebuild.
Coverage and non-goals
Map signals explicitly for Codex, Claude, Cursor, Grok, OpenCode, Antigravity and Copilot.
Keep unsupported observations unknown and reuse current upstream mappings.
All clients and connection modes consume the same environment authority.
No inbox, notification sink, generic polling monitor or relay-owned resolution.
Activity
jdbencardinop commentedon Sep 28, 2026
ATT-02 implemented locally
phase2/thread-awareness21de9d720132e7f62051f26a52162a61593cd08fddd548eeee6c49e30afd4596a75369d079f73515d701ac195d8f7eb35f750e47747bebc073dac5456cc650d507d3ff80e23919d687fbc2920497da5fThe existing
phase1-foundationroot retains the complete 48-path intent,including earlier audit, TWS, work-item contracts, migration bridge and current
request state. No second overlapping maintenance root was added.
Delivered
Accepted provider lifecycle evidence now travels through the existing
server-only session-set command and durable event. It preserves provider
event/instance identity and the originating turn before the ordinary session
snapshot clears that turn. The evidence contains bounded transitions/reasons,
not raw errors, commands or prompts.
The current projector now maintains static failure/disconnect items and
thread-awareness summaries. Summary counts are capped at 999 per kind
with an overflow flag; detail reads remain independently paginated. The
queries inspect at most 1000 open rows per kind instead of enumerating
unbounded attention-ID arrays. Summary revisions change only when visible
summary values change.
Approved resolving transitions
provider_recoveredMessage-mode questions intentionally outlive a native turn. They remain
actionable until canonical answer/dismissal or explicit revert/delete, unlike
obsolete callback requests. This preserves upstream's async-question behavior.
Provider observations are deduplicated transactionally even when separately
persisted events repeat the same originating provider event. Late pre-recovery
timestamps and historical terminal-turn reopens are ignored. Legacy events
without explicit evidence, and observations without enough turn identity,
remain unknown rather than treating generic
readyas success orstoppedas disconnection.
Coverage and migration
Codex, Claude, Cursor, Grok, OpenCode, Antigravity and Copilot reuse the same
canonical ingestion boundary. Their existing normalized turn/session/error
signals are mapped explicitly; absent capabilities produce no fabricated
observation. Adapter implementations and existing relay/client awareness
behavior were not replaced. The shared phase type is reused.
Fork migration 47 adds lifecycle rows, summaries, turn tombstones and
compact provider-observation identities, plus the private callback-resolution
policy. It resets only derived current attention and its cursor, then normal
bootstrap replays persisted events. The immutable audit, original migrations
44/45/46, other cursors and original migration history remain intact.
Failure during upgrade rolls schema changes and reset back together.
258 focused tests passed across nine files, including:
provider loss versus client-only network events and intentional stop;
Server/contracts/shared typechecks, changed-source lint and the server bundle
passed. All five maintained tpatch roots verify; the DAG has zero violations.
Boundaries
No RPC/subscription, inbox UI, notification sink, generic polling monitor,
relay-owned state, native model inference or live-state migration was added.
The tests do not claim a new packaged-platform or live-provider qualification.
The previously qualified stable source and Windows handoff are untouched.
No push or PR was created.
ATT-03 / #5 is next: bounded snapshot/delta synchronization with its own client
delivery cursors, continuity fence and reset rules. It is now unblocked by #3
and #4.
Model/harness: GPT-6 Astra (
gpt-6-astra), GitHub Copilot CLI. No subagents ortpatch provider inference were used.