Skip to content

feat(control-plane): register the host-adapter settlement step vocabulary - #7619

Open
xiaoan17 wants to merge 1 commit into
loopx-project:mainfrom
xiaoan17:codex/host-adapter-settlement-step-vocabulary
Open

xiaoan17 wants to merge 1 commit into
loopx-project:mainfrom
xiaoan17:codex/host-adapter-settlement-step-vocabulary

Conversation

@xiaoan17

@xiaoan17 xiaoan17 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Scope

One vocabulary gets a typed owner.

The TypeScript host owner authors an ordered provider plan and the Python
transport validates the plan it receives against the same sequence, but the two
sequences were private hand-kept copies:

  • loopx/control_plane/turn_driver/host_todo_completion.ts — a module-local const STEP_KINDS
  • loopx/control_plane/host_adapter_settlement.py — a module-local _STEP_KINDS

Neither was exported, so the semantic inventory could not see either carrier, and
neither loopx/semantics/vocabulary_v0.json nor the drift smoke could tie them
together. A divergence between them would have surfaced at runtime as
TypeScript host provider step order mismatch, after the plan had already been
accepted and partly executed. The C4.3 settlement vocabulary confirmation
recorded exactly this gap.

What changes

  • Both sequences become exported owners of a new cross-runtime vocabulary,
    host_adapter_settlement_step_kind, so the drift smoke checks each of them
    against the registry on every run.
  • The vocabulary is deliberately distinct from settlement_step_kind: that
    one names the turn settlement phases, whose validation phase is never
    executed, while every kind here is a command the host adapter runs. The
    registry meaning records that difference, so the two are no longer
    confusable.
  • The two owners keep different names per runtime, so no new multi-value twin
    appears: multi_value_twins stays 8/8 and every inventory budget is
    unchanged. Only the coverage floor grows, 28 → 29 vocabularies and 54 → 56
    owner symbols, in the registry and its anchor in the same diff.
  • New tests pin the two runtimes against each other directly, and prove the
    transport still refuses a plan whose step order drifts (that tripwire had no
    test).

Evidence

  • examples/semantic-vocabulary-drift-smoke.py → ok, coverage=vocabularies:29/29, owner_symbols:56/56, multi_value_twins=8/8, conflicting_values=16/16 — no
    budget moved.
  • The diff-scoped advisory now sees both carriers, which it did not before, and
    points each at the new vocabulary:
    reuse hint: host_adapter_settlement_step_kind (exact_values) plus
    settlement_step_kind (overlapping_values) — the C4.3 overlap is now a
    machine-visible hint instead of prose.
  • Semantic inventory, production and drift test suites pass; the MCP
    settlement, host vision and machine guard suites pass; the TypeScript host
    todo completion test passes (15) and the control plane typechecks.
  • loopx canary premerge --from-git-diff --git-diff-base 2a2323756 green
    (19 checks, 0 failures), surfaces control_plane, docs_project_content, public_boundary, python.

Coordination

#5677 extends this same vocabulary: it adds delivery_context and
direction_context to both carriers and rewrites the surrounding plan schema.
Whichever of the two PRs merges second must add those two values to the
registry entry (and its glossary row), because the registry values are what the
drift smoke checks the carriers against. This PR does not add them, because
they do not exist on this branch.

Unrelated observation

tests/architecture/test_semantic_production.py::test_real_return_producer_rejects_an_unregistered_result[turn_route-…driver.py-return LoopXTurnRoute.CONTRACT_ERROR]
already fails on main (2a2323756) — the registry still names a turn_route
return producer whose literal driver.py no longer carries. PR #7621 carries
that fix; this PR does not touch it.

Signed-off-by: xiaoan17 anbc1224@gmail.com

@xiaoan17
xiaoan17 force-pushed the codex/host-adapter-settlement-step-vocabulary branch 2 times, most recently from b6483e4 to 6bd36e9 Compare October 29, 2026 07:12
…lary

The TypeScript host owner authors an ordered provider plan and the Python
transport validates the plan it receives against the same sequence, but
the two sequences were private hand-kept copies: a module-local const in
host_todo_completion.ts and a module-local _STEP_KINDS in
host_adapter_settlement.py. Neither was exported, so the semantic
inventory could not see either carrier, neither the vocabulary registry
nor the drift smoke could tie them together, and a divergence would have
surfaced at runtime as "TypeScript host provider step order mismatch"
after the plan had already been accepted and partly executed.

Both sequences are now registered owners of the new cross-runtime
vocabulary host_adapter_settlement_step_kind, so the drift smoke checks
each of them against the registry on every run. The vocabulary is
deliberately distinct from settlement_step_kind: that one names the turn
settlement phases, whose validation phase is never executed, while every
kind here is a command the host adapter runs. The registry meaning
records that difference.

The two owners keep different names per runtime, so no new multi-value
twin appears: multi_value_twins stays 8/8 and every inventory budget is
unchanged. Only the coverage floor grows, 28 to 29 vocabularies and 54
to 56 owner symbols, in the registry and its anchor together.

New tests pin the two runtimes against each other directly and prove the
transport still refuses a plan whose step order drifts.

Validation: semantic-vocabulary-drift-smoke ok; the diff-scoped semantic
advisory now sees both carriers and points them at the new vocabulary;
semantic inventory, production and drift test suites pass; the MCP
settlement, host vision and machine guard suites pass; the TypeScript
host todo completion test passes and the control plane typechecks; loopx
canary premerge --from-git-diff green.

Signed-off-by: xiaoan17 <anbc1224@gmail.com>
@xiaoan17
xiaoan17 force-pushed the codex/host-adapter-settlement-step-vocabulary branch from 6bd36e9 to 83e0b55 Compare October 29, 2026 08:12

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant