Repository navigation
Conversation
The Turn driver now resolves the settlement identity by scope, so an ordinary request no longer needs a pre-selected Todo: a missing Todo with a valid signature resolves no scoped binding and the plan reports 'blocked' instead of a contract error. That change came with the native Turn settlement binding, and this test still encoded the previous contract, so it failed on main. The test now states the current contract on both sides of the signature: a broken signature stays a contract error, a missing Todo holds the Turn, and neither reaches the Host, writes state or spends quota. The invariants the test was written to protect are asserted in full. No production code, schema, wire or default change. Validation: tests/test_loopx_turn_driver.py 148 passed; loopx canary premerge --from-git-diff green. Signed-off-by: xiaoan17 <anbc1224@gmail.com>
Closing — superseded by #7618I read the regression the wrong way round, and this PR would have cemented it. I concluded that the native Turn settlement binding deliberately replaced the So the existing expectation was right, and this PR's change to it was wrong. The investigation was still useful — it pinned that the failure came from Closing — superseded by #7618I read this regression backwards: the scoped identity change (3ebad9d) broke |
|
Superseded by #7618, which restores the typed missing-lineage contract error in the driver. The existing test expectation was correct; this PR would have cemented the regression. |
Scope
One stale test expectation, and the main-branch breakage it was hiding.
tests/test_loopx_turn_driver.py::test_turn_plan_missing_todo_does_not_bypass_contract_errorsasserted that a Turn whose envelope has no selected Todo is a contract error.
That was the contract before the settlement identity could be resolved by
scope: the driver had no identity for the route, the session binding rejected
the plan, and the route became
contract_error.The native Turn settlement binding changed that deliberately. The driver now
resolves the settlement identity by scope, so an ordinary request no longer
needs a pre-selected Todo, and the missing-Todo branch covers ordinary routes
as well as replans:
A missing Todo with a valid signature now resolves no scoped binding and the
plan reports
blocked. The test still expectedcontract_error, so it failedon
main— and it fails the pytest lane of every open pull request, includingthis repository's own.
Fix
The test now states the current contract on both sides of the signature:
okfalse,contract_error);oktrue,blocked).The invariants the test was written to protect are asserted in full and are
unchanged: the Host is never invoked, no state is written and no quota is
spent, in either case. The test is renamed accordingly, because
does_not_bypass_contract_errorsno longer describes the contract it checks.Validation
tests/test_loopx_turn_driver.py— 148 passedloopx canary premerge --from-git-diff --git-diff-base origin/main— passedNo production code, schema, wire or default change.
Still red on main, resolved elsewhere
tests/architecture/test_control_plane_import_boundaries.py::test_lark_projection_sinks_are_owned_by_the_extension_layeris also red on
main:loopx/capabilities/manager_context/roundtrip.pyimportsloopx.extensions.lark.private_conversations, which the import-boundary policyreserves for the extension layer. #5677 already removes that import, so this
PR does not touch it.
Signed-off-by: xiaoan17 anbc1224@gmail.com