Repository navigation
Name review snapshots by naja's content hash - #35
Merged
Merged
Conversation
A snapshot id was the sha256 of the naja-if dump, which includes the producer's version, so the same netlist got a different id per naja build. Use NLUniverse.getContentHash() (najaeda >= 0.7.35) instead: it survives a naja-if reload, so a reopened snapshot resolves its threads exact. - The dump is written only when a thread is first opened on a design, straight into the review (staging dir + rename, first writer wins). - Opening a thread is refused while the universe holds several design DBs: the snapshot holds only the top one, so it wouldn't reload under its own id. - load_review_snapshot() returns the loaded top (it returned None) and warns when the reloaded netlist doesn't hash to its name. - The anonymous-instances fixture destroys the DB it creates. - najaeda floor and thirdparty/naja moved to 0.7.35.
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.
Why
A review snapshot was named by the sha256 of its naja-if dump. The dump records the producer's naja version, so the same netlist got a different id with each naja build, and threads written on one machine could show as
other_snapshoton another.What
NLUniverse.getContentHash()(naja #514, najaeda >= 0.7.35). The hash is the same after a naja-if reload, so a reopened snapshot resolves its threadsexact. A fresh load of the HDL/Liberty sources gets the same id only when naja assigns the same ids (file order matters). That is accepted: reopen the snapshot instead.load_review_snapshot()now returns the loaded top design (it returnedNone), and it warns when the reloaded netlist doesn't hash to its folder name.exact.protocol.py,pyproject.toml, the CI matrix, and thethirdparty/najasubmodule (v0.7.35).docs/review_format.md(Snapshots section) andCLAUDE.md.Tested
pytest python/tests: 181 passed on najaeda 0.7.35.Known limits