Skip to content

Tests for the memory reviewer overwrite fix - #2098

Open
hjbrandt wants to merge 2 commits into
danielmiessler:mainfrom
hjbrandt:test/memory-stale-base-write
Open

Tests for the memory reviewer overwrite fix#2098
hjbrandt wants to merge 2 commits into
danielmiessler:mainfrom
hjbrandt:test/memory-stale-base-write

Conversation

@hjbrandt

Copy link
Copy Markdown

Tests for #2097, and built on top of it.

There are 13 cases. Each one runs in its own process with a temporary home folder, so the real memory files are never touched. One of them replays the original problem, and it fails on the code without the fix.

There are no other test files in the repo yet, so I kept these separate. Happy to move them or drop them.

The reviewer reads the two memory files, thinks for a few minutes, then
writes back a full replacement. Any change made to a file during those
minutes was erased. Now the reviewer keeps a fingerprint of what it read
and skips the write if the file has changed since. Skipped writes are
logged and shown by the memory health check for 24 hours.
13 cases, each in its own process with a temporary home folder, so real
memory files are never touched. The replay case fails without the fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant