Restamp the discovery link instead of appending - #9
Merged
Conversation
Every countersign round appended another copy of the discovery link, so an envelope returning from a verification provider went out with duplicate link keys — invalid, and the subject's inbox answered 422. The link is now stripped and restamped before countersigning, in both Register and Verify, which also heals stored records that already carry duplicates (countersigning those would fail post-sign validation and wipe the envelope's signatures). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Found live: the verifier round trip completed (four signatures aboard, auto-verify fired), but lookup's delivery back to the subject failed with
HTTP 422— the returned envelope already carried the round-1 discovery link,Registerappended a second identical one, and duplicate link keys fail envelope validation at the subject's inbox. Visible on the public record:/parties/019fedd8-…currently serves two identicalverification/lookuplinks.stampDiscoveryLinkstrips every existing copy and stamps one fresh link, before countersigning, in bothRegisterandVerify.Envelope.Sign's post-validation and wipe its signatures, wedging the recovery path.Validate()-clean envelope;Verifyrecovers a record seeded with duplicates.Stacked on #8 — retarget to
mainonce it merges. Recovery for the wedgedsamtest.sandbox.invopop.netrecord after deploy:gobl.lookup verify samtest.sandbox.invopop.net(or re-run the kyb confirmation link), which restamps and re-delivers.🤖 Generated with Claude Code