Skip to content

perf(native): record macOS command provenance once in its Evidence - #1430

Merged
kaoru0822-kitauji merged 1 commit into
mainfrom
perf/native-macos-raw-provenance
Oct 10, 2026
Merged

kaoru0822-kitauji merged 1 commit into
mainfrom
perf/native-macos-raw-provenance

Conversation

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

Summary

inspect_macho, inspect_signature, inspect_plist, list_architectures and demangle_swift already return their command provenance inside the normalized result (normalized_result.provenance). NativeMacOSProvider also copied the same array into raw_result, so every one of these responses carried it twice. MCP sends both text and structured content, so the copy appeared four times on the wire. raw_result is now null, which matches what docs/mcp-contracts.md says for results without a distinct provider representation. Same pattern as #1402, #1404 and #1405. Part of #1065 / #723.

Measurements (CLI --format json, local real apps, before → after)

App inspect-macho inspect-signature list-architectures
KeepingYouAwake 37,968 → 34,405 4,591 → 3,338 (−27%) 2,067 → 1,618 (−22%)
XLD 65,223 → 61,660 4,335 → 3,086 (−29%) 2,410 → 1,961 (−19%)
Transmission 115,012 → 111,444 4,298 → 3,047 (−29%) 2,064 → 1,615 (−22%)

Contract impact

  • No schema change. raw_result was already nullable, and the normalized result keeps the complete provenance array.
  • Evidence IDs for these operations change because raw_result is part of the hashed record. This is the same consequence as in perf(evidence): stop copying normalized results into raw_result #1402.
  • Nothing in src/, tests/ or scripts/ read the raw copy.

Verification

  • New regression test tests/boundary/providers/native/nativeProvider.test.ts ("records command provenance once, in the normalized result") covers all five operations. It fails on main and passes with this change.
  • npm run test:focused -- with all tests/boundary/providers/native/*, tests/boundary/mcp/native*, tests/boundary/cli/native*, src/native/*.test.ts, tests/acceptance/applications/appBundleEncodingCli.test.ts and tests/composition/analysis-sessions/providerBinding.test.ts: 275 of 276 pass. The one failure is the known local "real hdiutil verify refusal" case, which also fails on main on this Mac.
  • npm run typecheck, oxlint and oxfmt
  • Ran the real CLI on three installed macOS apps (table above).

No real Hopper/Ghidra verification (not affected).

🤖 Generated with Claude Code

inspect_macho, inspect_signature, inspect_plist, list_architectures and
demangle_swift already return their command provenance inside the
normalized result. The provider also copied the same array into
raw_result, so every response carried it twice. raw_result now stays
null, as docs/mcp-contracts.md describes for results without a distinct
provider representation.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@kaoru0822-kitauji
kaoru0822-kitauji merged commit 6375cca into main Oct 10, 2026
19 checks passed
@kaoru0822-kitauji
kaoru0822-kitauji deleted the perf/native-macos-raw-provenance branch October 10, 2026 04:35
N0zoM1z0 added a commit that referenced this pull request Oct 10, 2026
Verify five native operations through the public CLI and real SDK stdio MCP using a source-built macOS fixture. Retain normalized provenance, response parity and unchanged input bytes.

Refs #1430, #1065, #723.
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
…orluto#1430)

inspect_macho, inspect_signature, inspect_plist, list_architectures and
demangle_swift already return their command provenance inside the
normalized result. The provider also copied the same array into
raw_result, so every response carried it twice. raw_result now stays
null, as docs/mcp-contracts.md describes for results without a distinct
provider representation.
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
Verify five native operations through the public CLI and real SDK stdio MCP using a source-built macOS fixture. Retain normalized provenance, response parity and unchanged input bytes.

Refs morluto#1430, morluto#1065, morluto#723.
@morluto morluto added performance Performance regressions, scaling limits, and bounded-resource work area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior performance Performance regressions, scaling limits, and bounded-resource work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants