Repository navigation
pulse-memory: retrieve a verified pulse and fill hash fields - #74
Merged
Merged
Conversation
Add retrieve tests and assertions that a stored pulse keeps a content hash and a prefetch key, and that retrieve returns unknown on a mismatch or a stale row.
Compute verify_hash and prefetch_key on admit, add retrieve and backfill commands, and store the same fields from tstack-state instead of NULLs.
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.
skill: one-organism
proof: https://captain.kingsparrow.space/articles/memory-issue
The pulse store reserved
verify_hashandprefetch_keybut left them empty, and there was no retrieve command. This adds both fields on admit, a retrieve command that returns one verified pulse (or a few), and an idempotent backfill.Retrieve checks the content hash, treats a mismatch or a superseded row as unknown, prefers locked traces over open belief, and never prints the whole store. Prefetch keys are
{topic}/{kind}from the retrieval key, kind, and topic.tstack-state pulse admitnow stores the same hash and prefetch values instead of NULLs, andtstack-state pulse retrieveuses the same retrieve helper.Report
pulse_admit.pydid not write them;tstack-stateinserted NULL, NULL.python3 pulse-memory/test/test_retrieve.py(17 tests ok);bash pulse-memory/test/test-thin.sh(all checks passed);bash tstack/test/test-state.sh(all checks passed);bash tstack/test/test-thin.sh(all checks passed).