Feat/task memory evidence pipeline - #63
Merged
Merged
Conversation
SDK file mutations reported failures with console.error, so hosts that own a structured logger never saw them and the diagnostic bypassed redaction. An optional logger now threads from run.ts through changeFile/changeFiles, replaceRange and writeAuditFindings, and the emitted payload carries only path, change type, byte length and error code.
replace_range now splices on the raw file bytes so line terminators outside the edited range survive an edit, pins a byte-exact commit expectation alongside the LF-normalized freshness hash so a CRLF<->LF-only external rewrite cannot be silently reverted, and returns its declared { file, errorMessage } shape for oversize, unparsed and out-of-project input instead of throwing a ZodError.
write_audit_findings tightens its input schema at the boundary that feeds structuralReceipt: single-line and control-character hygiene on coverage entries and finding paths, trimming plus uniqueness across every coverage list, identifier bounds on sessionSlug/shardId/snapshotId, non-empty coverage on snapshot-bound calls, and the rules stated on the fields themselves since every rejection collapses to one generic message. changeFile also reports the attempted action from the state it observed in-lock and cancels its operation registration on every pre-commit failure path.
Adds sdk/src/__tests__/run-mutation-dispatch.test.ts covering the dispatch preconditions and the compact-receipt mutation side channel, and expands the change-file, replace-range and write-audit-findings suites over the new behaviour.
Buffer concurrent tool evidence per step and flush once to avoid revision clobbering and repeated normalize/checksum; programmatic calls commit immediately. Capture request goal for root agent and compile with focus paths so relevance outranks recency under budget. Keep hash-verified reads across workspace revisions, guard pathless evidence by revision, and cap evidence per kind to prevent review churn evicting reads. Fix read anchor and mutation hash canonicalization so recorded evidence reconciles fresh next session; persist aborted runs and unify compact-receipt mutation selection via findFileMutationResult with shared changedActions between journal and FilesystemMutationEvent.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
This change is