Repository navigation
fix(id): validate app manifest field values (#4063) - #4082
Merged
Merged
Conversation
parse_app_manifest was strict about shape but not values. Now: app.name/app.version must be non-blank; an [interfaces.cli] section must list at least one command and command names must be non-blank; capabilities.request entries must be non-blank and duplicates are rejected (not deduplicated — a repeat is an authoring mistake the gate names); program.module_hash must be 1..=64 plain hex digits, the same rule as the world-apply manifest (world_manifest.rs). Unit tests cover each rejection; the checked-in tic-tac-toe manifest still parses.
|
Warning Review limit reachedYou'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 11 minutes. View limit details
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. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Nov 2, 2026
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.
Closes #4063. Queue task 5971 (repo-health-code-pilot).
parse_app_manifestwas strict about manifest shape but barely checked field values. This change adds the missing value validation inpkgs/id/src/app_manifest.rs:app.nameandapp.versionmust be non-blank.[interfaces.cli]section must list at least one command (an emptycommandslist no longer satisfies the at-least-one-interface rule), and command names must be non-blank.capabilities.requestentries must be non-blank; duplicates are rejected, not deduplicated — the manifest is the strict record of what an app asks for, and a repeat is an authoring mistake the gate should name (rule pinned by a test).program.module_hashmust be 1..=64 plain hex digits — the same rule as the world-apply manifest (world_manifest.rs,MAX_NAME_BYTES = 64).Out of scope per the packet:
resources.filesconfinement (#4059) and web route validation (#4060) are untouched; discovery behavior for present roots is unchanged.Tests
rejects_blank_name_and_version,cli_interface_must_offer_a_real_command,rejects_blank_and_duplicate_capability_requests,module_hash_must_be_bounded_plain_hex.app_manifest.rs(the creator-probe pattern): 8/8 tests pass — the 4 new tests plus all 4 pre-existing ones, including tic-tac-toe manifest parsing and discovery.pkgs/id/apps/tic-tac-toe/app.toml, web-only) satisfies the new rules.cargo test --lib app_manifest(default features) running on the laptop worktree; result will be noted on issue id(app_manifest): strict-shape parser accepts blank/garbage field values — empty name/version, zero-command CLI interface, non-hash module_hash #4063. (A--no-default-featureslib-test build fails pre-existing on main with E0432/E0433 feature-gated import errors, unrelated to this change.)Need help on this PR? Tag
@codesmith-botwith what you need.