Repository navigation
refactor(cli): project view-delivery inspectors from their contracts - #10600
Merged
Merged
Conversation
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 reviewed changes appear safe to merge; no blocking issue was found. SummaryMoves seven inspectors onto contract-derived CLI descriptions, including the four view inspectors plus APK signature, desktop application, and EVM inspection.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Parsed CLI arguments] --> B[Decode optional view JSON]
B --> C[Check view and detail against contract]
C --> D[Require bundle path for summary]
B -->|Invalid JSON| E[Return input error]
C -->|Invalid input| E
D -->|Missing path| E
D --> F[Create service and inspect]
F --> G[Finish cleanup]
G --> H[Deliver complete Evidence or selected view]
H --> I[Publish complete Evidence when requested]
Reviews (3) · Last reviewed commit: "refactor(cli): project APK signature, de..." · Reviewed by Greptile |
Merged
19 tasks
morluto
force-pushed
the
refactor/cli-contract-json-options
branch
from
November 14, 2026 20:33
07d25a2 to
793dfbb
Compare
morluto
force-pushed
the
refactor/cli-contract-view-delivery
branch
from
November 14, 2026 20:33
4897cb8 to
3c850d0
Compare
morluto
force-pushed
the
refactor/cli-contract-json-options
branch
from
November 15, 2026 01:15
793dfbb to
1a19726
Compare
morluto
force-pushed
the
refactor/cli-contract-view-delivery
branch
from
November 15, 2026 01:45
3c850d0 to
e809764
Compare
morluto
changed the base branch from
refactor/cli-contract-json-options
to
main
November 15, 2026 04:34
morluto
force-pushed
the
refactor/cli-contract-view-delivery
branch
from
November 15, 2026 05:54
272142e to
84e1691
Compare
19 tasks
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
Fourth slice of plan W1, stacked on #10589 (base
refactor/cli-contract-json-options; retarget after #10571, #10576 and #10589 merge). Refs #10583 (the description stays framework-neutral).It adds a view-delivery declaration to the contract command description and migrates the four
--viewinspectors:inspect-rust-binary,inspect-python-pyc,inspect-erlang-beamandinspect-model-artifact. Their hand-written options, view decoding and input spreads are deleted.Problem and expected behavior
These four commands took
--viewas JSON text and each decoded and checked it by hand, in two different ways:{detail, view}against a delivery schema that duplicated their contract'sdetail-discriminated union (pythonPycDeliverySchema,erlangBeamDeliverySchema).kindthemselves, and Rust chosesummarywhen a view was given without--detail.The derived commands must keep:
--schemaof each command;view must be valid JSON(Python, Erlang),view must be a JSON package or edge selection(Rust),view must be a JSON model page selection(model), and the contract's own messages for a view with complete detail;--evidence_outputbefore any target is opened.Change and scope
contractCliDescription.ts:viewDelivery: { invalidJson, kind?, viewSelectsSummary? }, which requiresevidenceDelivery.--viewstays a string option. When the command runs, its JSON is decoded, then the contract input schema admits it together withdetailand the other inputs. Issues are projected withanalysisInputErrorFromIssues, as before.delivery(values)now returns aResult, and isundefinedwithoutevidenceDelivery. It also refuses summary delivery without--evidence_outputfor every delivering command, before the service is created. This was already the order for Python and Erlang. For Go, V8, the delivery inspectors, Rust and model, the refusal moves from insidedeliverCliAnalysisEvidenceto before service creation, and the output is byte-identical (captured below).detail,view) may differ, and anything else is refused at registration. Ax-rea-root-discriminatornaming a delivery field is accepted. The description exposesfields(each field's schema) so the parity guard no longer readsinputSchema.shape.contractCommand.ts: the Incur adapter projects a refused delivery as the analysis error, anddeliverWithServiceforwards the admitted view.detail: "complete"to the service, as before, because the CLI delivers the summary itself.pythonPycDeliverySchemaanderlangBeamDeliverySchema, which are now unused (the contracts keep the shared branch shapes);binaryDiagnosticsCommands.ts.PRODUCER_LIMITS_HELPis exported once fromproducerLimitsOption.ts.parseCliAnalysisEvidenceDeliverystays for the hand-written browser, Electron and static-endpoint commands until they migrate.Contract and boundary impact
describeContractCommand) and its run-time delivery admission.--schema: semantically identical for all four commands; only key order differs.--evidence_outputlast.deliverCliAnalysisEvidenceare used.Expected effects:
(No effect changes: the migrated commands keep their existing behavior.)
Evidence and regression coverage
tests/boundary/cli/cliContractCommandParity.test.ts. It now covers 24 projected commands.--detail summarywithout--evidence_outputatevidence_output, and admits it with one.--viewJSON atviewwithinvalid_format, and admits exactly the{},[],nulland unknown-key views its contract admits under complete and summary detail.registers the migrated commands).--schema --format json,--helpand 23 argv runs before and after, throughcreateCli().serve. The argv runs cover malformed view JSON, a view with complete detail, summary without--evidence_output, invalid view kinds and collections, malformed--producer-limits, a non-decimal integer and plain runs.--schema: semantically equal for all four commands.--help: the same lines, in a different order.Validation performed
npm run check:fast: passed (typecheck and lint).npm run knip: no findings.npx oxfmt --checkon the changed files: clean.npm run test:focused --15 files: 15 passed; 322 tests passed.pythonPycCli,erlangBeamCli,rustBinaryCli,modelArtifactCli,rustDependencyViews,rustUnnamedSections,modelSafetensorsZipCollision,applications/erlangBeamViewsandapplications/pythonPycViews.localPathAdmissionCliandformatSpecificCallerPathCli.cliIntegerArguments,evidenceOutputPublicationCliandartifactInputLimits.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.