Skip to content

agenticd architectural-analysis follow-ups (2026-05-21) #34

Closed

Description

@tonibergholm-codento

Tracking issue for the 11 architectural recommendations produced by the 2026-05-21 architectural analysis of crates/agenticd/.

Audit doc: docs/ops/2026-05-21-agenticd-architectural-analysis.md — durable evidence behind each child issue.

Ship order

The audit assigns priority across three tiers; ship in this order:

Must fix before v1.0 (milestone: v1.0, label: must-fix-v1.0)

These three contradict load-bearing ADR claims or break the broken-prompt demo. The audit's executive summary calls all three out by name.

Hardening sprint (label: hardening-sprint, no milestone)

These are real risks but don't block the demo or contradict a load-bearing ADR. Ship in the hardening sprint window between v1.0 ship and v1.1 kickoff.

v1.1 (label: v1.1, no milestone)

These are blocked by other Proposed ADRs or are aesthetic-only. They land when their unblocker lands.

How to read the audit

Each issue body links back to the audit at a specific anchor (#a1, #a2, …) for the full upstream finding chain. The audit captures 7 structural findings (S1–S7), 15 behavioral findings (B1–B15), 13 concurrency findings (C1–C13), 11 risk items (R1–R11), and 12 architectural recommendations (A1–A12, where A12 is intentionally-not-addressed).

What is NOT in this batch

  • System-level concerns (wire-protocol redesign, full async-trait redesign, cross-daemon coordination) — these need their own ADRs and live in ADR-0010 + ADR-0011 (both Proposed; ADR-0010 (wire-protocol error model) + ADR-0011 (ObjectStore async-trait shape) #33). The audit's "System-level concerns deferred" section names them.
  • Findings the analyst marked correct/benign (lock ordering, advisory-lock cancellation safety, panic isolation, content-addressed TOCTOU) — no issues for these; they document strengths.

Activity

  1. tonibergholm commented on May 21, 2026

    @tonibergholm
    Member

    A8 (#37) → PR #46 open. 5 commits on fix/a8-reverse-migration-tx-and-restore-guard. 17 tests pass (10 unit migrate, 4 unit rollback validation, 3 integration against real Postgres). Audit §A8 marked done.

    Remaining must-fix-v1.0:

  2. tonibergholm commented on May 21, 2026

    @tonibergholm
    Member

    A1 (#35) → PR #48 open. Pre-fix the demo's atomic-rollback claim was silently false; post-fix a write-100-rows-during-restore integration test verifies the streamer's view stays consistent with the table.

    Remaining must-fix-v1.0:

  3. tonibergholm commented on May 21, 2026

    @tonibergholm
    Member

    A2 (#36) → PR #50 open. Last of the three must-fix-v1.0 items. After merge, the audit's three must-fix items are all closed.

    Remaining must-fix-v1.0:

    Next up: the hardening-sprint tier (A3-A7), then v1.1 (A9-A11). 8 unit tests for the lifecycle module + 1 for the new refs helper; clippy/fmt clean; A1+A8 integration tests still pass.

  4. tonibergholm commented on Jul 10, 2026

    @tonibergholm
    Member

    Close-out: all 11 recommendations verified landed on main

    Code-grounded verification at main = 75c29de (2026-07-10): each artifact below was confirmed to exist in code, not just in a merged PR description.

    Rec Issue PR(s) Key artifact (evidence) Verdict
    A1 #35 #48 Quiesceable/QuiesceToken agentic-memory/src/triggers.rs:30,40; RestoreGuard + begin_restore/restore_with_guard adapter.rs:54,138,155; TRUNCATE agentic_change_log in restore tx restore.rs:57,116; test tests/integration.rs:246 landed
    A2 #36 #50 Lifecycle agenticd/src/lifecycle.rs:40-92; reconcile_refs_on_startup before bind main.rs:245,269; select!-drain main.rs:308-376; B7 deferred HEAD publish commit.rs:238-247; Refs::list_branches agentic-core/src/refs.rs:137 landed
    A8 #37 #46 outer reverse-migration tx agentic-memory/src/postgres.rs:657-682; restore-guard rejection agenticd/src/rollback/mod.rs:452-454; accept_data_loss wired proto→cli→server→rollback→migrate (agentic-proto/src/lib.rs:82, agenticd/src/migrate.rs:53,106); Postgres integration tests tests/reverse_migration.rs landed
    A3 #38 #52 commit.rs orchestrator with named 2PC phases agenticd/src/commit.rs:57-124; D3 order in agentic-core/src/commit.rs:104-144; server.rs:504 delegates landed
    A4 #39 #51 directory module agenticd/src/rollback/{mod.rs:207, loaders.rs:16-41, writeback.rs:44-205} landed
    A5 #40 #55 spawn_blocking shim agenticd/src/store_async.rs:44-85, call sites commit.rs:154, server.rs:552 — tactical shape as scoped (ADR-0011 successor still Proposed) landed
    A6 #41 #74 (ADR-0010 via #73) structured Response::Error agentic-proto/src/lib.rs:179-187; error mapping agenticd/src/wire_error.rs:30; framing envelope + v0 shim server.rs:351,418,441 landed
    A7 #42 #54 concurrent fingerprinting agenticd/src/mcp.rs:147-153 via stream::iter(...).buffered(FINGERPRINT_CONCURRENCY=8) — deliberate ordered-stream deviation from FuturesUnordered, documented in audit §A7 landed
    A9 #43 #81 + #98 (ADR-0005 via #78) apply_reverse_migrations on trait agentic-memory/src/adapter.rs:167; Option<Arc<dyn MemoryAdapter>> no-mutex agenticd/src/server.rs:70; MemoryBackendSpec membackend.rs:18-27; in-memory rollback e2e tests/rollback_in_memory.rs:52-77 landed
    A10 #44 #75 SegmentManifest::from_canonical_bytes agentic-memory/src/segment.rs:157; loaders route through it agenticd/src/rollback/loaders.rs:41-45 landed
    A11 #45 #77 (ADR-0007 via #76) Refs::snapshot()/RefsSnapshot agentic-core/src/refs.rs:183,219; diff takes snapshot under commit_lock then resolves from frozen map agenticd/src/server.rs:533-536,616-627 landed

    One doc nit found during verification: audit §A1 says RestoreGuard lives in restore.rs; it is defined in adapter.rs:54 (restore.rs consumes it). Code is correct; noting here rather than churning the doc.

    Deferred system-level concerns were split out via #33 into ADR-0010 (Accepted; implemented via #74) and ADR-0011 (Proposed; A5's tactical spawn_blocking shim covers it meanwhile). A12 remains intentionally-not-addressed per the audit (documents strengths / benign findings, not work).

    Audit doc marker sync: #125 (follow-up table's A9 row lagged its section header).

    Closing as completed.

  5. added a commit that references this issue on Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions