Skip to content

An owner-only command asks its executor's policy for trust, not the grid module (card 079a9fbb) - #5445

Merged
joelteply merged 1 commit into
canaryfrom
079a9fbb/owner-check-asks-the-executor
Oct 26, 2026
Merged

joelteply merged 1 commit into
canaryfrom
079a9fbb/owner-check-asks-the-executor

Conversation

@joelteply

@joelteply joelteply commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Why (plan phase 2, Joel: "crates are still gigantic"; card 079a9fbb, step 1 of 2a69e6ba)

The training trigger (about 7,900 lines) is leaving continuum-core for a continuum-dreaming crate above continuum-mind. One production coupling made that impossible: policy_recover's owner-only check called modules::grid::trust_policy::caller_trust, which depends on the grid's access policy in core. Codex approved this seam and its constraints in #continuum-dev.

Change

  • AuthPolicy::caller_trust(caller) -> Option<TrustLevel> is the policy's own trust resolution for a handler's check. It defaults to None ("cannot resolve"), which an owner-only handler refuses; it never assumes Owner.
  • AllowAllPolicy resolves only the substrate itself (no caller) and a Local caller as Owner. LocalPersona, Airc, Tcp, Ws and PositronObserver are None.
  • GridTrustAuthPolicy returns the existing static caller_trust, unchanged. The gate's stricter bridge-consulting resolve_trust (operator blocks, the trust bridge) stays the gate's and isn't replaced.
  • CommandExecutor::caller_trust delegates to its policy, which is a struct field. There's no new global, consistent with architecture_no_singleton_state.
  • policy_recover asks this.state.executor. A missing executor, and a policy that can't resolve trust, are both refusals, worded apart from a resolved non-owner.

On Codex's constraints:

  • An unresolvable or missing resolver denies.
  • An absent caller under an installed policy is Owner, while a missing executor is an error.
  • There's no separate install: the policy is set once on the executor at construction (with_policy), before commands are exposed, and it resolves the current policy on every call. So "duplicate install" doesn't arise.

+87 / −2 across four files.

Tested

  • allow_all_resolves_only_the_local_owner (kernel). Ran locally at -j 2: cargo test -p continuum-kernel --lib routing::auth_policy, 11 passed, 259 s on IntelMac.
  • the_policy_resolves_trust_exactly_as_the_static_path (grid): for every caller source, the policy equals the static path. Only the substrate and Local are Owner. A resident resolves below Owner, so she is refused, blocked or not.

Core compiles in CI: a local core build here also builds the vendored llama.cpp from cold.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

…rid module (card 079a9fbb)

Step 1 of the continuum-dreaming cut (card 2a69e6ba). policy_recover's owner-only check called
modules::grid::trust_policy::caller_trust directly, so the training trigger could not leave the
core without dragging the grid's access policy with it.

- AuthPolicy::caller_trust(caller) -> Option<TrustLevel>: the policy's own trust resolution for a
  handler's check. Default None, which an owner-only handler refuses (never assumes Owner).
- AllowAllPolicy resolves only the substrate itself and a Local caller as Owner; every other
  source is None.
- GridTrustAuthPolicy returns the existing static caller_trust, unchanged. The gate's
  bridge-consulting resolve_trust stays the gate's.
- CommandExecutor::caller_trust delegates to its policy, a struct field: no new global.
- policy_recover asks this.state.executor. A missing executor or a policy that cannot resolve
  trust is a refusal, worded apart from a resolved non-owner.

Tests: allow_all_resolves_only_the_local_owner (kernel; ran locally, 11/11 auth_policy tests at
-j 2, 259 s on IntelMac), the_policy_resolves_trust_exactly_as_the_static_path (grid: every source
matches the static path; only the substrate and Local are Owner).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

Review at c709f1b: PASS, source and selected CI independently checked. The existing executor-owned policy supplies the resolver, avoiding another global/bootstrap dependency. The trait default is unresolved; policy_recover denies a missing executor, unresolved trust, and every non-Owner result. Grid delegates to the existing static resolution while its stronger bridge-consulting gate is unchanged. AllowAll resolves only substrate/Local as Owner and refuses remote/persona resolution. Tests cover the caller-source matrix. This clears the dependency seam, not a new claim that all grid authorization paths have been audited. No local build performed by this reviewer.

@joelteply
joelteply merged commit c645b93 into canary Oct 26, 2026
23 checks passed
@joelteply
joelteply deleted the 079a9fbb/owner-check-asks-the-executor branch October 26, 2026 05:18
joelteply added a commit that referenced this pull request Oct 26, 2026
… the owner (card 285c4ed2) (#5451)

* genome/recall/replay asks its executor's policy whether the caller is the owner (card 285c4ed2)

Same seam as #5445. GenomeRecallReplay's owner check called modules::grid::trust_policy::caller_trust,
one of the genome domain's last ties to the core (card 2a69e6ba). It now holds the GenomeModule's
executor and asks executor.caller_trust. A missing executor or an unresolvable policy is not the
owner, so a caller still replays only her own decision; the substrate's own call (no caller) is
unaffected. The existing test keeps its three assertions (another resident refused, the owning
resident allowed, a Local operator allowed) with a default executor, whose AllowAll policy resolves
a Local caller as Owner. +11 / -3.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* genome/recall/replay fails closed: a resolved owner or her own decision, nothing else (Codex on #5451)

The previous check refused only a caller whose peer differed, so no caller plus no executor (or an
unresolvable policy) still replayed. Now replay requires executor.caller_trust == Owner, or a caller
that IS the decision's persona. Regressions: no caller and no executor refused, an operator with no
executor refused, her own decision allowed, an unresolved remote caller refused, the substrate's own
call allowed through the executor.

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]>
joelteply added a commit that referenced this pull request Oct 26, 2026
…commands (card 2a69e6ba)

Plan phase 2 (Joel: "crates are still gigantic"; a domain's service and its commands are one
crate). Dreaming (MODULE-ARCHITECTURE section 9.2) moves out of continuum-core into a new crate
above continuum-mind:

- modules: training_trigger (+ durable/), genome, dataset (+ dataset/), gene_examiner,
  genome_fitness_sentinel
- commands: training_trigger, genome (+ teach, job_*), genome_recall, genome_share, dataset

Pure move: 57 renames (56 byte-identical; genome_share.rs differs by one doc link that named core's
forge). continuum-core re-exports every moved module at its old path
(modules::{...}, commands::{...}), so no caller changes. The crate re-exports continuum_mind::* so
the moved code's crate:: paths resolve, and commands::hf re-exports the academy's (genome_share's
search). Core forwards metal/cuda/vulkan/stress-tests/test-fixtures to it.

The core ties were cut first, each its own PR: #5445 (owner trust via the executor), #5446
(serving_pool_kind to the engine), #5448 (ModuleContext::storage), #5449 (TeacherServing), #5451
(recall replay trust), #5452 (hf to the academy), #5453 (citizen dir to the persona crate), #5454
(genome/push stays with core's forge). Remaining crate:: references to core-only modules: none.

Tests: 144 #[test]/#[tokio::test] in the moved files at canary d8ee2b3, 144 after. No core code
uses a moved #[cfg(test)] helper, and no file include_str!s across the seam.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply added a commit that referenced this pull request Oct 26, 2026
…commands (card 2a69e6ba) (#5456)

* continuum-dreaming: the genome domain leaves continuum-core with its commands (card 2a69e6ba)

Plan phase 2 (Joel: "crates are still gigantic"; a domain's service and its commands are one
crate). Dreaming (MODULE-ARCHITECTURE section 9.2) moves out of continuum-core into a new crate
above continuum-mind:

- modules: training_trigger (+ durable/), genome, dataset (+ dataset/), gene_examiner,
  genome_fitness_sentinel
- commands: training_trigger, genome (+ teach, job_*), genome_recall, genome_share, dataset

Pure move: 57 renames (56 byte-identical; genome_share.rs differs by one doc link that named core's
forge). continuum-core re-exports every moved module at its old path
(modules::{...}, commands::{...}), so no caller changes. The crate re-exports continuum_mind::* so
the moved code's crate:: paths resolve, and commands::hf re-exports the academy's (genome_share's
search). Core forwards metal/cuda/vulkan/stress-tests/test-fixtures to it.

The core ties were cut first, each its own PR: #5445 (owner trust via the executor), #5446
(serving_pool_kind to the engine), #5448 (ModuleContext::storage), #5449 (TeacherServing), #5451
(recall replay trust), #5452 (hf to the academy), #5453 (citizen dir to the persona crate), #5454
(genome/push stays with core's forge). Remaining crate:: references to core-only modules: none.

Tests: 144 #[test]/#[tokio::test] in the moved files at canary d8ee2b3, 144 after. No core code
uses a moved #[cfg(test)] helper, and no file include_str!s across the seam.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* continuum-dreaming builds with core's build script and its 144 tests run in CI (CI and Codex on #5456)

- The moved teach bridge stamps env!("CONTINUUM_BUILD_GIT_SHA"); the crate now uses
  build = "../continuum-core/build.rs", core's script being that identity's one owner, as
  cognition does.
- The CI selector lists continuum-dreaming in TESTED_CRATES (test-fixtures) and the generic
  crate-test step's allowlist, so its moved tests run instead of being selected into nothing. The
  selector tests expect it wherever a change selects the mind it builds on.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* Core calls five continuum-dreaming items across the new crate seam: they are pub (CI on #5456)

lesson_tasks (benchmark_import), GridPeerAdapter and on_grid and GenomeModule::with_teacher_serving
(ai_genome_modules boot), GenomeModule::trains_base_here (grid_capacity). They were pub(crate) while
both sides lived in core; no signature names a private type.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* GenomeModule::lease_executor is pub: core's boot hands it to GridPeerAdapter::on_grid (CI on #5456)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* continuum-dreaming stays audited: it joins MODULE_CRATES and the warning ratchet's crate list (CI and Codex on #5456)

loose_id_guard::no_declaration_outlives_its_defect failed because modules/dataset/dataset_manifest.rs
(room_id, a declared loose id) left the tree core's guards walk. MODULE_CRATES is the one list those
guards and every source-hygiene ratchet read ('a new cut is one line here'); the crate keeps core's
module paths, so the declaration lines up again rather than being erased. The rustc warning ratchet
counts continuum-dreaming too, so the moved files' warnings stay counted.

Receipt (local, IntelMac, -j 2): cargo test -p source-hygiene 55/55; ratchets vs origin/canary
36200cb: every count identical (unjustified_unwraps 1977 -> 1977, upward_imports 33 -> 33,
lines_over 269 -> 269, ...).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* ARTIFACT_CHUNK_FRAME_BUDGET lives in lease.rs's tests, the only reader (warning ratchet on #5456)

In core's lib-test build the test counted as its use; as a non-test dependency of core the
crate-level const was dead_code, lifting the warning count to 14 against the baseline 13. It is the
test's bound on a full chunk's encoded size, so it moves into the tests module; MAX_ARTIFACT_CHUNK's
doc still states the frame and envelope budget.

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant