Repository navigation
Conversation
`_remember_render_memory_section`'s rotated-slices loop (lib-memory-context.sh) listed every archive-*.md/recent-*.md path with no `_remember_may_inject` call at all -- unlike the main memory-file loop and the compact-mode deferred-file loop (#777) in the same function, both of which call the guard before listing a path. A git-tracked or symlinked rotated slice was still named under the "rotated memory slices" header, implying a safe, ordinary listing and inviting a follow-up read of content the guard exists to keep out of session context. Reopens the intent of #791 (closed as a duplicate-avoidance move in favor of trap.d/777.rotated-slices-no-guard.md, which curation is now resolving). Red before the fix (2 failed, 1 passed -- the positive control), green after (3 passed) -- see tests/test_rotated_slices_guard_805.py. Co-Authored-By: Claude Sonnet 5 <[email protected]>
…lank line Explore's self-review of 0b0c76e found the new "--- refused, not listed as a rotated slice ---" header ran straight into the preceding content with no blank line -- either the "rotated memory slices" header itself (when every slice in the top-10 window was refused) or the last accepted path's own line (when some were accepted). Every other header transition in this function separates sections with one blank line; this one did not. tests/test_rotated_slices_guard_805.py already passed 3/3 before this fix (its own `_rotated_section` helper had to special-case the missing blank line to scope its assertions correctly) and still passes 3/3 after. Co-Authored-By: Claude Sonnet 5 <[email protected]>
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.
What
Adds an
_remember_may_injectguard call to the rotated-slices listing loop inscripts/lib-memory-context.sh'''s_remember_render_memory_section-- previously that loop, unlike its two sibling loops in the same function (the main memory-file loop and the compact-mode deferred-file loop from #777), had NO injection-guard call at all, so a git-tracked or symlinkedarchive-*.md/recent-*.mdwas listed under the "rotated memory slices" header as if it were an ordinary, safe entry.A refused slice now prints under a new, third header -- "--- refused, not listed as a rotated slice (not injected) ---" -- deliberately distinct from #790'''s own two headers to avoid misattributing populations (this exact self-review finding from #790 is cited in #805'''s own issue text).
Reopens the intent of #791 (closed by the maintainer as a deliberate duplicate-avoidance move in favor of
trap.d/777.rotated-slices-no-guard.mdas the record; #805 exists because that trap.d fragment is now being resolved/deleted by a curation pass and #1736'''s own rule requires a durable record to replace it).Test plan
tests/test_rotated_slices_guard_805.py(3 tests: tracked-file refusal, symlinked-file refusal, positive control for an ordinary untracked slice).test_rotated_archive_recall.py,test_compact_deferred_guard_777.py,test_injection_guard_754_755_756.py): 34 passed, no regressions.docs/windows-skip-triage.mdupdated with a row for the new test file'''s win32 blanket skip;changelog.d/805.security.mdadded.Note: #803, also carried by this lane, was investigated in depth but NOT fixed and stays open -- it is unrelated to this change and is not closed by this PR.
Closes #805
🤖 Generated with Claude Code
[AI-generated]