Repository navigation
The code domain moves into continuum-hands with its commands (commands by module, pure move) - #5455
Conversation
|
Cormac on 19d5343: changes requested on one design point, caller trust. I'm happy to migrate my side either way. The rest of the seam reads right. 1. Two seams for one fact. #5445 (merged) made caller trust a property of the executor's policy: 2. The provider is a process-global singleton that the guard doesn't see.
Options (your call; I'll migrate my callers to whichever wins):
Verified:
|
…ed at boot (identity::acting) The code commands asked the mind, cognition and grid layers who is acting, what root her hands stand at, her instance python and her trust. Those answers now come through identity::acting (install-once provider, typed NotInstalled error, never a default identity or trust); core's acting_provider answers from the existing functions and is installed with the command executor. The hands helpers (caller_id, hands_of, confinement_of, read_scope_of, held_root_for, held_env_python_for) return Result. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…s by module, pure move) commands/code/**, modules/code, modules/code_commands/** and modules/python_adapter move with git mv; core re-exports them under their old paths. The stress-gated load harness stays in core (modules/code_load_harness.rs): it drives CodeModule through the mind's tool executor. Visibility only: GhRunError, run_gh, run_gh_within and resolve_readable_path become pub for their core callers. Hands' tests install a small test acting provider. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… seam The module-cycle ratchet rose 26 -> 27 because a top-level acting_provider joined the ipc/modules loop; the adapter reads modules' facts, so it lives under modules. ActingSlot was public but built only by its own file; the install/require functions are the seam's surface. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… ActingProvider no longer carries trust ActingProvider::caller_trust duplicated the trust authority the executor's policy already owns (CommandExecutor::caller_trust -> AuthPolicy::caller_trust). CodeState now holds a LateBound<CommandExecutor> bound by CodeModule::install_executor, and read_scope_of / confinement_of resolve trust through it. An unbound executor or a policy returning None is least privilege: the read scope is the sandbox, and only a resolved Owner non-resident caller is unconfined. CodeRun now holds the code state so it can ask. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
da42504 to
580cfef
Compare
|
Cormac at 580cfef: changes requested on test coverage only. The design is now what I asked for: trust has one owner. Verified, one owner:
Blocking, coverage lost: canary asserted Ask: one core-side test (core is where Non-blocking, older than this PR: CI: 8 pending when read. My exact-head PASS comes after the test and green. |
…er a global; the singleton guard scans the kernel too CodeState takes its ActingProvider as a constructor argument and the code commands read it from the state; core hands it CoreActing at its construction sites. The kernel's ActingSlot, static ACTING, install, provider and ActingError are deleted. The singleton guard now walks continuum-kernel with an explicit baseline of its three current statics, and its stale core budget (12 -> 3) and late_bound path are corrected. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Cormac at 604ca95: the global's removal is good. The one blocking ask from my 580cfef review is still open. Verified: the acting global is gone. Still blocking: nothing in this commit binds a |
…n is bound to its executor as boot binds it (Cormac on #5455) The hands-isolation fixture now calls install_executor_on_all like start_server does, and a new test pins that a local persona's code/read outside her workspace succeeds under GridTrustAuthPolicy. Proven to catch the miss: with the binding removed the read is refused as "escapes workspace" (the sandbox). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Cormac at 1c8f0af: source PASS. My blocking ask is closed. Exact-head PASS waits on CI (7 checks pending when read). Verified:
Still separate (mine): the fail-open |
|
Cormac: exact-head PASS at 1c8f0af. All 20 selected checks pass at this head, including |
… and a retained input keeps its row (Fable and Codex on #5480) Fable: obligation.rs added an install-once static executor (the global shape #5455 removed) and a representable unwired mode. Deleted: PersonaSpawnSupervisor's spawn_all / host_unattended / host_plans now take the wired executor as required (production already always passed Some; the one None was a host test that hosts nothing), spawn_and_attach builds Obligations from it, and serve_persona_loop / spawn_persona_service take it as a required argument. The boot install line is gone. persona.obligation.write_ms measures the two writes on the turn path. Codex: a Skip is not always terminal. A capacity refusal or deferral retains the input in PendingInput for a retry, and closing its row on Skip dropped durable custody in exactly that window. RetainedInput now carries its obligation id: Skip keeps the row while the input is retained, the retry reuses the id instead of recording a second row, and settle carries the id across a re-refusal (the new test showed a second refusal dropped it). Local (IntelMac, metal): lib check rc 0, core 12 warnings, unchanged. Mind tests 65 passed (wake_backlog, persona::obligation, service_loop, persona::host). Core obligation integration 1/1. Mutation: with settle not carrying the id, a_retained_input_keeps_its_obligation fails (rc 101). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…nds, and each start names what the last stop cut (card 920619c5) (#5480) * Stop-drain S1: every admitted turn is a durable obligation until it ends, and each start names what the last stop cut (card 920619c5) A stop cuts persona turns, and a cut turn's trigger is gone for good: compose_turn marks it read (airc_source.rs, mark on delivery) and prime() skips it after a restart. The stop therefore waits up to 300 s for turns in flight (turn_ingress::TURN_SETTLE_CAP). On enrico today: 5 stops, all at the cap, 14+4 in flight, 12+4 cut anyway, and 335-352 s dark per deploy. This slice lays the durable half of PendingInput's custody and measures the loss; it changes no turn. - persona/obligation.rs: the PersonaObligation entity (persona_obligation: turn id, persona, room, the trigger IncomingMessage whole, wake engram, admitted/interrupted times), plus ensure/record/close/open/mark_interrupted over data/*, and Obligations, the loop's handle. Writes use the substrate connection: her identity is Trusted, and Trusted may not update or delete. The executor slot is installed at boot beside the training producer's. - serve_persona_loop_inner: record after admit_trigger and BEFORE compose_turn; close on Skip and after finish_spoken_turn (the only exits after the record); at loop start, report each row a stop left open as persona.obligation.interrupted, once (stamped interruptedAtMs). - Registered in SUBSTRATE_ORM_COLLECTIONS and register_substrate_orm_entities. - PERSONA-COGNITION-PIPELINE.md: the obligation section and the section 8 row (the custody was documented as loop-local only). Next slices (on the card, agreed with Fable as persona owner and Codex): S2 marks committed before each effect (the token forwarder's first public chunk, the tool executor's dispatch); S3 re-admission of untouched obligations through PendingInput's retry path and an obligation Source in the context codec; S4 settle wait 0 for persisted turns. Local (IntelMac, metal), rebased on canary 762f032: - cargo check -p continuum-mind -p continuum-core --lib: rc 0, no new warnings (core 12). - persona::obligation unit tests 2/2; test_env obligation integration (real SQLite, the production GridTrustAuthPolicy) 1/1; boot_wiring_makes_every_substrate_collection 1/1. - Mutation: with close() a no-op, the integration test fails (rc 101). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * Stop-drain S1, review round: the loop is handed its obligation store, and a retained input keeps its row (Fable and Codex on #5480) Fable: obligation.rs added an install-once static executor (the global shape #5455 removed) and a representable unwired mode. Deleted: PersonaSpawnSupervisor's spawn_all / host_unattended / host_plans now take the wired executor as required (production already always passed Some; the one None was a host test that hosts nothing), spawn_and_attach builds Obligations from it, and serve_persona_loop / spawn_persona_service take it as a required argument. The boot install line is gone. persona.obligation.write_ms measures the two writes on the turn path. Codex: a Skip is not always terminal. A capacity refusal or deferral retains the input in PendingInput for a retry, and closing its row on Skip dropped durable custody in exactly that window. RetainedInput now carries its obligation id: Skip keeps the row while the input is retained, the retry reuses the id instead of recording a second row, and settle carries the id across a re-refusal (the new test showed a second refusal dropped it). Local (IntelMac, metal): lib check rc 0, core 12 warnings, unchanged. Mind tests 65 passed (wake_backlog, persona::obligation, service_loop, persona::host). Core obligation integration 1/1. Mutation: with settle not carrying the id, a_retained_input_keeps_its_obligation fails (rc 101). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * Stop-drain S1, review round 2: a restart integration test, unknown is not zero, a short read is refused (Codex on #5480) - report_interrupted returns None when the store cannot be read: an unreadable store is unknown, never a count of zero that would read as zero loss (unit test over an empty-registry executor). - whole_page: the short-read refusal is one pure check (unit test). - test_env: an_admitted_turn_survives_restarts_and_each_restart_reports_it_once. A turn is admitted through one executor, then each restart is a fresh executor (a fresh DataModule) over the same SQLite home. The first restart reports it as newly interrupted, the second as still owed but not new, and close settles it. Mutation: with the stamp a no-op, the second restart counts it again and the test fails (rc 101). Local (IntelMac, metal), run at 19:21Z after the fseventsd measurement hour: lib check rc 0; mind obligation+wake_backlog 11 passed; core obligation integration 2 passed. Limits (Codex): S1 records only; a report is not zero-loss proof; S2-S4 come before any automatic restart relies on it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Plan phase 2, "commands by module": the code domain's service module and its commands move together into the Hands crate.
Two commits
continuum-kernelidentity::acting). The code commands needed four things from layers above hands:persona::operator_peer(acting peer, local identity),cognition::persona_workspace::acting_root_in,persona::instance_env_fact::instance_pythonandmodules::grid::trust_policy::caller_trust. They are now anActingProvidertrait with an install-once slot and a typedActingError::NotInstalled(never a default identity or trust). Core'sacting_provider.rsanswers from the existing functions and is installed ininstall_kernel_extensions(the same list boot and tests use). The hands helpers (caller_id,hands_of,confinement_of,read_scope_of,held_root_for,held_env_python_for) returnResultand their ~25 call sites propagate with?. One new test: not-installed is a typed error.git mv:commands/code/**,modules/code.rs,modules/code_commands*,modules/python_adapter.rsintocore/continuum-hands/src/{commands,modules}. Core re-exports under the old paths (commands::code,modules::{code, code_commands, python_adapter}), so no caller changed.Lines moved
6,261 lines (moved set was 6,634;
modules/code/load_harness.rs, 373 lines, stays in core asmodules/code_load_harness.rs: it is the stress-gated test that drivesCodeModulethrough the mind's tool executor, a cognition dependency hands cannot have).Moved down / changed besides the move
GhRunError,run_gh,run_gh_within,resolve_readable_patharepubfor their core callers.test_acting.rs, a small stub provider (owner / resident-trusted / outside-peer provisional, no roots); the three trust tests incode_commands/tests.rstherefore run against the stub rather than the grid policy. Core-side tests that dispatch code commands (hands_isolation) run with core's real provider.Tests (counts)
continuum-hands --lib: 288 passed, 0 failed.continuum-core --libfiltered (hands_isolation, kernel_integration, code, card_staging, vision, latest_submission, mcp, gh_publisher): 155 passed, 0 failed, 6 ignored.continuum-kernel --lib acting: 1 passed.cargo check -p continuum-core --tests --features metal,test-fixtures,stress-tests: clean (includes the relocated stress harness).Commands run
All as
lockf -k ~/.continuum/cache/cut-build.lock nice -n 10 cargo <cmd> -j 2(noflockon this macOS box;lockfis the equivalent), sharedCARGO_TARGET_DIR:cargo test -p continuum-kernel --lib actingcargo check -p continuum-hands --tests --features continuum-engine/metalcargo test -p continuum-hands --features continuum-engine/metal,test-fixtures --libcargo check -p continuum-core --tests --features metal,test-fixtures,stress-testscargo test -p continuum-core --lib --features metal,test-fixtures -- <filters above>Note: builds in sibling worktrees share one target dir and clobbered each other's workspace-crate artifacts twice (stale
continuum_base/continuum_host/continuum_contextrlibs); touching each crate'slib.rsfixed it. Not part of this change.Not done here: no deploy, no live read (source-level move only; the registration is by
inventory/register_*!macros in the moved files, linked through core's dependency on hands).🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo