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.
- P1.6 coverage back-fill — 103 files under 90%, ~9 waves of 8. Gated by
P1.8:
parallel=truemeans concurrent agents'.coverage.*cross- contaminate, so the final number must come from a clean sequential run. Sequencing P1.8's verification harness FIRST, or every wave's number is suspect. - P1.14 pyright debt — 237 errors / 35 files. Inventory → fix families → codemod the mechanical majority → bounded structural fixes → ratchet to 0.
- P1.3 spec-gap remediation — 106 specs. Per-spec audit (the
auditoragent's designed purpose), findings routed to builders. - P1.2 KG schema audit, P1.4/P1.5/P1.7 AST+codegen program, P1.11 gateway hardening, P1.16/P1.17 T1b/T1c, P1.18 capability integration, P2.1 documentation, P2.39/P2.40 T2/T3.
Wave 4 — design first, then dispatch (orchestrator writes the contract)
RUL-022: no builder until the fork is resolved on paper.
- P1.9 escalation absorption — capability-mesh free-hop routing vs
PipelineRouter's fixedStageSpecsequence. Changes live gateway control flow (server.py:387-401). Explicitly marked "needs design + sign-off". - P1.10 D12 persistence layer — 3 sub-phases, the third an aggregate repository redesign.
- P2.9 VerificationCoordinator —
advance_stepmoves strings and calls none of the verifier trio. Design the real loop per SPEC-007b US-002/003/004. - P2.10 ConstraintEvaluator — implement Prolog-backed evaluation, or descope the parameter and the stated principle honestly. A fork, not a bug.
- P2.6 pipeline resume —
runnever callssave_stagedespite its docstring; no store holds the original intent/work_type. - P2.25 cron daemon, P2.38 AST artifact/cache split, P2.18/19/20 multi-agent bus (three items, one architecture).
Blocked on Mohamed — named, not buried
- P2.5 SPEC-028 divergence — spec says U:Cx →
claude-sonnet-4-5;spike-profiles.yamlsaysdeepseek-v4-pro(cost). Which is authoritative? Update the spec, or mark profiles authoritative. - 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.
- P2.16/17 Incus + Docker deployments — two deployment targets; confirm both are still wanted.
- P1.13 tool-exposure governance — which volks may call
repl,worktree,task,remote_trigger. - P2.27(d) / P2.28 —
Requirementlabel 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.