Orchestrata Ultimate › Plans › p1-p2-remediation-plan

P1/P2 remediation — the whole backlog, in dispatch order

Source: plans/p1-p2-remediation-plan.md at 8a2cb42ad · last changed 2026-08-09 · first committed 2026-08-09 · 109 lines.

Prose pending.

Plan text

P1/P2 remediation — the whole backlog, in dispatch order

Source: context.json deferred_work, open items at priority P1 (18) and P2 (41). Full text was read before planning; the truncated titles in session status hide that several "items" are multi-week programs.

Ordering principle: an item is dispatched when a builder can finish it and prove it. Anything needing a design fork resolved gets a design from the orchestrator FIRST (RUL-022 — no builder/wirer/refactorer dispatch without a contract or an explicit DESIGN_WAIVER:). Anything needing a decision from Mohamed is named here, not silently deferred.

Test standard, every wave: targeted observed runs only (scripts/run_tests_streaming.py, run_in_background: true, RUL-009), each capped at 5 minutes. A wave lands only on: its own modules green, the full scripts/gates.py battery green, mypy clean, audit_test_purity.py at 0. No wave is reported complete on a partial run — scripts/error_report.py labels those now.


Wave 1 — bounded, mechanical, disjoint files (DISPATCH NOW)

Each is one agent, one narrow file set, a stated acceptance test. Scopes are disjoint so they share the checkout without conflicting.

# item scope acceptance
W1.1 P2.14 async-plugin convergence 56 test files carrying @pytest.mark.anyio marks gone; every touched module green; a test-review rule bans re-adding
W1.2 P2.30 OS_ENVIRON_MUTATION debt 17 test files, ~71 violations test_isolation_audit.py reports 0 in those files; each module green
W1.3 P2.37 U:Do has no :Volk node volk KG sync U:Do resolves to a :Volk; regression test that every dispatchable volk has one
W1.4 P2.41 AST snapshot determinism serialize_codebase_ast.py two consecutive regens are byte-identical; 823→full module count explained
W1.5 P2.29 incremental_sync cross-module CALLS knowledge_graph/sync.py partial resync produces the same CALLS edges as a full sync, proven by diff
W1.6 P2.26 File matched by bare path session/kg_context.py, pipeline_kg, context_injector File lookups are project-scoped; cross-project collision test
W1.7 P2.21 unlabeled MATCH (n {id}) knowledge_graph/neo4j_client.py, search.py + callers labeled seek; dbHits drop from ~7.9K to O(index) on a measured query
W1.8 P2.4 generated interface-tests generate_pytest_from_ast.py --package regenerates; signature assertions tolerate **kwargs

Wave 2 — bounded, but each touches a live control path

Dispatched after Wave 1 lands, so a regression has one obvious cause.

# item note
W2.1 P1.13 volk-facing native tools governance question inside it: WHICH volks get repl/worktree/task/remote_trigger. Defaulting to none-but-senior_dev unless overruled.
W2.2 P2.24 Prolog authz for native tools may_stop_task/2, may_access_mcp/3 replace in-process stand-ins
W2.3 P2.22 Postman real governance _query_prolog is a hardcoded False today
W2.4 P1.15 KG-schema SPEC-008 remaining #3 rel constants, #6 HAS_FUNCTION alias (the two that are NOT decision-gated)
W2.5 P2.8 harness/volk defects 4 independent sub-defects, one agent each
W2.6 P2.36 base-class adoption 408 bare classes; audit + allowlist + standards gate
W2.7 P2.32 B5 wiring wave required_predicates before every Prolog consult
W2.8 P2.28 Project MERGE-key split-brain live graph has duplicate Project nodes; ~10 tests pin current behaviour

Wave 3 — programs, decomposed into their own waves

These do not fit one dispatch. Each gets its own sub-plan before any agent runs.

Wave 4 — design first, then dispatch (orchestrator writes the contract)

RUL-022: no builder until the fork is resolved on paper.

Blocked on Mohamed — named, not buried

  1. P2.5 SPEC-028 divergence — spec says U:Cx → claude-sonnet-4-5; spike-profiles.yaml says deepseek-v4-pro (cost). Which is authoritative? Update the spec, or mark profiles authoritative.
  2. P2.11/12/13 Neo4j pool + scaling ladder — N Community containers, RAM sizing on a 31G box, IP rewrites per clone. Needs a go/no-go on fleet growth.
  3. P2.16/17 Incus + Docker deployments — two deployment targets; confirm both are still wanted.
  4. P1.13 tool-exposure governance — which volks may call repl, worktree, task, remote_trigger.
  5. P2.27(d) / P2.28 — Requirement label means two things (trace-tag vs spec::section); converging on slug changes a live graph.

What "done" means here

Per RUL-012, an item closes only when it is built, tested, wired, and committed. Several of these are open precisely because something was built and never wired — cxp WS transport with 0 import sites, five codemod observers emitting nothing, Prometheus scraped by nothing. Those close on the wiring, not the code.