Repository navigation
fix(id/artifact): bound home_declared world_id and refuse duplicate endpoints (#3187) #4432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: developing-today/code
Length of output: 10896
Script executed:
Repository: developing-today/code
Length of output: 7045
Strict receipt refuses home declarations with
world_idlonger than 64 bytes, which stops peer pulls.Before this change, a home declaration with a
world_idof any non-empty length was accepted on receipt.Directory::receive_artifactnow calls the strictparsed()(pkgs/id/src/directory.rs:1380), which rejectsworld_idvalues overMAX_WORLD_ID_BYTES(pkgs/id/src/artifact.rs:410-414). The refusal ends the page inapply_pageand the pull inpull_within. Later artifacts from that account are not applied, so a peer whose chain contains such a declaration cannot advance past it.The replay mode that skips the bound is used only when a local log is reopened and in one lookup. It is not used on the receive path, so it does not cover pulled artifacts.
The declaration is signed and cannot be rewritten. Accepting it on receipt needs an explicit historical-receipt rule. Accepting it because a remote peer logged it is not a validation boundary, because the pulling peer has no local check of that claim. A workable rule needs a trusted cutoff that marks the pre-upgrade chain state. The strict bound should still apply to new receipts. Choose that cutoff and its source before changing
receive_artifact.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disposition (queue task 5758, lane D worker, 2026-11-02): finding verified as valid; merge of this PR is held on it — not fixed in this PR, by design.
Verified against this head (
ee4ec5e42):Directory::receive_artifact(pkgs/id/src/directory.rs:1380) calls the strictartifact.parsed()?, so a pulled pre-upgradehome_declaredentry with aworld_idoverMAX_WORLD_ID_BYTESrefuses the receipt and ends the page/pull, exactly as described. The lenientparsed_for_replaypath covers only local log reopen and thedeclared()lookup — not pulled artifacts.Why it is not fixed here: as this thread itself states, accepting historical pulled artifacts needs a trusted cutoff and its authoritative source, and peer provenance alone is not a validation boundary. Choosing that cutoff is a contract decision under design #3231 (the #3232 Phase 3 audit is the likely venue), outside issue #3187's pinned scope (bound
world_id+ refuse duplicates inparsed(), with new receipts strict). Wideningreceive_artifactto the replay rule inside this PR would silently make provenance a boundary — the failure mode this finding warns against.Tracked as its own issue: #4459 — "peer pulls halt on pre-upgrade home_declared entries — the #3187 strict receipt needs a trusted historical cutoff for receive_artifact". Queue task 5758 is parked with PR #4432's merge held until #4459's cutoff is decided (or #3231/#3232 rule that strict receipt on pulls is the intended contract, in which case this thread closes as accepted behavior).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dezren39 Understood. The finding remains valid and unresolved. Tracking it in
#4459does not fix the peer-pull failure in this PR.I agree that
receive_artifactmust not useparsed_for_replay()merely because a peer supplies historical artifacts. Local replay compatibility does not establish trust for remote receipts.The next step is the contract decision in
#4459:#3231/Phase 3 (audit) of #3231 — field-by-field receipt-validation audit for pkgs/id artifacts + contract statement #3232 decision that strict rejection on pulls is intended.Until that decision is available, I recommend retaining the merge hold you described. This reply does not change provider approval or merge settings.
You are interacting with an AI system.