Repository navigation
refactor(cli)!: name a failure's per-call control flag at the CLI boundary - #11413
Conversation
Codex Review Summary: ❌ FailedThis 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
[Medium impact] The reviewed changes appear safe to merge; no new actionable issue was found. SummaryServices report the contract field that controls a failure. The CLI adds its own flag spelling through the shared command description.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
Service["Service reports parameter and limit facts"] --> Error["Shared error output"]
Error --> MCP["MCP keeps contract field"]
Error --> CLI["CLI reads command binding"]
Binding["Command owns field-to-flag map"] --> CLI
CLI --> Output["CLI adds cli_flag when bound"]
Reviews (4) · Last reviewed commit: "refactor(reverse): bind command_timeout_..." · Reviewed by Greptile |
…ndary Services name the contract field a deadline failure reports in details.limit.parameter; a contract command's output projection adds details.limit.cli_flag from the command's own field-to-flag binding. BREAKING CHANGE: MCP failures no longer carry details.limit.cli_flag, and native deadline remediation text no longer names the CLI flag. CLI output still reports cli_flag for the command that ran.
…the test's exit status
07cffd8 to
14c1c3b
Compare
|
@greptileai review |
… an objdump or Rizin deadline (#11442) * refactor(reverse): bind command_timeout_ms as the per-call control of an objdump or Rizin deadline The deadline failure now comes from nativeDeadlineRecovery: it names command_timeout_ms and carries limit {control_kind: "parameter"}, so the CLI projection adds --command-timeout-ms and MCP output names the field only. The service no longer writes CLI flag text. * refactor(wasm): bind max_artifact_paths as the per-call control of an auxiliary path admission refusal (#11444)
|
@greptileai review |
Summary
Services now name only the contract field a per-call control failure reports; the CLI adds the flag.
details.limitwithcontrol_kind: "parameter"keepsparameter(the contract field) on every surface, and a contract command's output projection addscli_flagfrom that command's own field-to-flag binding. Native deadline remediation text no longer names CLI flags. Structural audit plan W1 item 4, first slice under the coordinator decision: "services name the field only; the CLI adapter, through the one field-to-flag mapping owner, renders the CLI option in CLI output". Thecli-option-text-outside-cliguard (#11315) ratchets from 41 to 37.Problem and expected behavior
nativeDeadlineRecoverytook acliFlagfrom each service (--native-command-timeout-ms,--native-ui-deadline-ms,--pwntools-timeout-ms), wrote "or pass --flag on the CLI" into the remediation and returnedlimit.cli_flag. Every service thus held a copy of the CLI's option spelling, which goes stale when a command renames its option, and MCP callers received CLI instructions. Expected: the service names the field; the CLI, which owns the spelling, names the flag in CLI output.Change and scope
ContractCliDescription.inputBinding.flags(owner): each contract field, orfield.memberfor a flattened member option, that the command takes as an option, mapped to its--kebab-caseflag. Positionals and delivery options are excluded.projectCliInputFields(already applied to every contract command's output): besides renaming issue paths, it addsdetails.limit.cli_flagwhen the failure reports aparametercontrol the command takes. The longest bound prefix of the parameter path names the flag, soproducer_limits.output_bytesmaps to--producer-limits. A control the command does not take gets no flag.AnalysisControlLimitdropscli_flag;nativeDeadlineRecoverydropscliFlag, and its text names the field only. Sites:NativeUiInterruptionControl,NativeCommandAnalysisError(2),PwntoolsFailures(timeout).docs/design/limits-and-recovery.mdstates who addscli_flag.cli.commands that do not pass through this owner yet, so they first needregisterContractCommand), result limitation text, selection hints, and text that names CLI-only commands.Ordinary refactor within existing boundaries; maintainer scope decision covered by the coordinator's item 4 decision.
Contract and boundary impact
limit.parameter.details.limit.cli_flagand the "or pass --flag on the CLI" clause; CLI failures of contract commands keepcli_flag. Schemas unchanged (detailsis open).docs/public/product-catalog.json), package, or installation impact: none.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
tests/boundary/cli/cliControlFlag.test.ts(new): a contract command whose handler returns a deadline failure built bynativeDeadlineRecoveryreportscli_flag: "--worker-timeout-ms"on the CLI while the MCP projection has nocli_flagand no--text; member and whole-field flags and unbound controls.NativeCommandAnalysisError.test.tsandPwntoolsFailures.test.tsno longer expectcli_flagfrom the service;projectCliAnalysisResult.test.tsbinding gainsflags.projectCliAnalysisResult.ts, the build fails (the binding has noflags), and the CLI assertion needs the addedcli_flag.details.limitfornative_command_timeout_ms:{ control_kind: "parameter", parameter: "native_command_timeout_ms", effective_value, unit, minimum, maximum, default_value, applies_at }; CLIinspect-machoaddscli_flag: "--native-command-timeout-ms".Validation performed
npm run check:fast— passed;node scripts/verify/architecture-guards.mjs --shrink-baselinesloweredcli-option-text-outside-clito 37 sites in 21 files.npm run test:focused --overcliControlFlag,projectCliAnalysisResult,NativeCommandAnalysisError,PwntoolsFailures,NativeUiObservation,cliContractCommandParity,utilityIntegerOptions,nativeDeadlineFlags,contractCommandInputFields,contractJsonInputChecks— 10 files, 1126 passed.npm run docs:check— passed.process.exitCode. The new nested-binding test fails with the old key.npm run check:fastpassed;cliControlFlag,cliContractCommandParity,projectCliAnalysisResult: 1047 passed.Compatibility, safety, and release
!). Before, an MCPprovider_timeoutfornative_command_timeout_mscarrieddetails.limit.cli_flag: "--native-command-timeout-ms"and remediation "... or pass --native-command-timeout-ms on the CLI". Now MCP carries the field only; CLI output of contract commands still carriescli_flag. Readdetails.limit.parameterfor the field; a CLI wrapper readscli_flagfrom CLI output. No alias: the domain no longer knows CLI spellings.Collapsed into this PR
refactor(reverse): an objdump or Rizin command deadline now comes fromnativeDeadlineRecoveryand bindscommand_timeout_ms(details.limit,control_kind: "parameter"); the service no longer writes--command-timeout-ms. Regression:reverseEngineeringCommands.test.tsruns the objdump CLI command over the real service with an owned-command timeout and assertscli_flag: "--command-timeout-ms"(fails with the service change reverted: 1 failed, 14 passed). BaselineReverseEngineeringService.ts2 → 1.refactor(wasm): aninspect_wasm_artifactglue/candidate selection overmax_artifact_pathsbinds that field as its limit (unit: "count"); the remediation drops--max-artifact-paths. Regression:wasmAcquiredInputsCli.test.tsruns the builtrea inspect-wasm-artifact ... --max-artifact-paths 1and assertscli_flag: "--max-artifact-paths"(fails with the change reverted). BaselineWasmArtifactService.ts1 → 0.npm run test:focused --reverseEngineeringCommands,reverseEngineeringPartialMcp,reverseProviderLaunchErrors,wasmAcquiredInputsCli,wasmArtifactMcp— all passed;--shrink-baselinesandnpm run check:fast— passed.details.limitis additive and only remediation prose changes.Author readiness
Human owner:
Before merge
type(scope): outcome.BREAKING CHANGE: MCP failures no longer carry details.limit.cli_flag, and native deadline remediation text no longer names the CLI flag. CLI output of contract commands still reports cli_flag.