Repository navigation
refactor(cli): project Go, V8 and delivery inspectors from their contracts - #10576
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 634ada185b
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
[Low impact] The PR appears safe to merge; no actionable new defects were found. SummaryMoves four inspectors onto
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A["Named tool contract + CLI projection"] --> B["describeContractCommand"]
B --> C["registerContractCommand"]
C --> D["Analysis input"]
C --> E["Delivery choices"]
D --> F["Service inspection"]
F --> G["Existing cleanup helpers"]
E --> H["Existing Evidence delivery"]
G --> H
H --> I["Complete Evidence or summary + bundle"]
Reviews (5) · Last reviewed commit: "refactor(cli): project Go, V8 and delive..." · Reviewed by Greptile |
634ada1 to
377a0ba
Compare
|
The Greptile summary's Issue 1 ("Contract selection depends on order") was reviewed at
@greptileai please re-review. |
…racts Migrate inspect-go-binary, inspect-v8-code-cache, inspect-devicetree and inspect-native-exports onto the contract command description and delete their hand-written options and input spreads. The description gains evidenceDelivery. It adds the shared --detail and --evidence_output options, and the run context carries the selected delivery. A contract detail field selects that delivery and is not passed to the analysis, as the hand-written commands did. Go's cross-field budget rules stay with the service's contract parse, so standalone --max-string-literals still returns invalid_request. The parity guard accepts the declared CLI-only delivery options as the only options without a contract field.
377a0ba to
8c0e8ab
Compare
Summary
Second slice of plan W1, stacked on #10571 (base branch
refactor/cli-contract-command; retarget tomainafter #10571 merges). It moves four more contract-backed CLI commands ontoregisterContractCommandand deletes their hand-written option schemas and input mapping:inspect-go-binaryinspect-v8-code-cacheinspect-devicetreeinspect-native-exportsProblem and expected behavior
These commands restated their contract fields by hand.
inspect-go-binaryhad 11 conditional spreads and per-field renames. The derived projection must keep the CLI surface: command names, flags, positionals and help wording, plus where each refusal happens.Change and scope
src/cli/contractCliDescription.tsfrom refactor(cli): derive contract-backed command options from the tool contract #10571; Refs [Design] Replace incur with a contract-generated CLI layer now that REA owns its MCP server #10583):evidenceDelivery: truedeclares the shared--detail/--evidence_outputoptions (analysisEvidenceDeliveryOptions) as CLI-only options in the description. The Incur adapter renders them, the run context carries the selected delivery, anddeliverWithServicecallsdeliverCliAnalysisEvidence. A contractdetailfield selects that delivery and is not passed to the analysis, matching the hand-written commands.crossFieldRules: "argv".inspect-go-binary --max-string-literals 2without--include-string-literalsstill returns theinvalid_requestwith pathmax_string_literalsthattests/acceptance/goBinaryCli.test.tsasserts.include_string_literalsandarchitectureare projected asoptional(added in refactor(cli): derive contract-backed command options from the tool contract #10571), so help still shows--include-string-literalsas a flag and--architecture <x86|...>with its choices.--view/--producer-limitsoptions (rust, pyc, beam, model, binary layout, recorded crash); these need a JSON-option projection.Contribution scope: not applicable (refactor within existing boundaries).
Contract and boundary impact
registerContractCommand). The contract remains the single definition. Per-command option blocks and spreads for the four commands are removed.--schema: semantically identical for all four commands.--detail/--evidence_outputmove from first to last.deliverCliAnalysisEvidencewith the verbatim caller path.Expected effects:
(No effect changes: the migrated commands read the same files as before.)
Evidence and regression coverage
--schema --format jsonand--helpfor each command from the base build and after the change. The exact-optional help regression above was caught this way during development and is now guarded.overnightBatch1CliSchemas.test.ts.Validation performed
npm run typecheck: passed.npm run check:fast: passed.npm run knip: no findings.npm run test:focused --25 files (rerun after rebasing on the framework-neutral split): 25 passed; 415 tests passed, 1 skipped.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.