Skip to content

The render receipt: what each served prompt showed her, in order, at the level the view chose (HER-TOOLS; #5585 and #5637 consume it) - #5639

Merged
joelteply merged 4 commits into
canaryfrom
fable/render-receipt
Oct 31, 2026
Merged

joelteply merged 4 commits into
canaryfrom
fable/render-receipt

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

How it serves the minds: a task's end is acknowledged only when she was actually shown it, so a restart or a fold never loses an end she hasn't seen. It replaces #5637's order-based inference (Codex: no interim). HER-TOOLS "The render receipt", HER-TASKS acknowledge-at-perception.

Change

  • continuum-context:
    • level::Level (Full, Summary, Pointer, Folded) gets its own module.
    • Each epoch Event carries its occurrence (ElementId, now serde) and its level.
    • View::receipt() -> Receipt { epoch, items: [Rendered { source, element, level, version, retired, chars }] } covers every block after the head, in prompt order.
    • View::sent() keeps it; take_submitted() takes it once. It is never saved.
  • continuum-cognition:
    • render_receipt::{RenderReceipt { owner, request, view }, RenderReceiptSink, install(owner, sink), deliver}.
    • The faculty takes the submitted receipt on every outcome of the request that carried it, and delivers it only where that request was Served, never from a measurement fork.
  • Not here: the memory incarnation joins with Persist background task acceptance and terminal receipts #5585's WorkingMemory::incarnation, and the ledger installs the sink (Codex). A Repeat { of } level arrives with invariant 4's repeat rendering (Cormac, dcf95bce).
  • clippy: one pre-existing map_or(true, …) becomes is_none_or.

Tests

  • the_receipt_names_each_shown_occurrence_and_its_level_in_prompt_order: levels and order, chars summing to the view, take-once after sent().
  • continuum-context --lib: 35/35.
  • continuum-cognition --lib: 952/953 (1 ignored) at the first commit; llm_deliberation_faculty + render_receipt 104/104 at the head (M5, --features metal, 06:04Z).
  • Ratchets clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

joelteply added a commit that referenced this pull request Oct 31, 2026
… or level update the block in place (no append), so the receipt never reports stale evidence (Codex on #5639)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply and others added 4 commits October 31, 2026 01:55
…the level the view chose, bound to her and the request (HER-TOOLS; #5585 consumes it)

- continuum-context: `Level` moves to `levels` (the crate's levels-of-detail owner) so the epoch
  can record it; each `Event` carries its occurrence (`ElementId`, now serde) and level;
  `View::receipt()` projects every block after the head in prompt order (occurrence, level,
  version, retired, chars); `View::sent()` keeps it until `take_submitted()`, never saved.
- continuum-cognition: `render_receipt::{RenderReceipt, RenderReceiptSink}`; the faculty takes
  the view's receipt on every outcome of the request that carried it and delivers it to its one
  sink only where that request was served, so a prompt the engine never accepted is never
  receipted; a measurement fork has no sink.
- The memory incarnation joins the binding with #5585's `WorkingMemory::incarnation` (Codex).
- clippy: one pre-existing `map_or(true, …)` in view.rs becomes `is_none_or`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…sink is installed per mind in render_receipt (the faculty file untouched); a fork never delivers

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… or level update the block in place (no append), so the receipt never reports stale evidence (Codex on #5639)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply force-pushed the fable/render-receipt branch from a53f84b to a5122bd Compare October 31, 2026 06:55
@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE #5639 at exact head a5122bd (Cormac).

Verified in a detached worktree at a5122bd (2026-10-31T07:0xZ, enrico):

  • cargo test --locked -p continuum-context --lib --examples: 36 + 20 pass.
  • Mutation: skipping the in-place element/level update for identical bytes (epoch.rs) fails identical_bytes_with_a_new_level_or_occurrence_update_the_block_without_appending at :172. The equality fix is pinned.
  • Read: the level and occurrence ride each epoch Event, set where the view decides them (start, append, fold as Folded with no element, retire as Pointer). receipt() projects every block after the head in prompt order, superseded versions included, which is what she was actually shown. sent() snapshots it, and take_submitted() hands it out once and is never saved, so a prompt the engine never accepted is never receipted. Level moving from allot.rs to the crate root with serde derives is the one public type the receipt needs.

For the record, and already agreed: invariant 4 (card dcf95bce) adds Level::Repeat { of: ElementId } when it rebases onto this, so a repeat is never receipted as Full.

@joelteply
joelteply merged commit 746b779 into canary Oct 31, 2026
18 checks passed
@joelteply
joelteply deleted the fable/render-receipt branch October 31, 2026 07:05
joelteply added a commit that referenced this pull request Oct 31, 2026
…ew epoch instead of refusing the resident (#5659)

* A checkpoint's context view is derived: one that no longer decodes is dropped with a probe and her next act opens a new epoch, instead of refusing the resident (the 2026-10-31 M5 outage: #5639's new Event.level made every checkpoint undecodable; 32 min with no resident)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* The regression test reproduces the outage exactly: a real serialized view with only its level fields removed is dropped, the newest result and settlement restore and survive the next save, and a corrupt authoritative field still refuses (Codex on #5659)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Derived view decoded from its exact text (RawValue), never through serde_json::Value: a view's ElementIds are u128, which Value cannot hold, so the Value intermediate refused every VALID view (Codex's executed test on #5659); the test works on JSON text, strips only the level pairs, and now also asserts a valid view is kept

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
joelteply added a commit that referenced this pull request Oct 31, 2026
…drops a field that no longer decodes (with a probe naming its type), and ActionRecord.act now uses it beside context_view (card c990acbe) (#5665)

derived_view.rs held the rule for one field. ActionRecord.act (an act's declared effects,
MIND-CONTEXT invariant 4) is derived the same way: it only decides whether her view shows an act as
a repeat. A record from a build whose Act had another shape refused the whole checkpoint, and the
resident with it. That is the 2026-10-31 M5 outage shape (#5639 -> #5659), still open for this field.

- working_memory/derived.rs (renamed from derived_view.rs): or_none<T: DeserializeOwned>. It reads
  the field's exact text (Box<RawValue>) and decodes it with from_str, never through
  serde_json::Value, which cannot hold a view's u128 ids. The probe
  persona.checkpoint.derived_dropped names std::any::type_name::<T>() and the error.
- context_view and ActionRecord.act both use deserialize_with = derived::or_none. Every authoritative
  field still refuses a corrupt value.

Test: an_act_from_an_older_build_is_dropped_and_its_record_survives. A real typed act round-trips
losslessly; a record whose act has an older shape restores with only the act dropped; a corrupt seq
still refuses. Mutation: without deserialize_with on act it panics at actions.rs:414.

Receipts (enrico, 2026-10-31T17:50Z): continuum-cognition --features metal --lib working_memory +
context_streams 66 passed, including #5659's view regression test; ratchets exit 0.


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