Skip to content

Read-only verbs declare they observe: an unchanged code/search, glob, list, tree, exists or git status/diff/log reaches her view as a repeat (card 7d7b1ace) - #5655

Merged
joelteply merged 1 commit into
canaryfrom
cormac/observes-declarations
Oct 31, 2026
Merged

joelteply merged 1 commit into
canaryfrom
cormac/observes-declarations

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

MIND-CONTEXT invariant 4 (#5652) renders an unchanged observation as "repeat of #n" only for a
command that declares ToolEffect::Observes; code/read was the only one, so a re-run of an unchanged
search or git status still arrived whole. The validator's Undeclared count is this gap.

  • action_command! takes an optional effect: <ToolEffect variant>, clause (both arms), resolved
    through the kernel's own re-export ($crate::sdk_codegen::ToolEffect), so every crate that
    expands the macro compiles without naming continuum-base; absent keeps the trait default,
    Undeclared.
  • code/git/diff, code/git/status, code/git/log declare effect: Observes; code/search, code/glob,
    code/list, code/tree and code/exists declare const EFFECT = Observes.
  • normalize_edit_mode.rs (touched, so it leaves with no self-sized site): the empty-glob grounding
    lists every top-level directory instead of the first 24; the executor's whole-or-handle custody
    sizes what she is handed.

Test: her_unchanged_reread_reaches_her_view_as_a_repeat_and_an_undeclared_act_never_does gains a
git_status case (alias -> code/git/status -> declared effect -> one repeat in her view). Mutation:
dropping effect: Observes from status.rs fails it (repeats 0).

Receipts (enrico, 2026-10-31): continuum-cognition --lib 929, continuum-kernel --lib 1330 (Metal
skipped: wedged driver), continuum-hands --lib 292/293 (the one failure is
python_runs_and_returns_ground_truth, host-dependent: /usr/local/bin/python3 is a Homebrew symlink
so sys.executable differs from the reported interpreter; run.rs is untouched, card c4d84be3's
class), cargo check --workspace --exclude inference-grpc --tests clean (inference-grpc's build script
needs protoc here), ratchets exit 0.

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

… list, tree, exists or git status/diff/log reaches her view as a repeat (card 7d7b1ace)

MIND-CONTEXT invariant 4 (#5652) renders an unchanged observation as "repeat of #n" only for a
command that declares ToolEffect::Observes; code/read was the only one, so a re-run of an unchanged
search or `git status` still arrived whole. The validator's Undeclared count is this gap.

- action_command! takes an optional `effect: <ToolEffect variant>,` clause (both arms), resolved
  through the kernel's own re-export (`$crate::sdk_codegen::ToolEffect`), so every crate that
  expands the macro compiles without naming continuum-base; absent keeps the trait default,
  Undeclared.
- code/git/diff, code/git/status, code/git/log declare `effect: Observes`; code/search, code/glob,
  code/list, code/tree and code/exists declare `const EFFECT = Observes`.
- normalize_edit_mode.rs (touched, so it leaves with no self-sized site): the empty-glob grounding
  lists every top-level directory instead of the first 24; the executor's whole-or-handle custody
  sizes what she is handed.

Test: her_unchanged_reread_reaches_her_view_as_a_repeat_and_an_undeclared_act_never_does gains a
git_status case (alias -> code/git/status -> declared effect -> one repeat in her view). Mutation:
dropping `effect: Observes` from status.rs fails it (repeats 0).

Receipts (enrico, 2026-10-31): continuum-cognition --lib 929, continuum-kernel --lib 1330 (Metal
skipped: wedged driver), continuum-hands --lib 292/293 (the one failure is
python_runs_and_returns_ground_truth, host-dependent: /usr/local/bin/python3 is a Homebrew symlink
so sys.executable differs from the reported interpreter; run.rs is untouched, card c4d84be3's
class), cargo check --workspace --exclude inference-grpc --tests clean (inference-grpc's build script
needs protoc here), ratchets exit 0.

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

APPROVE #5655 at exact head 7ed5d0e (Fable). The claim that matters for invariant 4 is that every verb declared Observes truly only observes; a wrong declaration would render a world-changing re-run as 'repeat of #n'. Verified by reading each body at the head:

  • git status: git_bridge::git_status runs rev-parse --abbrev-ref HEAD and status --porcelain=v1 (git_bridge.rs:19-26); git diff: diff / diff --cached (:93-96); git log: log -N --oneline --no-decorate (:171-174). No add/commit/checkout/stash/reset/apply/fetch on these paths (git_add at :181 is a separate verb).
  • code/list, exists, glob, tree, search (normalize_edit_mode.rs:158, 296, 329, 366, 426): no fs::write, File::create, OpenOptions, remove, rename or create_dir in any body.
  • git status may refresh git's own index stat cache; that is not a change to her work, and a repeat also needs an equal content hash, so any real change still renders whole.
  • action_command!'s optional effect: resolves through $crate::sdk_codegen::ToolEffect (the kernel re-export), so expanding crates need no continuum-base import; absent clause leaves the trait default Undeclared.
  • code/tree's tops.truncate(24) removal hands the layout whole to the executor's whole-or-handle custody, consistent with the one budget.

@joelteply
joelteply merged commit 1f11e7f into canary Oct 31, 2026
36 checks passed
@joelteply
joelteply deleted the cormac/observes-declarations branch October 31, 2026 14:33
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