Repository navigation
feat: L2 event manifest sidecar (FUSION_CODE_L2_MANIFEST=1) - #462
Merged
Merged
Conversation
Folio-style L2 layer (papers-scan 2026-12-02 §4): per-session <session>.events.jsonl with one bounded record per tool_use / tool_result / assistant text block, written from the single transcript enqueue choke point. Programmatic context folding and StopLoss-style monitors can consume this without parsing multi-GB session files. - Default off, fail-open, fire-and-forget: never blocks or fails the transcript write path - 200-char digests only — no full bodies, no new PII surface - 3 unit tests (enabled path, disabled path, default-off) Co-Authored-By: Claude Code <[email protected]>
This was referenced Dec 2, 2026
Merged
dahai80
added a commit
that referenced
this pull request
Dec 2, 2026
stoploss_lib now prefers a Folio-style L2 manifest (fusion-code-events.jsonl, #462) over stream-json when both exist: _is_l2_manifest detects the record shape, l2_to_events adapts bounded digests into pseudo stream events (digest-based repeat_identical fingerprints), resolve_feature_source picks the source. The external adapter copies the run's newest matching L2 sidecar from ~/.fusion-code/projects into logs_dir so the dataset builder sees it. Validated on the S1 trial fix-git__CzCsxVs: L2-derived and stream-derived features agree on all six values (turns=11, no_edit_streak=11, seconds_per_turn=88.87); stream-json stays as fallback for pre-#462 runs. Refs #449 Co-authored-by: Claude Code <[email protected]>
This was referenced Dec 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<session>.events.jsonlsidecar: one bounded record per tool_use / tool_result / assistant text block, schema_version 1FUSION_CODE_L2_MANIFEST=1), fire-and-forget, fail-open: the transcript write path is byte-identical when the flag is unsetValidation
🤖 Generated with Claude Code