Repository navigation
ci: replay RFC 8785 byte vectors and canonicalize the shared fixtures - #264
astrogilda wants to merge 2 commits into
Conversation
Add a jcs-vectors job that installs a pinned agent-evidence-vectors release, replays its RFC 8785 byte vectors against the reference canonicalizer, and canonicalizes every JSON file under fixtures/. A fixture with a duplicate key, NaN or Infinity, or no stable canonical form fails the job; each fixture's canonical SHA-256 goes to the job summary. A pip entry in dependabot.yml opens the bump pull request when a new release ships. Signed-off-by: Sankalp Gilda <23521054+astrogilda@users.noreply.github.com>
aeoess
left a comment
There was a problem hiding this comment.
I reran the script at e6cf986 with agent-evidence-vectors 0.36.3. All 19 fixtures canonicalize. Adding a fixture with a duplicate key or NaN makes it exit 1.
One change before merge. The byte-vector step counts failures but does not check how many cases ran. The pinned package supplies 53 RFC 8785 vectors. When I forced its vector iterator to return no cases, the script still exited 0 with the same success summary.
Please report the number of byte vectors replayed and fail when it is zero. The count should come from the cases actually checked, so it can grow with later releases.
The replay now counts the byte vectors it walks from the package's own vectors() iterator, prints the count, writes it to the job summary and exits 1 when it is zero. A test forces the empty iterator and a second step in the job runs it. Signed-off-by: Sankalp Gilda <23521054+astrogilda@users.noreply.github.com>
|
@aeoess thank you for catching that an empty vectors iterator passed silently. astrogilda-forks@2a89512 counts the RFC 8785 byte vectors the replay job runs, prints the count, writes it to the job summary and exits 1 when it is zero. A new test forces the empty iterator, and the jcs-vectors workflow runs that test as its last step. |
aeoess
left a comment
There was a problem hiding this comment.
2a89512 addresses my review. The JCS job replays 53 byte vectors, passes all 19 fixtures and now fails when no vectors run.
The remaining Validate failure comes from nine expired review_by dates on main, not this PR. Nothing further needed from you. Thanks for fixing this.
@aeoess, the jcs-vectors job replays the RFC 8785 byte vectors from the published agent-evidence-vectors package, pinned at 0.36.3, then canonicalizes the JSON files under fixtures/. A duplicate key, NaN, Infinity or an unstable canonical form fails the job. A pip entry in dependabot.yml opens a bump pull request for each package release, so each release is tested against those files before it lands.
This adds the CI job described in #244. The job exits 0 on the current fixtures and is ready to merge. To run it locally, install .github/ci/requirements-aev.txt in a venv and run
python -I scripts/ci/check-fixtures-jcs.py.