Repository navigation
fix: distinguish invalid snapshot ages from stale evidence - #418
Merged
Merged
Conversation
what changed Researcher-release validates snapshot-max-age-ms before resolving or reading evidence. The release and snapshot facades classify a non-finite, negative or nonnumeric allowance as INPUT-SNAPSHOT-MAX-AGE / INCOMPLETE. Added CLI and facade regressions and updated the architecture map, changelog and inventory. why Fixes #343. NaN or a negative allowance was reported as stale snapshot evidence; a valid package could instead pass if it had no snapshot to judge. Input errors now remain input errors, while a finite non-negative allowance retains real freshness checks. what it touched research-kit/bin/researcher-release.mjs, research-kit/lib/release-validator.mjs, research-kit/test/release-validator.test.mjs, docs/ARCHITECTURE.md, CHANGELOG.md and research-kit/README.md. The error uses the existing input-error reduction, with no new flag, schema or publication behavior. what you verified verified: the added regressions were red on the base (14 passed, 2 failed) and the focused release-validator group passed after the fix (16 passed, 0 failed). expected: the strengthened valid-package fixture and full offline suite will run through the normal commit gate; final results accompany the PR. what you got wrong and fixed mistake: the initial facade fixture named an artifact in its registry but did not write that record. where: research-kit/test/release-validator.test.mjs, invalid snapshot-age facade regression. impact: the initial fixture could not prove that the same package passes with a valid allowance; no shipped validator behavior was affected. cause: fixture setup wrote the registry and role roster but omitted the artifact file. fix: wrote the valid envelope and added a baseline PASS assertion before exercising invalid allowances. verified: the initial focused group passed 16 tests; expected: the normal commit gate covers the strengthened final fixture and full suite.
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.
Invalid snapshot-age values now produce a usage error (exit 2) in
researcher-release validate, andINPUT-SNAPSHOT-MAX-AGE/INCOMPLETEfrom the release and snapshot library boundaries.SNAPSHOT-STALEremains reserved for a real snapshot older than a valid finite, non-negative allowance, including a zero allowance.Fixes #343.
what changed
Researcher-release validates snapshot-max-age-ms before resolving or reading evidence. The release and snapshot facades classify a non-finite, negative or nonnumeric allowance as INPUT-SNAPSHOT-MAX-AGE / INCOMPLETE. Added CLI and facade regressions and updated the architecture map, changelog and inventory.
why
Fixes #343. NaN or a negative allowance was reported as stale snapshot evidence; a valid package could instead pass if it had no snapshot to judge. Input errors now remain input errors, while a finite non-negative allowance retains real freshness checks.
what it touched
research-kit/bin/researcher-release.mjs, research-kit/lib/release-validator.mjs, research-kit/test/release-validator.test.mjs, docs/ARCHITECTURE.md, CHANGELOG.md and research-kit/README.md. The error uses the existing input-error reduction, with no new flag, schema or publication behavior.
what you verified
verified: the added regressions were red on the base (14 passed, 2 failed) and the focused release-validator group passed after the fix (16 passed, 0 failed). verified: the normal git commit gate ran the full staged offline suite and allowed commit a3bbfd8. The local gate permits unavailable capabilities under ADR-0108 and discards their detailed totals. verified: all seven required CI jobs passed for head
a3bbfd8aa418bfb5f77cfc200e11c06b595d1bd9in offline-suite run #777. The completed Node 24 log reports 1,847 passed, 0 failed in 199.3s.what you got wrong and fixed
mistake: the initial facade fixture omitted its artifact record. where: release-validator.test.mjs's invalid-age regression. impact: it could not prove the package passes with a valid allowance; no delivered behavior affected. cause: setup wrote only registry and roles. fix: write the valid envelope and assert baseline PASS. verified: initial focused group passed 16 tests; verified: the full normal commit gate passed with the strengthened baseline PASS assertion.