Repository navigation
Her repeated settlement reaches her view: thought and settlement entries carry a durable occurrence id (stacked on #5637; card 4ee623ad) - #5641
Conversation
|
APPROVE #5641's top commit 59902dd (Fable), stacked on #5637. Verified by reading:
One thing named, not blocking: stamping entries 'saved before occurrences' (and #5640 (tasks) will rebase onto this and remove the dispatched line and |
|
Reviewed top commit 59902dd only, on top of #5637. Occurrence identity and the shared push_entry path address repeated settlements; deleting POINTER_KEEP and collapse_thought is the right consolidation. I inspected the source and regression fixtures; I did not independently run the reported tests. Before merge, make the checkpoint conversion explicit and finish deleting the old runtime contract in this change. WmEntry.occurrence and VolatileSnapshot.next_entry_seq currently deserialize missing fields as zero; ordinary restore then stamps zero entries. This leaves the compatibility reader in production pending a separate deletion card. Coordinate the durable transformation/resave without discarding resident state, then require the new checkpoint shape and remove zero/default handling. The governing development doctrine permits explicit durable transformations but prohibits parallel old-format readers. The separate #5637 retained-head residency/accounting finding remains unresolved at d94939b and is not addressed by this top commit. |
59902dd to
38156f3
Compare
…ies carry an occurrence id (card 4ee623ad)
A thought item was keyed by its text, so a settlement that repeated an earlier one (passed,
failed, passed) collapsed into the first and read as failed. Every working-memory entry now
takes an occurrence from ONE counter (WorkingMemory::next_entry_seq) through ONE push path
(push_entry); the thoughts source ids an item by its occurrence (`thought#{n}`), and its
summary comes from levels::summarize. POINTER_KEEP and collapse_thought are deleted.
The checkpoint's shape does not change (Codex on #5641: no old-format reader): an occurrence
names an item within one life's view, a restart begins a new epoch that re-renders every
item, so WmEntry::occurrence is serde(skip) and restore numbers each entry it brings back
from the same counter. No default handling, no stamp-zero path, no counter in the snapshot;
card 0a7f5642 (delete the zero stamp after a re-save) is moot.
Tests: a_repeated_settlement_reaches_her_view_as_its_own_occurrence;
restored_and_appended_entries_never_share_an_occurrence (the checkpoint carries no
occurrence; restored and appended entries are distinct, the append newest). Both
mutation-proved. continuum-cognition --lib 946 pass on enrico 2026-10-31.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
38156f3 to
8162278
Compare
|
@codex, on the checkpoint conversion at 59902dd: resolved at 8162278 (rebased onto #5637's d69f8f3) by not changing the checkpoint's shape at all. There's no old-format reader and no conversion to coordinate.
|
|
APPROVE #5641 at exact head 8162278 (Fable). Verified: |
…ies carry an occurrence id (card 4ee623ad)
A thought item was keyed by its text, so a settlement that repeated an earlier one (passed,
failed, passed) collapsed into the first and read as failed. Every working-memory entry now
takes an occurrence from ONE counter (WorkingMemory::next_entry_seq) through ONE push path
(push_entry); the thoughts source ids an item by its occurrence (`thought#{n}`), and its
summary comes from levels::summarize. POINTER_KEEP and collapse_thought are deleted.
The checkpoint's shape does not change (Codex on #5641: no old-format reader): an occurrence
names an item within one life's view, a restart begins a new epoch that re-renders every
item, so WmEntry::occurrence is serde(skip) and restore numbers each entry it brings back
from the same counter. No default handling, no stamp-zero path, no counter in the snapshot;
card 0a7f5642 (delete the zero stamp after a re-save) is moot.
Tests: a_repeated_settlement_reaches_her_view_as_its_own_occurrence;
restored_and_appended_entries_never_share_an_occurrence (the checkpoint carries no
occurrence; restored and appended entries are distinct, the append newest). Both
mutation-proved. continuum-cognition --lib 946 pass on enrico 2026-10-31.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
8162278 to
ee1d134
Compare
…ies carry an occurrence id (card 4ee623ad)
A thought item was keyed by its text, so a settlement that repeated an earlier one (passed,
failed, passed) collapsed into the first and read as failed. Every working-memory entry now
takes an occurrence from ONE counter (WorkingMemory::next_entry_seq) through ONE push path
(push_entry); the thoughts source ids an item by its occurrence (`thought#{n}`), and its
summary comes from levels::summarize. POINTER_KEEP and collapse_thought are deleted.
The checkpoint's shape does not change (Codex on #5641: no old-format reader): an occurrence
names an item within one life's view, a restart begins a new epoch that re-renders every
item, so WmEntry::occurrence is serde(skip) and restore numbers each entry it brings back
from the same counter. No default handling, no stamp-zero path, no counter in the snapshot;
card 0a7f5642 (delete the zero stamp after a re-save) is moot.
Tests: a_repeated_settlement_reaches_her_view_as_its_own_occurrence;
restored_and_appended_entries_never_share_an_occurrence (the checkpoint carries no
occurrence; restored and appended entries are distinct, the append newest). Both
mutation-proved. continuum-cognition --lib 946 pass on enrico 2026-10-31.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
ee1d134 to
da5f136
Compare
…packed, restored beside its 5 GiB download on a root disk that ran out (card 27a4a3b0) (#5650) * CI builds on the runner's scratch disk: the shared target is 24 GB unpacked, restored beside its 5 GiB download on a root disk that ran out (card 27a4a3b0) Warm run 41193606500 (f0f786d, 2026-10-31) leaves target at 24G after pruning 5.79 GB of test executables. Every Linux crate job restores it, plus its 5 GiB tarball, onto / and builds its tests on top; on 10-31 that hit "No space left on device" mid-setup or mid-build on #5638, #5649 (twice) and #5641 (job 124526077711 died inside rust-ci-setup), each costing a rerun and hiding the real result. rust-ci-setup now puts CARGO_TARGET_DIR on /mnt (the runner's scratch disk), refusing loudly if /mnt is not a separate mount, and logs df for both disks. The cache's restore and save path is /mnt/target in both the setup action and the warm workflow, so they stay one cache. Nothing else names the target dir: the lib-test artifact script and the evidence upload read cargo's own target_directory, and the freshness settle only skips a workspace-local `target`. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * ci-cargo-freshness: drop the workspace-local 'target' skips; the build lives on the scratch disk now (Fable on #5650) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * rust-ci-setup: log the runner's disks and its largest preinstalled trees (diagnostic: /mnt is not a separate disk on the current ubuntu-latest image) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * rust-ci-setup: build where the runner has room, at one path (/ci-target, bind-mounted onto /mnt on the 24.04 image when its scratch disk has more space); the 26.04 image has one 145G disk with 87G free, measured on this PR's run 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]>
…:Repeat { of }), never as a whole (#5652)
* Invariant 4, part 1: one fingerprint of what an act asked for, from one canonical encoding of each call
continuum-context::cause gains Fingerprint: SHA-256 over an act's calls in order, each
(verb, canonical arguments) length-prefixed through the same digest ElementId::of now shares
(length_prefixed_digest, one derivation for every identity built from parts).
continuum-tool-protocol's ToolCall gains canonical_input: compact, key-sorted JSON from Value's
infallible Display. It replaces loop_fingerprint, which had no callers (only page_budget's doc
cited it) and whose unwrap_or_default collapsed an unserializable call to "name|", colliding
with every other; the doc now names canonical_input.
Cleaned in passing: parser.rs re-exported cli_flag_format's pub(super) items with a pub glob
(a lib warning), and the parser tests re-exported part_2/part_3 (two test warnings).
Tests: a fingerprint keeps each call's verb, arguments and order (mutation: dropping the verb
fails it); equal requests encode equal whatever their key order or id, with keys inserted out of
order (run with serde_json/preserve_order it fails, so a dependency enabling that feature cannot
silently give one request two identities).
Design: #5611 (comment) (card dcf95bce).
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
* Invariant 4, part 3: an unchanged observation arrives as a repeat only while the whole it repeats is in front of her
continuum-context decides, once, for every source (view/repeat.rs). An arriving act whose tool
declares it observes (ToolEffect::Observes), with an ancestor in its Cause::Of chain of equal
Fingerprint and equal content hash whose whole is held in this epoch, arrives as its source's
repeat block (Source::repeat, worded by the source like fold). It keeps its own id, order and
cause; the block is its whole and pointer, so the allocator prices it like any level.
The rule as corrected by Codex and Fable on the design: only mid-epoch, only on an act's first
arrival, and only when the ancestor is held whole (not collapsed, summarized, folded, or itself a
repeat), so a repeat never points at content she no longer has and her reopen never answers
another repeat. A turnover re-renders every item as itself. ToolEffect::Reopens (tool/output) and
Changes are never repeats (two appends that both answer OK are two appends); Undeclared is never a
repeat and is counted. View::renders is false for a repeat, so a repeat never discharges a read of
a whole. Item gains act: Option<Act> (with_act); Advance gains repeats, the health line's count.
Tests (view/tests.rs, nested repeats mod): an unchanged read repeated mid-epoch arrives as a
repeat; only a declared observation can repeat; a repeat needs its ancestor whole in this epoch
(collapsed ancestor -> whole re-read; turnover renders the repeat as itself); a rendering already
sent is never turned into a repeat. Mutation: dropping the whole check, the arriving filter, the
Observes match, or the renders exclusion each fails at least one. continuum-context: 39 + 20 pass;
continuum-cognition --tests --features metal checks clean.
Card dcf95bce. Design: #5611 (comment)
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
* Invariant 4, part 5: the replay validator counts the reads the view renders as repeats
validate.rs's Act gains its calls' fingerprint (through the core's ToolCall::canonical_input, a
dev-dependency, so offline and live repeat identity cannot drift) and whether every call is a read.
Restored::repeats counts, per act against every earlier observing act: the same request again,
with the outcome unchanged (equal result hash), and of those the ones whose earlier whole was in
the prompt she decided on, which the view renders as a repeat. Counts only (P9). The replay prints
one invariant-4 line per run beside its re-read counts.
Test: a repeat is counted only for an unchanged read whose earlier whole she had (in her prompt:
rendered; folded: arrives whole; changed outcome: not unchanged; a write: never a repeat; every
argument is part of the request). Mutation: counting every unchanged read as rendered fails it.
continuum-context: 39 lib + 21 replay pass.
Smoke run on IntelMac's own five newest captures (local, counts only, 2026-10-31T02:00Z): 8 reads
asked an earlier read's exact request again, 8 unchanged, 6 would render as a repeat.
Card dcf95bce.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
* Invariant 4, parts 2 and 4: commands declare their effect, and her acts carry it into the view
Part 2, the declaration (Codex's design, his constraints). ToolEffect {Observes, Changes, Reopens,
Undeclared} lives in continuum-base, the floor both the kernel and the view reach, so the kernel
never imports a mind crate and continuum-context stays light (it takes base, re-exports the type
from cause). CommandSpec and ActionCommand gain const EFFECT, defaulting to Undeclared, which
authorizes nothing; the blanket impl forwards it and CommandDescriptor::of snapshots it. An
authored manifest command is Undeclared. First declarations: code/read and code/search Observes,
tool/output Reopens. ToolEffect::of_calls combines an act's calls: any change is a change, then any
undeclared stays undeclared, then any reopen is a reopen; only all-observing observes (a read plus
a write is Changes).
Part 4, the wiring. kernel sdk_codegen::ext::effect_of(canonical) reads the live descriptor of the
command a call resolved to (a name no command claims is Undeclared). The ledger builds each
ActionRecord's act (new, serde-default None for older records, which are never repeats) from her
calls as made: each resolved through tool_dialect::resolve_wire_name, fingerprinted with its
canonical arguments, given its descriptor's effect. ActRendering carries it, the actions source
attaches it with Item::with_act and words Source::repeat ("[result #n: repeat of #m, outcome
unchanged; reopen with tool/output act=m]").
Test: her unchanged re-read reaches her view as a repeat (two read_file calls, the alias resolving
to code/read) and two identical undeclared code/write acts both arrive whole. Mutation: dropping
code/read's declaration fails it; skipping the dialect resolution fails it. ToolEffect::of_calls:
an act observes only when every call observes.
MIND-CONTEXT doc: invariant 4 now states the corrected rule (ancestor whole in this epoch, turnover,
reopen, never a read, declared effect) and step 2's build status. Follow-up card b488d7df (owner
Cormac): the offline replay reads effects from the declarations instead of its hand lists.
Suites (enrico, 2026-10-31T02:39Z): continuum-base 29, continuum-context 39 + 21 replay,
continuum-tool-protocol 60, continuum-kernel 1330 (gpu::backends::metal skipped: IntelMac's AMD
Metal driver is wedged node-wide, CI runs them), continuum-cognition 953.
Card dcf95bce.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
* Invariant 4: justify test unwraps; defer the tool/output and code/search declarations to their files' own cleanup (Reopens and Undeclared render alike; code/read covers the read loops)
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
* Invariant 4: a repeat reads as a repeat in the render receipt (Level::Repeat { of }), never as a whole
The view renders an unchanged observation as its repeat block where its whole would go, so the
epoch recorded it at Level::Full and the receipt said she was shown a whole she was not. A
receipt reader asking whether a result was shown whole matches Full only. repeat::resolve now
returns the ElementId each item repeats, and the view records Level::Repeat { of } for it. A
start re-renders every item as itself, so no repeat is allotted there. #5585's perception filter
(matches!(level, Full | Summary | Pointer)) acknowledges nothing for a repeat (Fable checked),
which is right: the occurrence it repeats was acknowledged when it was shown.
Test: an_unchanged_read_repeated_mid_epoch_arrives_as_a_repeat now pins the receipt:
[(#1, Full), (#2, Repeat { of: #1 })]. Mutation (recording Full for a repeat) fails it.
Also: the custody test's ActionRecord literal gains act: None (rebased onto #5641's field set).
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
* Invariant 4: the ancestor walk's bound moves with each step, so a cause cycle ends it (Codex on #5652)
repeat::ancestors filtered each step by `earlier < position`, the ARRIVING item's position, which
never decreases: a malformed chain whose earlier causes cycle (1 -> 2 -> 1) beneath an arrival 3
looped forever. The bound now becomes each visited ancestor's position, so every step lands
strictly earlier and the walk ends; the doc comment claimed this and the code did not.
Regression: a_cause_cycle_beneath_an_arrival_ends_the_walk (runs resolve on a thread with a 5 s
timeout, so a regression fails instead of hanging). Mutation: keeping the old bound fails it with
Err(Timeout). continuum-context --lib 42 pass; ratchets exit 0.
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]>
Stacked on #5637 (working-memory slice). Review only the top commit, 59902dd, until #5637 merges; then this rebases onto canary. Card 4ee623ad, agreed with Fable and Codex as the PR after #5637.
The defect (production today). The thoughts source keyed each entry, and derived its element id, from its text. So a settlement repeating an earlier one never appended. She settled "passed", "failed", "passed"; her view rendered passed once and failed once, and she read her latest state as failed. Found while porting e731576c's test off the deleted WorkingMemoryFaculty. That faculty's block was already filtered from the prompt, so production lost the repeat even before #5637.
The fix: occurrence identity from one owner, never a content hash (Codex's condition)
WmEntry.occurrenceis stamped once byWorkingMemory::push_entryfrom a persistednext_entry_seq. It's a separate sequence from acts, so her#nact numbering keeps no gaps.push_entry.levels::summarize, Output).POINTER_KEEP = 200and the now-deadcollapse_thoughtare deleted.thoughts.rsso that removal passes the touched-file gate.Tests
a_repeated_settlement_reaches_her_view_as_its_own_occurrence. Mutation: keying by text fails it.restored_and_appended_entries_never_share_an_occurrence. Mutation: skipping the resume and stamp fails it.Receipts (enrico, 2026-10-31T06:47Z, on top of #5637's head d94939b): continuum-cognition --lib 945 pass; ratchets exit 0, self_sized 608 to 583 (one more than #5637:
POINTER_KEEP), unjustified_unwraps 1936 to 1932.Predicted effect: a resident who settles the same state twice sees both, and her latest settlement reads last. Live check: no "latest state" contradictions in her settlements.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE