Repository navigation
feat(context): add provenance metadata to injected memories - #421
Closed
Phototonic wants to merge 1 commit into
Closed
Phototonic wants to merge 1 commit into
Phototonic wants to merge 1 commit into
Conversation
Contributor
Author
|
Pre-push review round (independent read-only reviewer over the full diff): APPROVE WITH COMMENTS — no blockers. Findings and disposition:
Reviewer validation: 46 targeted tests across six files + typecheck passed. Full suite rerun before push: 787 pass / 3 pre-existing Linux |
Contributor
Author
|
Reopened as #422 (identical change, renamed branch). Closing this one since the original branch name referenced a private tracker. |
7 tasks done
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
Provenance in the injected memory block, so agents can cite what they "remember":
<memory>tag in the injected<memory_context>block now carriesid,created(UTCYYYY-MM-DD), andprojectattributes when present. Rows without provenance keep the exact previous tag shape.## Restored Session Memoryheadings gain the same provenance:### Memory N (mem_… · created YYYY-MM-DD · project), suffix omitted entirely when absent.src/services/memory-provenance.ts). This keeps the mockedcontext.jsexport surface intact — several scenario testsmock.modulethat file with a minimal surface, sosrc/index.tsmust not import new exports from it.Session-title lookup was intentionally descoped per the issue (project name stands in).
Test plan
<memory relevance="100%" id="mem_…" created="2026-10-20" project="opencode-mem">plus the new header sentence (the issue's acceptance criterion)tests/memory-provenance.test.ts; three low-severity follow-ups from the pre-push review round are recorded in a comment belowChecklist
main(rebased onto 6289ac4; single commit)bun testpasses (787 pass / 3 fail — all three pre-existing on Linuxmain: plugin-bundle-boundary, user-profile-learning-confidence, config storagePath shape)bun run typecheckpassesbun run checkpasses (format + lint + typecheck)