Repository navigation
refactor(cli): project GPU, signal and capture inspectors from their contracts - #10643
Merged
morluto merged 1 commit intoNov 14, 2026
Conversation
…contracts The contract command description gains JSON options decoded when the command runs, admitted with the delivery by the contract input, and bare flags that spell a nullable limit's null. inspect-gpu-code-objects, inspect-signal-decoders, decode-signal-recording, inspect-packet-fields and inspect-packet-capture are derived from their contracts; their hand-written options, superRefine blocks and CLI-only option schemas are deleted.
Codex Review Summary: ✅ CompletedThis 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. |
Contributor
[Medium impact] The PR appears safe to merge; no blocking issue was found. SummaryMoves five GPU, signal and capture commands onto their named contracts.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Parse CLI arguments] --> B[Check fields and flag conflicts]
B --> C[Map flags and decode run-time JSON]
C --> D[Check decoded input and delivery]
D -->|Refused| E[Return input error]
D -->|Accepted| F[Run service]
F --> G[Await cleanup and preserve results]
G --> H[Return or publish Evidence]
Reviews (1) · Last reviewed commit: "refactor(cli): project GPU, signal and c..." · Reviewed by Greptile |
19 tasks
morluto
added a commit
that referenced
this pull request
Nov 14, 2026
…contracts (#10643) The contract command description gains JSON options decoded when the command runs, admitted with the delivery by the contract input, and bare flags that spell a nullable limit's null. inspect-gpu-code-objects, inspect-signal-decoders, decode-signal-recording, inspect-packet-fields and inspect-packet-capture are derived from their contracts; their hand-written options, superRefine blocks and CLI-only option schemas are deleted.
morluto
added a commit
that referenced
this pull request
Nov 15, 2026
…contracts (#10643) The contract command description gains JSON options decoded when the command runs, admitted with the delivery by the contract input, and bare flags that spell a nullable limit's null. inspect-gpu-code-objects, inspect-signal-decoders, decode-signal-recording, inspect-packet-fields and inspect-packet-capture are derived from their contracts; their hand-written options, superRefine blocks and CLI-only option schemas are deleted.
morluto
added a commit
that referenced
this pull request
Nov 15, 2026
…contracts (#10643) The contract command description gains JSON options decoded when the command runs, admitted with the delivery by the contract input, and bare flags that spell a nullable limit's null. inspect-gpu-code-objects, inspect-signal-decoders, decode-signal-recording, inspect-packet-fields and inspect-packet-capture are derived from their contracts; their hand-written options, superRefine blocks and CLI-only option schemas are deleted.
morluto
added a commit
that referenced
this pull request
Nov 15, 2026
…PP from contracts (#10635) * refactor(cli): project CLI-only options for release exposure and IL2CPP from contracts The contract command description gains CLI-only options whose effect the handler owns, plus their dependentRequired entries. audit-release-exposure keeps --fail_on (exit status 3) and inspect-il2cpp-metadata keeps --ghidra-seeds/--seed-base; their hand-written options and input spreads are deleted. * refactor(cli): project GPU, signal and capture inspectors from their contracts (#10643) The contract command description gains JSON options decoded when the command runs, admitted with the delivery by the contract input, and bare flags that spell a nullable limit's null. inspect-gpu-code-objects, inspect-signal-decoders, decode-signal-recording, inspect-packet-fields and inspect-packet-capture are derived from their contracts; their hand-written options, superRefine blocks and CLI-only option schemas are deleted.
morluto
added a commit
that referenced
this pull request
Nov 15, 2026
…nce (#10606) * fix(cli): record the caller's --join-path spelling in Apple IPS Evidence * refactor(cli): project CLI-only options for release exposure and IL2CPP from contracts (#10635) * refactor(cli): project CLI-only options for release exposure and IL2CPP from contracts The contract command description gains CLI-only options whose effect the handler owns, plus their dependentRequired entries. audit-release-exposure keeps --fail_on (exit status 3) and inspect-il2cpp-metadata keeps --ghidra-seeds/--seed-base; their hand-written options and input spreads are deleted. * refactor(cli): project GPU, signal and capture inspectors from their contracts (#10643) The contract command description gains JSON options decoded when the command runs, admitted with the delivery by the contract input, and bare flags that spell a nullable limit's null. inspect-gpu-code-objects, inspect-signal-decoders, decode-signal-recording, inspect-packet-fields and inspect-packet-capture are derived from their contracts; their hand-written options, superRefine blocks and CLI-only option schemas are deleted.
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.
Summary
Eighth slice of plan W1, stacked on #10635 (base
refactor/cli-contract-option-effects; retarget as the lower PRs merge). Refs #10583.The contract command description gains two features, and five commands are derived from their contracts with them:
inspect-gpu-code-objects(--object_ids,--targets, and--view).null:inspect-signal-decoders --all,decode-signal-recording --all_lines,inspect-packet-fields --allandinspect-packet-capture --all_matches.Problem and expected behavior
These commands re-declared their contract fields by hand:
superRefine, anotconstraint and the null mapping. Two domain schemas (signalRecordingOptionsSchema,packetCaptureOptionsSchema) existed only for these CLI copies.The derived commands must keep their flags (including snake_case spellings such as
--line_limitand--display_filter), help,--schema, refusal messages (object_ids must be valid JSON,all and limit are mutually exclusive), the selector-budget refusal at argv parsing, and the service input.Change and scope
contractCliDescription.ts:runtimeJson: fields taken as JSON text, each with its refusal for text that is not JSON. The CLI admits any text; when the command runs, the text is decoded, and the decoded input, delivery and view are admitted together by the contract input before any target is opened.viewDeliverynow uses the same mechanism, so a view is one run-time JSON field.nullFlags: a nullable contract field whosenullis spelled by a bare flag. The option takes only a value (the contract field withoutnullor its default). The flag is a CLI-only boolean, the pair is refused at argv parsing with the previous message, and--schemaadvertises the samenotconstraint.admit(values)replacesdelivery(values)and returns the contract input with the delivery. Registration refuses run-time JSON combined with argv cross-field rules, which could not see the decoded values.contractCommand.ts: the adapter runsadmit.analyzeWithServiceruns a command with no target path throughfinishAnalysisCommand, as the two discovery commands did.signalRecordingOptionsSchemaandpacketCaptureOptionsSchema, which only these CLI copies used.null, the pair is refused, and thenotconstraint is advertised.range.Contract and boundary impact
contractCliDescription.ts). Per-command decoding, null mapping and mutual-exclusion code is removed.--schema: semantically identical for all five commands.Expected effects:
(No effect changes: the migrated commands keep their existing behavior.)
Evidence and regression coverage
registers the migrated commands).--schema --format json,--helpand 39 argv runs before and after throughcreateCli().serve, recording the CLI exit andprocess.exitCode.--object_ids,--targetsand--view;--object_idswithout--expected_sha256; a non-string object id; a non-array--targets; a view with complete detail; summary without--evidence_output; an unknown view key; an invalid--analysisand digest; a missing file; and a complete run on a small fixture.--producer-limits, a missing--decoders, a negative offset, and near-limit selectors.--schema: semantically equal for all five commands.capability_unavailable. A script registered both families with recording fake services and compared the input reaching the service for 15 argv lines, including--all,--all_lines,--all_matches, limits,--producer-limitsand relative paths. The values were identical before and after; only object key order differs.signalCleanupandcaptureCleanuptests pass with injected services.Validation performed
npm run check:fast: passed.npm run knip: no findings after deleting the two superseded schemas.npm run test:focused -- tests/boundary/cli/cliContractCommandParity.test.ts: 208 passed.npm run test:focused --signalCleanup,captureCleanup,gpuCodeObjectsCli,cliDomainFieldSchema,localPathAdmissionCli,rejectedSymlinkCliMcp,apkSignatureViewsCliMcp,modelArtifactCli,rustDependencyViews,evidenceOutputPublicationCli,formatSpecificCallerPathCli: 11 files, 80 tests passed.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.