mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-21 00:21:27 +00:00
Apply the cleanup findings from a four-angle review (reuse, simplification, efficiency, altitude) of the demotion change: - Share one size gate: serialized_if_over now backs both offload_value and demote_value_for_prompt, restoring the cheap short-string and scalar pre-checks so per-node demotion no longer serializes every small value just to measure it. - Stop re-writing blobs every node: materialize_value_bytes writes the sandbox file directly from the in-hand bytes and short-circuits on the content-addressed file's existence, so an already-demoted value costs one existence probe instead of a store round-trip per node visit. The local file write is shared with materialize_blob_ref. - Demote over the resolved snapshot map instead of re-snapshotting a Context copy, making the context and outcome loops symmetric and saving a full deep clone per node; the fidelity lifecycle builds the Context after the pass. - Skip the pass entirely for Full and Truncate fidelities (nothing renders context values), except parallel nodes whose branch stash may render at a richer fidelity. - Build is_preamble_hidden_key on is_engine_internal_key instead of restating its prefixes, and call it directly from the preamble renderer rather than through a wrapper. - Document that outcome updates are demoted wholesale and that BranchWorkItem.item carries the prompt-ready (possibly demoted) item; drop the item rebinding and redundant test assertions; restore the local integration test's confinement assertion and make the remote one non-vacuous. Skipped by choice: unifying the crate's several truncation helpers and rendering the marker through the "See:" pointer family (cross-module coupling out of proportion to the preview cosmetics), per-branch demotion inside parallel.results (wholesale demotion is what bounds the total), and cross-node demotion memoization (the file-existence short-circuit already reduces repeats to a stat). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FH8Jj9Y4E4Tu5g1jwDtHAb |
||
|---|---|---|
| .. | ||
| it | ||
| materialize_run.rs | ||