Repository navigation
feat: outcome capture — accept/reject/revert/edit-after-accept signals - #434
Merged
Merged
Conversation
#431) Consent-gated (FUSION_CODE_OUTCOME_CAPTURE=1, default OFF = byte-identical no-op) outcome event layer for applied AI edits: - src/services/outcome/outcomeCapture.ts: JSONL store under ~/.fusion-code/outcomes/ (per-UTC-date), schema-fixed fields only — no prompt/completion content in events - Permission path (toolExecution): accepted/rejected emitted for code-editing tools with latency-from-proposal; ask decisions skipped - fileHistory rewind: reverted per restored file; trackEdit + turn-end snapshot settle: edited-after-accept via content-hash divergence - postMessages: captures x-fusion-correlation-id response header (gateway round-trip, refs fusion#17); FUSION_CODE_CORRELATION_ID test override - CLI export hook: fusion-code outcome export [--out FILE|-] [--since ISO] for the fusion-bench mining consumer - Tests (9) + docs/outcome-capture.md; gates: tsc 0, lint/layers/flags clean, 1305 unit + 537 integration pass, build OK Co-Authored-By: Claude Code <[email protected]>
This was referenced Dec 1, 2026
Merged
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.
Closes #431 (fusion-code side; gateway correlation round-trip counterpart refs fusion#17).
What
Consent-gated outcome event layer for applied AI edits:
askdecisions skipped (not yet final).postMessagescaptures thex-fusion-correlation-idresponse header (gateway-issued, refs fusion#17); events carry the latest value.FUSION_CODE_CORRELATION_IDenv override for round-trip testing.fusion-code outcome export [--out FILE|-] [--since ISO8601]for the fusion-bench mining consumer.Constraints honored
FUSION_CODE_OUTCOME_CAPTURE=1(strict "1"), default OFF — zero events, all recorders no-op, byte-identical off.~/.fusion-code/outcomes/outcomes-YYYY-MM-DD.jsonl(audit-log conventions).Verification
tests/services/outcome/outcomeCapture.test.ts) incl. simulated-session 4 event classes + postMessages header-capture integrationbun run buildOK; CLI fast-path smoke green🤖 Generated with Claude Code