Skip to content

fix: witness list changes must be witnessed by the prior list (#6)#7

Merged
swcurran merged 2 commits into
mainfrom
fix/witness-prior-list-6
Jun 9, 2026
Merged

fix: witness list changes must be witnessed by the prior list (#6)#7
swcurran merged 2 commits into
mainfrom
fix/witness-prior-list-6

Conversation

@IVIR3zaM

@IVIR3zaM IVIR3zaM commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Per spec §3.7.5 a replacement witness list only becomes active after the entry that introduces it is published, so that entry must be witnessed by the list in effect before it. WizardWitnessProofs and WitnessValidator were using the new (merged) list instead, so reducing a list (e.g. two witnesses down to one) produced and required only a single proof. Both now use the prior active list whenever witnessing was already active, with the new list applying only on first activation, matching the Rust reference output for vectors/witness-update.

Add WitnessValidator regression tests for the witness-update reduction scenario, update the CHANGELOG [Unreleased] section, and document the changelog/commit workflow in docs/AGENTS.md.

Fixes #6

Per spec §3.7.5 a replacement `witness` list only becomes active after the
entry that introduces it is published, so that entry must be witnessed by the
list in effect before it. WizardWitnessProofs and WitnessValidator were using
the new (merged) list instead, so reducing a list (e.g. two witnesses down to
one) produced and required only a single proof. Both now use the prior active
list whenever witnessing was already active, with the new list applying only on
first activation, matching the Rust reference output for vectors/witness-update.

Add WitnessValidator regression tests for the witness-update reduction scenario,
update the CHANGELOG [Unreleased] section, and document the changelog/commit
workflow in docs/AGENTS.md.
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.88%. Comparing base (220508b) to head (54babc6).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main       #7      +/-   ##
============================================
+ Coverage     82.83%   82.88%   +0.04%     
+ Complexity      606      605       -1     
============================================
  Files            53       53              
  Lines          1730     1729       -1     
  Branches        304      303       -1     
============================================
  Hits           1433     1433              
  Misses          128      128              
+ Partials        169      168       -1     
Files with missing lines Coverage Δ
...ntity/didwebvh/core/validate/WitnessValidator.java 86.48% <100.00%> (+1.15%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Bump parent + module poms from 0.3.0-SNAPSHOT to 0.3.1-SNAPSHOT and
update README Maven/Gradle coordinates to 0.3.1.

Promote the witness-list-timing fix (issue #6) from [Unreleased] to a
new "## [0.3.1] - 2026-06-09" CHANGELOG entry and add the compare links.
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

@swcurran swcurran left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- ran the test-suite on the change and confirmed it worked after a change to the test-suite implementation. Will push an update to the test suite after merging this.

@swcurran swcurran merged commit a0f7a54 into main Jun 9, 2026
7 checks passed
@IVIR3zaM IVIR3zaM deleted the fix/witness-prior-list-6 branch June 9, 2026 18:40
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.

Witnessing problem demonstrated by "witness-update" test in did:webvh Test Suite

2 participants