Repository navigation
feat: save outcomes and change dossiers locally (preview) - #688
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Core: record-store.ts persists outcome records under .fixmap/outcomes/ and change dossiers under .fixmap/dossiers/, one validated JSON file per record. Writes use temp file + rename; links, junctions, hardlinks and traversal ids are refused; a bounded lock is never taken over; malformed files are reported as problems instead of failing a listing. CLI (preview): fixmap outcome record|list|show|remove|calibrate|prune and fixmap dossier create|list|show|remove, with --redact (free text stored as SHA-256). Calibration stays report-only (automaticWeightChanges: false). MCP (preview, read-only): fixmap_outcomes and fixmap_dossier. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…alpath The repository root is resolved with realpath (macOS /var -> /private/var, Windows 8.3 short names on CI runners), but the report path was only resolved lexically, so relative() began with ".." and the plan artifact path was dropped. Compare against the report's realpath, and add a regression that reaches the repository and report through a symlink/junction alias. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aryamthecodebreaker
force-pushed
the
claude/outcomes-dossier-store-af2067
branch
from
November 22, 2026 14:47
dafdf87 to
237758e
Compare
Merged
This branch was successfully deployed
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.
Implements work package 02 (outcomes and dossier persistence). Preview only. The ledger, CHANGELOG, versions and the website changelog are untouched.
What changed
packages/core/src/record-store.ts(exported from the node entry only):readStoredOutcomes/readStoredOutcome/saveStoredOutcome/deleteStoredOutcome/pruneStoredOutcomesand the dossier equivalents. One JSON file per record in.fixmap/outcomes/or.fixmap/dossiers/. Every read and write re-validates with the existingoutcomes.ts/dossier.tsvalidators.fixmap outcome record|list|show|remove|calibrate|pruneandfixmap dossier create|list|show|remove. Help lines are prefixedPreview:.fixmap_outcomes(list/show/calibrate) andfixmap_dossier(list/show), withreadOnlyHint: trueand thePreview (may change before v0.10.0):prefix.preview: true. Preview-set tests updated incli-runner.test.tsandmcp.test.ts.docs/outcomes-and-dossiers.mdcovers--redact,prune, and lock recovery. README links to it.Ledger evidence
Outcome feedback loop
rename..fixmapand.fixmap/outcomesmust be real directories (no symlink or junction). Record and lock files must be regular files withnlink === 1. Stored ids cannot hold path separators,:or a trailing dot. A lock held by another writer gets a bounded wait (~1s) and is then refused, never taken over. Tests inpackages/core/test/record-store.test.ts: atomic write with no leftover temp file, 12 concurrent writers with no lost or corrupt record, lock refusal with lock bytes unchanged, traversal ids, junction/symlinked.fixmapand store directory, hardlinked record.--redactstoressha256:<hex>for the assessment reason and command evidence. Outcome records never store task text.outcome prune --older-than <days>deletes records recorded before the cutoff. Malformed files are listed and never deleted. Both are tested..jsonfiles are returned asproblems(Markdown: "Unreadable stored files"). Valid records still load.Change dossier
.fixmap/dossiers/with.fixmap/dossiers.lock. A hand-edited dossier fails the fingerprint check and is reported as a problem.dossier create --redactstores the task text assha256:<hex>. The test asserts the raw text never reaches disk.fixmap_dossierlist/show.Verification
Following the updated process, I did not run the full
npm run cilocally. A full run started before that instruction arrived and was stopped partway. What did run on Windows:npm run typecheck: passnpm run lint: pass, after fixing oneanyin the new testnpm run check:action-bundle: pass. Core changed, but the Action bundle is unchanged because the store isn't imported by the Action, so there was nodistdiff to commit.npm test -w packages/core: 75 files, 881 passed, 1 skippednpm test -w packages/cli: one run surfaced the MCP tool-list test needing the two new tools. After that fix,mcp.test.ts,outcome-command.test.tsandcli-runner.test.tspass (185 tests). The full CLI suite was not rerun afterwards.The concurrency test also caught a real race: two first writers both creating
.fixmap/outcomes. Fixed by toleratingEEXIST; the link check still runs afterwards.🤖 Generated with Claude Code