GeezerVison is showing github.com — id-caps: Roc library import gate — subset checks, §5 diagnostics, #5994 fixture matrix (#10027) by dezren39 · Pull Request #10326 · developing-today/code
Conversation
dezren39
commented
Nov 14, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Implements §7 of the merged #5956 design record (PR #10023) for #10027 — the Roc library import gate, steps 3–4, consolidated with steps 1–2 (step 1 landed as commit 1f12efe on a sibling branch and its content is carried in this branch's step-2 commit; step 2 by lane code-b's fallback worker). This branch is the single consolidation point: parser + resolver + gate + fixtures.
Step 3 — the import gate (id-caps::library_gate, new)
check_import consumes the §4 resolution record and runs the three §3 subset checks: transitive requirements ⊆ selected platform surface; transitive requirements ⊆ world requested set; discovered-used (whole closure) ⊆ world requested set, with the declaration half (discovered-used ⊄ declared) reported as declaration_mismatch. Refusals carry the §5 contract exactly:
- code
import_requirement_unmet, one subreason per failed check (not_on_platform, not_requested, unknown_requirement, version_mismatch, declaration_mismatch, unverified_provenance);
- the excess set exhaustively, sorted, never just the first;
- what it was checked against (platform identity + catalog version from the record's checked surface, the world's requested set);
- a remedy per subreason, in the same terms.
Resolution refusals (cycle / unknown manifest / pin conflict) pass through unre-decided. Declared-only URL imports are refused only when the world requires checked requirements (§4). The gate mints no grants, ceilings, or consent; world_caps.rs runtime rules are untouched. 11 oracle tests, including the §5 worked example (greeter → chess-room on platform-no-caps) verbatim.
Step 4 — #5994 §4 fixture matrix (pkgs/id/examples/roc-import-policy/)
fixtures.json + the id-caps integration test roc_import_policy run the real pipeline per case (parse → resolve → gate), each negative case pinning subreason + exact excess set as its oracle: pure positive control; standard-dependent positive/negative incl. the transitive-closure row; URL declared-only under both policies; declaration mismatch. The scratch-fs / host-read / net rows are specified per §4 and pin today's truth — those names are not in the catalog yet, so the gate refuses them as unknown_requirement; the README records that their oracles move to not_on_platform when the providers land. The two Roc-compile negative fixtures remain the roc-cap-demo tests (the designs' named baseline), not duplicated. roc-test.sh invokes the runner when cargo is on PATH and says so explicitly when it is not.
Step 5 — citations
This PR and the closing notes on #10027 / #5994 point readers at id-caps (library_manifest, library_resolution, library_gate) as the home of the requirement record, resolver, and gate next to world_caps.rs.
Verification
cargo test -p id-caps: 118 unit tests (107 pre-existing + 11 new gate oracle tests) and the fixture integration test, all passing on this branch merged with current main.
cargo check -p id (facade): compiles.
bash pkgs/id/examples/roc-import-policy/roc-import-policy-test.sh: passes.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…§7 step 3, #10027)
New library_gate module: check_import consumes the §4 resolution record and runs the §3 checks (transitive requirements ⊆ selected platform surface; transitive requirements ⊆ world requested set; discovered-used over the whole closure ⊆ world requested set, with the declaration half reported as declaration_mismatch). Refusals carry the §5 contract: code import_requirement_unmet, one subreason per failed check (not_on_platform, not_requested, unknown_requirement, version_mismatch, declaration_mismatch, unverified_provenance), the excess set exhaustively and sorted, the checked-against surface from the record, and a remedy per subreason. Resolution refusals pass through unre-decided. Declared-only URL imports are refused only when the world requires checked requirements (§4). The gate mints no grants or ceilings; runtime rules in world_caps.rs are untouched. 11 oracle tests including the §5 worked example verbatim; id-caps suite 118/118.
…port-policy + roc-test.sh (#5956 §7 step 4, #10027)
fixtures.json carries the matrix rows as executable cases run by the id-caps integration test roc_import_policy (manifest parse → resolution → gate; each negative case pins subreason + exact excess set as its oracle): pure positive control, standard-dependent positive/negative (incl. the §5 worked example and the transitive-closure row), URL declared-only under both policies, declaration mismatch. The scratch-fs/host-read/net rows are specified per #5994 §4 and pin todays truth — those names are not in the catalog yet, so the gate refuses them as unknown_requirement; the README records that their oracles move to not_on_platform when the providers land. The two Roc-compile negative fixtures stay in roc-cap-demo (the designs named baseline) and are not duplicated. roc-test.sh invokes the runner when cargo is on PATH and says so explicitly when it is not.
Codex Review Summary: ❌ Failed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
❌ Failed 2026-11-14T18:14:19.645602Z We couldn’t complete this review. Comment @codex review to try again. |
b35b70e |
Manual request |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Warning
Review limit reached
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 1 minute.
Check out review usage here.
View limit details
-
Limit details: You’ve used the included review currently available.
Learn how review limits work.
Review configuration:
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
61f79ba1-7b52-480d-90a8-559368dbb55c
Commits
-
Reviewing files that changed from the base of the PR and between 20c7ff4 and b35b70e.
Files selected for processing: 7
-
pkgs/id/crates/id-caps/src/lib.rs
pkgs/id/crates/id-caps/src/library_gate.rs
pkgs/id/crates/id-caps/tests/roc_import_policy.rs
pkgs/id/examples/roc-import-policy/README.md
pkgs/id/examples/roc-import-policy/fixtures.json
pkgs/id/examples/roc-import-policy/roc-import-policy-test.sh
pkgs/id/scripts/roc-test.sh
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@codex review
Automated review request per the repo's review gate (lane code-d, task 16915). Scope: the new library_gate module (subset checks + §5 diagnostics), the roc_import_policy integration test, the fixture matrix, and the roc-test.sh wiring. Steps 1–2 (parser, resolver) are prior commits on this branch included for consolidation.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Review-gate disposition (lane code-d, 2026-11-14): Codex review was requested and FAILED on account usage limits ("You have reached your Codex usage limits for code reviews") — it produced zero findings (no review, no inline comments). CodeRabbit likewise reported its review limit. This is the same account-wide Codex exhaustion seen on this shift's earlier PRs. Proceeding on local verification instead: cargo test -p id-caps 118 unit + fixture integration test green on the merged-with-main branch, cargo check -p id compiles, and the roc-import-policy runner script passes. Merging per the fleet rule (merge when verified; CI runs on main).
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 14, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|