Give tab attention persistent request identity and guarded clearing

Merged
TE
7d ago
+339-22

Two identical attention requests can share the same millisecond timestamp. A stale acknowledgement can then clear a replacement mark. Each new mark now carries a persisted, owner-issued opaque request_id, independent of wall time and row lifetime.

tab-attention-request-id-v1 advertises transactional compare-and-clear: tab.update accepts attention:null with the captured attention_request_id. A stale token is a successful no-op returning the current tab. Invalid guards fail validation. The existing unconditional clear remains compatible for legacy callers; new consumers must require the capability and token and never fall back to timestamp matching or unconditional clearing.

Valid pre-token marks acquire an identity once on store open. The JSON addition remains readable by older builds. Risk: upgrading assigns new identities to legacy marks; clients must invalidate cached tokenless actions. No Swift or FFI ABI change is included. Native consumers require the daemon release advertising this capability. The derived app FFI input list excludes all changed paths, so no app FFI release or binary-target repin applies.

Validation at final head f5502f81b211965630e621060a4d741eea02db9d: Linux run 40954356328 passed the workspace/all-targets compile, all 10 attention tests, resource boundary/spec inventory, both Rust adapter clippy and test commands, MCP cancellation, and all 107 release-notary guards. Independent Sol high whole-diff review and primary integration inspection both returned SHIP at that exact head.

The only focused failure is workspace formatting in two unchanged base files (surface_parity.rs and resource/wire_name_tests.rs). Focused baseline 40956888289 runs the same command on base 6fbb57eb3ff3da62aa1f2443db0213782c1e2c88 and reproduces those exact diffs. It also reproduces the hosted No-SwiftUI diagnostics for HomeChatColorsPanel.swift and HomeChatColorsView.swift; the other continuing checks execute. Neither failure comes from this PR. No native UI or FFI artifact changes are included.

Agent session: agent session