Repository navigation
docs(target-arch): v2 — side-effect handling reframed to retry-with-trace + tool-side gates - #1404
Merged
Merged
Conversation
…ace + tool-side gates Replace TARGET_ARCHITECTURE.md with v2 (Direction B); archive v1. - Side-effect handling reframed from effect-key universal sink coverage (Direction A) to retry-with-prior-trace recovery + deterministic tool-side gates on capability-confined irreversible rails (Direction B). - Gate the effect, not the agent: read-only + reversible + confined-irreversible agents can default on now; only irreversible-un-confineable effects wait. - No synchronous user gates — the human gate is the async operator queue (#1402); agents fire-and-park. - Reconciled with the tracker: #1401 (recovery trace + injection) and #1402 (async operator-queue human-gate lever) filed under #1081; #1084 (Direction A) awaits re-scope; the tool-side confined-rail gate is not yet filed; trace fidelity depends on the open #548/#333 reader-race family. - Archive v1 -> docs/archive/plans/TARGET_ARCHITECTURE_v1_2026-06-06.md (superseded banner). - Add design notes: EFFECT_IDEMPOTENCY_DIRECTION_B_RETRY_CONTEXT.md, EFFECT_IDEMPOTENCY_1084_REVIEW_NOTE.md. - Bump CLAUDE.md Memory Files pointer to v2. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
obasilakis
enabled auto-merge (squash)
July 1, 2026 12:04
Minimal pointer notes aligning stale "#1084 is the gate" / {execution_id}:{effect_ordinal} framing with TARGET_ARCHITECTURE.md v2 (Direction B — retry-with-trace + tool-side gates, gating per-effect not per-agent). The shipped effect_guard mechanism description is unchanged; only forward-looking "the gate / per-agent default-on" claims get a v2 pointer. - docs/memory/feature-flows.md — index row - docs/memory/architecture.md — effect-scoped extension (target-direction note) - docs/memory/requirements.md — pull-mode gate note - docs/memory/feature-flows/effect-idempotency.md — reframed note - docs/planning/PULL_PILOT_946_SOAK.md — "(the gate)" descriptor - docs/planning/TRANSACTIONAL_EXECUTIONS_2026-06.md — stale :482 line ref + "the gate" - docs/planning/ACTOR_MODEL_POSTCARD.md — ordinal-key + universal-sink framing - docs/planning/ORCHESTRATION_BUG_META_ANALYSIS_2026-06.md — one dated banner (body unchanged, point-in-time snapshot) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…blic-repo hygiene) The DGX Sparky reference embedded a personal absolute path (`~/Dropbox/Agents/dgx/sparky-ui/`) in a world-visible doc. Replaced with a non-path descriptor. Pre-existing; surfaced during the target-arch v2 doc pass. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
obasilakis
approved these changes
Jul 1, 2026
10 tasks
vybe
pushed a commit
that referenced
this pull request
Sep 10, 2026
…rseded planning docs (#2657) * docs(pull): one entry point for the pull migration — delete five superseded planning docs The migration's state lived across eleven planning/testing documents plus the tracker, and they had drifted apart. Five of them were finished work that was never retired: they were last touched on 2026-07-08, the day the Phase 0-3 PR merged, and their conclusions had already been folded into TARGET_ARCHITECTURE.md. Leaving them in the tree is not free. EFFECT_IDEMPOTENCY_DIRECTION_B_RETRY_CONTEXT.md is a *proposal* whose content was adopted into the spec; it frames the fail-closed execution_id policy as an open question, while the spec states it as settled. A reader who finds the proposal first concludes the policy is undecided and re-opens a closed decision. That happened, and it cost a full review cycle. Deleted (git retains them; nothing in tests, CI or scripts referenced any of them): PULL_PILOT_946_SOAK.md #946 closed; the decision record was never filled in - it is a blank scaffold EFFECT_IDEMPOTENCY_1084_REVIEW_NOTE.md #1084 closed; reviews Direction A, retired EFFECT_IDEMPOTENCY_DIRECTION_B_RETRY_CONTEXT adopted into TARGET_ARCHITECTURE.md (#1404) ORCHESTRATION_BUG_META_ANALYSIS_2026-06.md its own §5 is titled "applied 2026-06-06"; the spec header records the three changes TRANSACTIONAL_EXECUTIONS_2026-06.md June planning artifact, nothing points at it Archiving rather than deleting was considered and rejected: an archived file is still in the working tree, still grepped, still loaded into an agent's context, and still read by someone who does not scroll up to the "superseded" header - which is the exact failure mode above. Git history is the durable copy. PULL_MIGRATION_STATUS.md is rewritten as the entry point and verified against dev and the tracker. It was materially wrong: Phase 4 read "not started" (it is built and in review), #1401/#1402 read "not yet built" (closed in July), and it named a branch that no longer exists. It now also carries two things that were recorded nowhere - the trigger reach table (six of nine on dev, nine with Phase 4), and the behaviour the loop and fan-out rewrites change on installs with an EMPTY pilot allowlist, which is not flag-gated and is operator-visible. Corrected across the surviving docs: - The Phase-5 ">=2-week zero-orphan soak" bar was cited to #856 in four places. #856 sets no such bar - it is a closed spike on multi-agent fleet stability and does not mention duration, orphans or pull. The figure originates in #429's gating condition for #306 (the event bus, closed 2026-04-21) and was carried over. #1766's own criterion asks for "several days". Flagged for deliberate re-derivation rather than silently re-fixed. - T6.3 now states that the fail-closed policy is DECIDED in the spec and that #2392 is the build, not the decision. - M5 records the first end-to-end observation of lease expiry, re-delivery and poison-park outside the 2026-07-08 synthetic pilot (2026-09-09, local PG, forced fault): re-delivery preserved the execution id and recovered the work on a different worker, and killing on every claim walked the counter to the cap and parked it with a high-priority operator alert. Every production window so far has reported redelivery_count=0, which until now was indistinguishable from "untested". The five surviving reference docs get a banner pointing at the status file. Net: eleven documents to six, one entry point. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019Tm7UEkd4G9KQZD5oeLRSa * docs: drop the dangling PULL_PILOT_946_SOAK reference (#2657) The PR deletes docs/planning/PULL_PILOT_946_SOAK.md and already removed this same bullet from MESSAGE_ENVELOPE_SCHEMA.md; the copy in agent-to-agent-collaboration.md's "Reference docs" list was missed because the PR's link verification scoped to docs/planning/, not docs/memory/. Verified: all five files this PR deletes now have zero live (non-archive) references. merge-train: mechanical, per the merge-train note on the PR. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01CswDvc38w7EheWhbbUD4So --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: sim <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces
docs/planning/TARGET_ARCHITECTURE.mdwith v2, archiving v1. The only architectural change is side-effect handling under re-delivery (issue #1084); every other section carries forward unchanged. Docs-only, no code.v1 (Direction A): make re-delivery safe by threading a platform-injected idempotency key through every outbound sink (universal coverage) — a gate that blocked pull default-on for all side-effect agents.
v2 (Direction B): abandon universal sink coverage (the surface is unbounded — the agent's own key /
gh/curl/ any new MCP server) and instead:done/not-done/unknown), write-ahead trace, so the agent recovers from hindsight: continue / verify-before-redo / fail-gracefully.What's in this PR
docs/planning/TARGET_ARCHITECTURE.md— v2 (reconciled with feat: structured recovery trace + injection into re-delivered and subsequent executions #1401 / feat: MAX_REDELIVERY cap + async operator-queue human-gate lever (lease-reaper backstop) #1402 / feat: effect-scoped idempotency keys for outbound side effects #1084 / bug: child processes inherit agent-server stdout pipe → reader thread stuck, false '0 tool calls' failures #548 / bug: agent-server.py develops futex spin loop after days of uptime #333)docs/archive/plans/TARGET_ARCHITECTURE_v1_2026-06-06.md— archived v1 (superseded banner)docs/planning/EFFECT_IDEMPOTENCY_DIRECTION_B_RETRY_CONTEXT.md,…_1084_REVIEW_NOTE.md— design notes / decision trailCLAUDE.md— Memory Files pointer bumped to v2Honest deltas (called out in the doc, not hidden)
Notes
New sub-issues of #1081 filed alongside this: #1401 (recovery trace + injection) and #1402 (async operator-queue human-gate lever), both
status-incubatinguntil v2 is greenlit.🤖 Generated with Claude Code