Skip to content

fix(cli): preserve caller paths in format inspections - #7855

Merged
morluto merged 6 commits into
mainfrom
codex/caller-input-path
Oct 29, 2026
Merged

morluto merged 6 commits into
mainfrom
codex/caller-input-path

Conversation

@morluto

@morluto morluto commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes #7587. Format-specific one-shot CLI inspections retain the exact caller-selected input path in Evidence, including summary and bundle delivery.

Problem and expected behavior

For example, inspect-model-artifact ./model.safetensors --json previously returned an absolute analysis path but omitted the documented caller_input_path. The caller's original spelling is now retained separately from the inspected identity.

Change and scope

The CLI delivery boundary binds the original file argument before final cleanup and publication. Format-specific one-shot commands use that owner; direct inspection commands share the same binding helper. MCP callers do not acquire CLI-only metadata. The related Flutter and pcap adapters use the same rule. Existing Evidence identity and complete source records are retained.

Contribution scope and maintainer decision: ordinary existing read-only inspection; no new authority or provider capability.

Contract and boundary impact

  • Semantic owner and earliest changed stage: one-shot CLI Evidence delivery, before cleanup and projection.
  • CLI and MCP/tool-catalog contract: additive caller metadata for CLI file selections; MCP requests remain unchanged.
  • Provider and target format compatibility: unchanged; no executable target is run by this change.
  • Evidence and provenance: the exact selected spelling is separate from normalized target identity and survives summary/bundle output and cleanup errors; Evidence IDs remain unchanged by the caller metadata.
  • Generated metadata and package impact: none.

Evidence and regression coverage

The built CLI regression covers relative model, ELF and entropy selections, summary and bundle delivery, and an MCP control without CLI-only metadata. Boundary regressions cover cleanup failure, authenticated partial Evidence, and preservation of raw partial observations. Flutter cleanup-retry controls cover recovered success, late cancellation, and incomplete cleanup. Flutter, Android, JEB and Apktool CLI controls exercise adjacent adapters. Real JEB, Android, TShark and firmware providers were not tested; the pcap CLI controls cover admission rather than a successful real-provider capture.

Validation performed

  • npm run test:focused -- tests/acceptance/formatSpecificCallerPathCli.test.ts tests/boundary/cli/cliEvidenceCallerPath.test.ts — 2 passed.
  • npm run test:focused -- tests/boundary/cli/jebCli.test.ts tests/boundary/cli/apktoolBooleanOptions.test.ts tests/boundary/cli/androidPackageViewCli.test.ts — 23 passed.
  • npm run test:focused -- tests/boundary/cli/flutterCli.test.ts tests/boundary/cli/pcapCli.test.ts — 14 passed.
  • npm run test:focused -- tests/boundary/cli/cliEvidenceCallerPath.test.ts tests/boundary/cli/flutterCli.test.ts — 11 passed after the partial-observation follow-up.
  • npm run check:fast and git diff --check — passed.

Compatibility, safety, and release

Additive CLI Evidence metadata; no migration or provider change. Validation was on macOS; no external provider or Windows verification was performed.

CI parity follow-up: Go, Rust, SQLite and Flutter checks now assert the CLI-only caller spelling, verify MCP omits it, and compare the remaining Evidence exactly. The TShark and APK-signature verifiers use the same explicit comparison. Six built acceptance files passed (78 tests, one skipped), check:fast and git diff --check passed. TShark and Android SDK tools were unavailable locally, so those real verifier lanes await CI.

Author readiness

Human owner: @morluto

  • 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.
  • This 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.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous WASM verifier failure is fixed.

Summary

Preserves the caller’s exact file path in CLI Evidence without changing Evidence identity or adding CLI-only metadata to MCP results.

  • CLI inspections keep the path spelling you selected in their Evidence.

No new actionable issues were found. Supersession could not be checked because GitHub access was unavailable. This review used source checks; no runtime tests were run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[CLI file selection] --> B[Inspect selected file]
  B --> C[Bind exact caller path]
  C --> D[Finish cleanup]
  D --> E[Complete Evidence or summary and bundle]
  D --> F[Error with retained Evidence]
  G[MCP request] --> H[Shared inspection without CLI metadata]
Loading

Reviews (6) · Last reviewed commit: "fix(wasm): compare shared cli and mcp ev..." · Reviewed by Greptile

Comment thread src/cli/cliEvidenceCallerPath.ts Resolved
@morluto
morluto marked this pull request as ready for review October 28, 2026 15:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T23:39:26.357389Z 0373522 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.

Comment thread src/cli/wasmCommands.ts Resolved
@morluto
morluto merged commit 419a211 into main Oct 29, 2026
48 checks passed
@morluto
morluto deleted the codex/caller-input-path branch October 29, 2026 01:26
@morluto morluto added area: cli CLI adapter and one-shot commands bug Something isn't working labels Nov 23, 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 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Format-specific binary CLI inspections omit the promised caller_input_path

1 participant