Skip to content

refactor(cli): project APK signature, desktop application and EVM inspectors from contracts - #10603

Merged
morluto merged 1 commit into
refactor/cli-contract-view-deliveryfrom
refactor/cli-contract-single-inspectors
Nov 15, 2026
Merged

morluto merged 1 commit into
refactor/cli-contract-view-deliveryfrom
refactor/cli-contract-single-inspectors

Conversation

@morluto

@morluto morluto commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Summary

Fifth slice of plan W1, stacked on #10600 (base refactor/cli-contract-view-delivery; retarget as the lower PRs merge). Refs #10583.

It migrates three single-command families that the contract command description already supports: inspect-apk-signature, inspect-desktop-application and inspect-evm-interface. Their hand-written options, view decoding and input spreads are deleted.

Problem and expected behavior

Each command re-declared its contract fields as CLI options and mapped them back by hand:

  • inspect-apk-signature decoded --view, re-parsed the input and added the view kind itself.
  • inspect-desktop-application spread its two limits.
  • inspect-evm-interface wrapped producer_limits in a schema copy and spread timeout_ms.

The derived commands must keep their flags, including the snake_case --max_entries and --max_probe_bytes, the second positional encoding, their help text and --schema, and their refusal messages, such as view must be a JSON APK signature selection.

Change and scope

  • inspect-apk-signature: viewDelivery with kind apk-signature. The handler passes detail: "complete" to the service, as before, because the CLI delivers the summary itself.
  • inspect-desktop-application: evidenceDelivery. The CLI keeps its snake_case option names as projection renames.
  • inspect-evm-interface:
    • path and encoding are positionals, and producer_limits is JSON text with the shared PRODUCER_LIMITS_HELP.
    • detail is omitted with a reason, as before.
    • The service is still created once at registration.
  • Parity guard: positionals that are not caller paths now get a value their contract admits, not rel/target. The encoding enum is the first such positional.
  • Not included, because the description cannot express them yet:
    • audit-release-exposure: a CLI-only --fail_on that sets exit status 3.
    • inspect-gpu-code-objects: object_ids and targets are JSON decoded at run time, not at argv parsing.
    • inspect-il2cpp-metadata: CLI-only seed options and auxiliary caller paths.
    • Signal: an all/all_lines flag spelling a null limit.
    • Capture.
    • WASM: arrays of caller paths.
    • Firmware: a nested range flattened into --offset/--length.
  • Contribution scope: not applicable.

Contract and boundary impact

  • Semantic owner and earliest changed stage: the CLI argv projection.
  • Contribution scope fit and linked maintainer decision: not applicable.
  • CLI and MCP/tool-catalog contract:
    • MCP: unchanged.
    • CLI --schema: semantically identical for all three commands.
    • Help: identical for EVM. For APK signature and desktop application, only the line order changes (contract order, with --evidence_output last).
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged. The same services, provider ids and caller-path recording are used.
  • Target selection, authority, upstream behavior, and cleanup details: unchanged.
  • Generated metadata, package, or installation impact: none.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

(No effect changes: the migrated commands keep their existing behavior.)

Evidence and regression coverage

  • Tests added or updated: the parity guard now covers 27 projected commands.
  • Base reproduction: with the three hand-written command files restored on this branch, the guard fails (registers the migrated commands).
  • User-visible CLI output: captured --schema --format json, --help and 17 argv runs before and after, through createCli().serve. The argv runs cover malformed and refused views, summary without --evidence_output, non-decimal and out-of-range limits, an invalid encoding, malformed and unknown-key --producer-limits, and an out-of-range timeout.
    • --schema: semantically equal for all three commands.
    • All 17 argv outputs: byte-identical.
  • Remaining proof gaps: the EVM provider supports Linux x64 only. On this macOS host its runs end in the same capability_unavailable refusal before and after; no successful EVM run was made.

Validation performed

  • npm run check:fast: passed.
  • npm run knip: no findings.
  • npm run test:focused -- 15 files: the source change passed all 14 files other than the parity guard (APK signature acceptance and lifecycle, desktop application CLI, EVM module contract, local-path admission, Evidence output publication, integer arguments, input-schema-required, and native artifact finalization). After the test-only fix to positional probes, the parity guard passed 132 tests.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no change in authority or side effects.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T01:47:20.896709Z 03b354c New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Low impact] The reviewed changes appear safe to merge, with no actionable issues found.

Summary

Moves three inspectors to shared contract-backed CLI registration:

  • APK signature commands keep their view and Evidence delivery options.
  • Desktop application limits still use their snake_case flags.
  • EVM inspection takes its arguments from the tool contract.

No actionable regressions, security issues, or stored-rule violations were found in the source review. Tests were not run during this review.

morluto documents APK and desktop help-line reordering as intentional and notes the unavailable successful EVM run on macOS. Neither is reported as a defect.

No higher dependent PR is listed in the supplied stack. Live supersession and discussion checks were unavailable because GitHub access was not authenticated.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["CLI arguments"] --> B["Contract-backed flags and positionals"]
  B --> C["Resolve admitted caller paths"]
  C --> D{"APK or desktop delivery?"}
  D -->|Yes| E["Check delivery choices"]
  E --> F["Inspect complete Evidence"]
  D -->|EVM| F
  F --> G["Await service cleanup"]
  G --> H["Return Evidence or publish bundle and selected summary"]
Loading

Reviews (1) · Last reviewed commit: "refactor(cli): project APK signature, de..." · Reviewed by Greptile

@morluto
morluto force-pushed the refactor/cli-contract-view-delivery branch from 4897cb8 to 3c850d0 Compare November 14, 2026 20:33
@morluto
morluto force-pushed the refactor/cli-contract-single-inspectors branch from 645d108 to 2319fe0 Compare November 14, 2026 20:33
@morluto
morluto force-pushed the refactor/cli-contract-view-delivery branch from 3c850d0 to e809764 Compare November 15, 2026 01:45
@morluto
morluto force-pushed the refactor/cli-contract-single-inspectors branch from 2319fe0 to 03b354c Compare November 15, 2026 01:45
@morluto
morluto merged commit 272142e into refactor/cli-contract-view-delivery Nov 15, 2026
@morluto
morluto deleted the refactor/cli-contract-single-inspectors branch November 15, 2026 02:10
morluto added a commit that referenced this pull request Nov 15, 2026
morluto added a commit that referenced this pull request Nov 15, 2026
…10600)

* refactor(cli): project view-delivery inspectors from their contracts

* refactor(cli): project APK signature, desktop application and EVM inspectors from contracts (#10603)
@morluto morluto added area: cli CLI adapter and one-shot commands provider: evm Analysis provider / engine: evm labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli CLI adapter and one-shot commands provider: evm Analysis provider / engine: evm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant