Components refactor (ADR-0103): work done vs work remaining to merge — 2026-10-17

For: Mohamed's review. Nothing continues until he has reviewed it. Measured: 2026-10-17, between 16:20 and 16:50, on wt-COMPONENTS @ 5da55475b (branch components). Section 9 lists the command behind every number. Where something was not measured, the report says "not measured" or "unknown".


0. Bottom line


1. What "merged" means (the target this report measures against)

From the components design §1, ruled by Mohamed on 2026-10-14 ("long-lived components branch"):

Cut-over: when the integration component passes the fleet tier on components with every old package removed, components merges to master and /opt/orchestrata is shipped from it.

Per component, the definition of done comes from the execution plan §7 (plans/adr-0103-lift-oracle-execution-plan.md):

ADR-0103 is still Accepted (probationary). POC criterion 5 (conformance to target.mmd) is blocked on codetools V1 (AD-64), and no later entry lifts the probation.

master = origin/master = e57782ea4 (2026-10-13), the same commit as frozen. master has not moved, so the merge has no drift to absorb today.


2. Where each component stands

Component Source files on disk (committed) Fresh-process import Landing outcome (latest wave) Clean-target waves done Clean-target work NOT done
contracts 398 (398) 398 / 398 landed (P2-E/P2-F, 2026-10-16) E1 landing; R1 LlmProfilePort; R2 VolkRuntimeProtocol; C-81 six injection protocols (AD-101) PROLOG_RULES_DIR defect (§5 F1)
governance 254 (254) 254 / 254 identical 248, updated 5; codemod refused 4 G1: 10 T4 globals immutabilized, parity PASS 10; AD-81/AD-104/AD-105 regions; G-FS region G2: the 3 copies of _AsyncClientRedisStateManager are not merged into one; 7 unbound TYPE_CHECKING names
knowledge_graph 161 (161) 161 / 161 identical 139, updated 20, stopped 1, refused-but-landed-faithful 1 G1 to G3 ran in the wave (14 T4 transformed, parity PASS 14) conversation_consumer.py stopped (imports frozen core.redis_factory); G4's moves land at integration intake; 2 unbound TC names
kernel 411 (411) 411 / 411 identical 389, updated 19; codemod refused 7 K1 to K4: 41 T4 transformed (parity PASS 41); K3 regions for the D-N10 roster, the session-controller factory and the verification gate (AD-102, AD-103) AGENT_CLASS_MAP deferred to integration; 4 unbound TC names
session 59 (59) 59 / 59 identical 55, updated 4; residue 0 S1 to S3 (6 T4 transformed, parity PASS 6) none measured
gateway 73 (73) 73 / 73 identical 69, updated 2, stopped 2, resolved by hand seams GW-35 and GW-36; GW-MT region J1 intake, J2 codemod (9 T4, parity PASS 9), J3's R2 rewrite 0 parity tests generated; GW-35/36 are not regions, so a re-lift reverts them; N4 mint_gateway_token moves at integration
volks 283 (1: only __init__) 271 / 283 identical 267, new 8, updated 5, stopped 5 (one, spec_completeness, since fixed by VK-143) K1 intake (AD-94 to AD-108); K2 codemod (32 T4, parity PASS 32); AD-118 placement uncommitted landing; 4 stopped modules; 43 codemod refusals (residue); K3 R3 injection: VK-11, VK-16 and VK-106 open (VK-143 verified, uncommitted); K4 public get_config() absent (only _get_config exists)
integration 0 — not started none L1 intake, L2 codemod, L3 wiring: everything (§4c)
tools — — ruled 2026-10-14: no packages/tools; codetools stands in its place — the codetools releases integration needs (§4d)
plugin — — separate packaging track (§2.9), not a realize component — outside this report's merge path; it is the session goal's installer

Volks's 12 import failures are all cascades:

Both modules contain a bare import orchestrata_ultimate that nobody has read yet.


3. Work done

Timeline (wt-COMPONENTS, 327 commits since e57782ea4: 1 on 10-14, 40 on 10-15, 105 on 10-16, 181 on 10-17):

When What Record
10-14 to 10-15 night Phase D designs. The night swarm produced about 32 contracts classes; its lessons drove the pivot. AD-1 to AD-62; lessons.md
10-15 ADR-0103: the byte-faithful lift is the parity oracle, the clean target is the deliverable. POC 4 of 5 proven. AD-63, AD-64
10-16 09:12 Grammar freeze: R1, R2, R3, R5, R6 and R7 approved, R4 deferred. 8 of 9 component designs done. AD-65
10-16 Clean targets accepted for all 8 components, with conditions C1 to C4. AD-66 to AD-72
10-16 14:46 to 19:16 Contracts landed (P2-E, P2-F, the C-55 fill). 89357566d … 014b300f2
10-16 19:42 Governance landed as a package. ee6f85355
10-16 evening to 10-17 Homing and placement rules: AD-74 to AD-80 (graph facts injected, canonical_schema split, name homing) and AD-81 (upward LLM and refactor calls injected, Mohamed). AD-74 to AD-81
10-17 night to midday Lift and lander rules: AD-82 to AD-112 (parity lookup, residue modules, replace_text regions, kernel regions, volks and gateway intake). AD-85 and AD-86 ruled by Mohamed at 14:18. AD-82 to AD-112
10-17 14:34 to 15:44 Parity retarget for every component (AD-113 to AD-115); gateway landed (92ef8417d); RPC method table fixed (GW-MT); TYPE_CHECKING imports restored (AD-117, AD-117b); five components re-landed (45c66107e, 43edf941d).
10-17 16:11 Volks classes back at their frozen homes (AD-118). Volks wave v11 applied, uncommitted. VK-143 verified. 9f7ae6f0f

Measured pace (one wave from intake to landing):

Executor spend (dispatch.py status, all runs since the dispatcher existed):

Executor Runs Cost
deepseek 89 $4.77
qwen 12 $19.59
sonnet 20 $16.78
deepseek-pro 1 $0.37
Total 122 $41.51

Of the 122 runs: 101 DONE, 13 FAILED, 8 LOST. Orchestrator (Claude) tokens are not counted here.

Deterministic tooling built (lift-poc):

Every landing is reproducible from frozen plus data (regions.json, f2-placement.json, land-pins.json), except the three hand seams listed in §5 F6.


4. Remaining, in merge order

4a. In flight right now (uncommitted or blocked)

  1. AD-119 (secrets gate):
    • the brief is committed (5da55475b) and has not been dispatched;
    • you may re-rule it, because I wrongly told you no per-line waiver exists (D1).
  2. Volks landing commit:
    • 282 files plus 5 lift-poc files, including VK-143's verified spec_completeness.py and import_each.py;
    • blocked by item 1.
  3. Decisions-log entries owed:
    • AD-119 and your ruling;
    • the correction about the # gate-ok: waiver;
    • VK-143's verification;
    • your coordinator ruling of today;
    • the volks landing commit.

4b. Per component, to reach the execution plan §7 definition of done

Component Remaining items
contracts F1 PROLOG_RULES_DIR (§5). Run its parity tests (123 modules).
governance G2 (merge the duplicate class into one definition, parity-gated). Disposition the 7 unbound TC names. Run the parity tests (82 modules).
knowledge_graph A seam for conversation_consumer.py: an injected Redis factory, or a move. Disposition the 2 unbound names. Run the parity tests (60 modules).
kernel Disposition the 4 unbound names. Run the parity tests (149 modules). AGENT_CLASS_MAP is wired at integration.
session Run the parity tests (39 modules).
gateway Generate the parity fixtures and tests (none exist). Make GW-35 and GW-36 replace_text regions. Run the tests.
volks Commit the landing. Stopped modules, each its own brief: codedirector/volk and architect/volk (bare import orchestrata_ultimate), tool_executor (VK-11/16), codedirector/implementation (codetools AST callables). VK-106. K4 public get_config() (declared delta C1). F2 _SPECS_DIR (§5). Triage the 43 codemod refusals. Run the parity tests (110 modules).

Two items apply to every component and have not been measured:

4c. Integration (the DAG sink; AD-72 says it runs last)

4d. Codetools (separate repo, consumed by release id)

The state of the codetools repo was not measured for this report.

4e. Verification never run on the landed code

Check State
Parity tests, per component Not run since AD-82 (02:00). Fixture lookup fixed since; result unknown.
Contract kit (behavioural conformance, "wave 2, TESTED") Not started in any component (D4).
Conformance to target.mmd (POC-5) Blocked on codetools V1.
ruff, black, mypy per package Not measured.
Fleet-tier suite and an authoritative RUL-032 run Need integration.

4f. Cut-over and merge

  1. Remove the old monolith from components: src/orchestrata_ultimate (913 modules), tests/ (1,985 test modules) and the 181 top-level scripts/*.py, which move to codetools or integration (design §2.8, §2.10). Each removal waits until integration uses the package.
  2. Decide the fate of the old test suite (D3).
  3. Merge components → master (one merge, per the 2026-10-14 ruling). Then dev → test → promote → deploy to /opt/orchestrata, with verify.
  4. Run worktrees.py gc for components.

5. Open findings (measured, not dispositioned)

# Finding Where
F1 PROLOG_RULES_DIR points at a directory that does not exist. The rulebases are in orchestrata_governance/prolog/ (29 files), and contracts may not import governance. This is a placement question; measure every consumer first. contracts env/infra_config
F2 _SPECS_DIR climbs to packages/volks/specs, where frozen reached the repo's specs/. Whether volks reads the shared spec corpus is a design question. volks verification/spec_completeness
F3 13 TYPE_CHECKING names are unbound: 11 have homes outside the component's DAG, and 2 kernel names are not under a bare guard. governance 7, kg 2, kernel 4
F4 codedirector/volk and architect/volk contain a bare import orchestrata_ultimate, not yet read. Together they cascade to 12 import failures. volks
F5 Gateway has no parity tests, so its landing is checked by the parity gate only, not by tests. gateway
F6 Hand edits that are not regions (GW-35, GW-36, VK-143) would be reverted by a re-lift. The lander would report them as update rows. gateway, volks
F7 Dead protocols stay by your deferral (R4): VolkProtocol, ISessionManager, ICarryoverManager, IPortfolioManager. contracts

6. Risks


7. Decisions for you (each with my recommendation)


8. Process correction (your ruling, 2026-10-17)

Your words: "I notice you are not following our process with tmux. deepseek, qwen and sonnet to do the work while you coordinate, that must stop and you must go back to the role of coordinator."

What I had been doing myself:

From now on:


9. Sources (how each number was measured)

Number Command
Branch and commit counts git rev-list --count origin/master..HEAD (327, behind 0); git log --date=short histogram; git branch -r (no origin/components)
File counts find packages/<c>/src -name '*.py', git ls-files; old tree find src/orchestrata_ultimate tests scripts
Waves lift-poc/component-wave-<c>-report.md § Counts
Landing outcomes lift-poc/land-<c>-record.json (counts, stopped_importers, rows[action=stopped])
Fresh-process import import_each.py <c>, run 2026-10-17 15:44–16:11 (AD-117b, AD-118 entries)
Parity-test history decisions-log AD-82 (unit-test runs 36dd8bd48, 75a2c9b6a); no later run recorded
get_config ast over packages/volks/src/orchestrata_volks/llm/*.py: only _get_config
Spend dispatch.py status, cost summed per executor