Skip to content

test(native): replay complete dylib-use provider output - #1972

Merged
N0zoM1z0 merged 3 commits into
mainfrom
fix/1970-otool-dylib-use
Oct 11, 2026
Merged

N0zoM1z0 merged 3 commits into
mainfrom
fix/1970-otool-dylib-use

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Replay the complete real otool -h -l output that exposed #1970 through the native provider boundary, and update two inherited CI fixtures to current main contracts.

Refs #1970. The producing dylib-use parser fix and refreshed high-address capture are already on main in #1967; this PR preserves that implementation.

Problem and expected behavior

The Apple CLI/MCP lane retained valid 23-command output with a delayed dylib dependency. Main now accepts its options representation. Cover the complete provider result and preserve dependency identity and command index, including a distinct negative case where a repeated options field is empty.

Two existing tests also have stale prerequisites after recent main changes: skill installation returns Result, and captured CDP requests require initiator metadata. A response-shape assertion must reject undefined before claiming a shape was captured.

Change and scope

  • Replay the complete actual Apple capture; only its echoed filename is substituted, with provenance recorded beside the fixture.
  • Assert the retained dependency, option text, original command index and complete command count.
  • Reject repeated options even when the second row has no value.
  • Assert installed/unchanged skill outcomes as Result and retain custom-home and user-authored-file checks.
  • Supply CDP initiator metadata and reject an undefined shape before checking recovery from malformed redirect metadata.

No production code, schemas, provider admission, resource limits or CI thresholds change. Initial overlapping parser changes were superseded by main; their redundant tests were removed after integration.

Contract and boundary impact

Native verification uses the existing provider boundary with actual producer output and retained source provenance. Setup and browser tests now satisfy their current prerequisites without weakening failure or recovery assertions. Linux replay establishes provider integration with captured output; real macOS execution remains the responsibility of the Apple CLI/MCP CI lane.

Validation

  • The initial independent fix reproduced three dylib-use failures and four inherited fixture failures before correction; those historical checks are retained separately.
  • Final main-integrated native provider, goldens, malformed text, echoed path, Qwen and CDP tests: 78 passed across eight files.
  • Final npm run check:ci: all eight tasks and architecture guards passed.
  • git diff --check: passed.
  • Actual Apple CLI/MCP lane on the exact published head: passed, including 195 native/Apple tests across 17 files.
  • Latest-main integration of the Qwen/CDP fixture changes: 13 passed.
  • Manual full CI on head 1d37bf7e3: all 30 jobs passed, including actual Apple execution and all native platform package lanes. Workflow dispatch omits the PR-only required job, so this does not replace the canceled PR status.
  • Main 55b61485e is now integrated; the final eight-file focused suite again passes all 78 tests. The normal PR workflow will run with its existing ci:full selection and must pass CI required before merge.

Compatibility, safety, and release

No runtime behavior or release metadata changes. No binaries, credentials or private paths are committed. Existing malformed framing, cancellation, cleanup and capacity tests remain included.

Review checklist

  • The issue describes a concrete REA failure and reproduction.
  • The title and commits follow Conventional Commits.
  • The final scope reflects the integrated main implementation.
  • Distinct regression and malformed-input coverage is retained.
  • Executed checks and real-provider limitations are explicit.
  • No private paths, credentials or generated binaries are committed.

Parse the producer's options representation separately from legacy dylib
timestamps, preserving empty and combined flags. Require exactly one
representation and retain duplicate-field and command-framing refusals.
Replay real Apple output through the provider boundary, and align inherited
native, skill setup and CDP test inputs with their current contracts.

Fixes #1970

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Kaoru0822 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 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-11T22:24:16.553001Z 31f6be2 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.

Retain the upstream producer parser and refreshed high-address capture from
main. Keep one complete real-output provider regression and a distinct empty
duplicate-field control; remove cases already covered by the upstream tests.
Retain the current Result and CDP fixture contract corrections.

Refs #1970

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Kaoru0822 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bfdf5571aa

ℹ️ 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".

Comment thread src/native/parsers/otool.ts Outdated
const requireUniqueField = (block: string, key: string): void => {
const escaped = key.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
const pattern = new RegExp(`^\\s*${escaped}\\s+`, "mu");
const pattern = new RegExp(`^\\s*${escaped}(?:\\s+|$)`, "mu");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict valueless-field acceptance to options

When a required scalar from any non-dylib command is printed without a value—for example, a vmaddr or uuid line ending immediately after the key—the new $ alternative makes requireUniqueField count it as present even though parseFields skips it. The parser consequently accepts malformed otool output and emits null/unknown evidence instead of an output error. Since only an empty options row needs this exception, keep the value requirement for every other key or verify their parsed presence separately.

AGENTS.md reference: AGENTS.md:L23-L23

Useful? React with 👍 / 👎.

@N0zoM1z0 N0zoM1z0 changed the title fix(native): accept framed dylib-use command options test(native): replay complete dylib-use provider output Oct 11, 2026
Carry the already verified native producer and fixture changes onto current
main before running the existing full pull-request CI selection. Preserve
the normal required check instead of replacing its status with a manual run.

Refs #1970

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Kaoru0822 <[email protected]>
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 ci:full

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants