Repository navigation
test(review): add organic provider role parity #374
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
Alan-TheGentleman
merged 4 commits into
Gentleman-Programming:main
from
barbatdev:test/311-p7-organic-role-parity
Aug 23, 2026
+394
−6
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c2f5ad4
test(review): add organic provider role vectors
innitdev 4ddc302
fix(review): bound provider role vector timeout
innitdev f75e4a3
fix(review): harden provider role vector execution
innitdev a1cfe01
fix(review): fail closed on ambiguous role outcomes
innitdev 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Enforce exactly one
--request-hash=token on the validator vector.ROLE_BINDING_RErequires exactly one--lineage=,--expected-revision=,--target=, and--repository-context=token, and the loop at lines 168-174 rejects duplicates.--request-hash=receives no such treatment. Line 183 only checksincludes(expectedToken).A validator descriptor that carries both
--request-hash=<bound>and--request-hash=<stale>therefore validates, and line 175 forwardsargumentTokensverbatim, so both tokens reach the providercapture-validationinvocation. The provider then resolves one of them, and the host cannot prove which. That defeats the request-hash / validation_request binding this function exists to preserve, and it is the same stale-binding class the other four prefixes fail closed on.Add a uniqueness check before the match assertion.
🛡️ Proposed fix
if (!isStr(vr.requestHash) || !REQUEST_HASH_RE.test(vr.requestHash)) fail(`${label}.validationRequest.requestHash must be a sha256 digest`); + const requestHashTokens = entry.argumentTokens.filter((t) => t.startsWith("--request-hash=")); + if (requestHashTokens.length !== 1) { + fail(`${label}.argumentTokens must include exactly one "--request-hash=" token, found ${requestHashTokens.length}; a second hash makes the bound validation_request ambiguous`); + } const expectedToken = `--request-hash=${vr.requestHash}`; if (!entry.argumentTokens.includes(expectedToken)) { fail(`${label}.argumentTokens must include the provider-issued "${expectedToken}" token that binds the embedded validation_request`); }Add matching coverage in
tests/maintainer/provider-relay.maintest.tsnext to the existing binding-uniqueness test at line 291.📝 Committable suggestion
🤖 Prompt for AI Agents