Repository navigation
fix(apple): detect XML keyed archives by content - #2759
HeadmasterEggy wants to merge 18 commits into
Conversation
Codex Review SummaryThis 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. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77665054bf
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3014750e8e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c3ea2ca6cc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c52e244198
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62909b78b2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Review findings addressed at their producing boundaries and consumers. Latest changes were reviewed from source; tests and provider runs were skipped at the maintainer's request. Findings requiring separate decisions or verification remain open. The plist-content role selection preserved JavaScript and source-map roles but omitted the existing entitlements role. Updated the owning role mapper to retain entitlements occurrences as well; path-independent content nodes continue to record plist bytes. Source-inspected and pushed in |
|
Review findings addressed at their producing boundaries and consumers. Latest changes were reviewed from source; tests and provider runs were skipped at the maintainer's request. Findings requiring separate decisions or verification remain open. The named-role override now belongs to classifyArtifactContent, where the owning byte classification is available, and applies only when the bytes are XML rather than bplist00. Binary plist magic retains its established precedence over JavaScript/source-map names, consistently with target resolution; XML occurrence roles and path-independent plist nodes remain distinct. Source-inspected at |
* fix(comparison): preserve incomplete function call evidence Keep missing, unknown, partial and unresolved call relationships unknown in function comparisons and reconstruction claims. Aggregate IDA caller and callee coverage without overwriting uncertainty. Validate with 144 focused tests, typecheck/lint, docs checks and test discovery. Real providers were not verified; the full headless IDA session suite requires unavailable Windows native controls. * fix(comparison): recheck historical calls-only changes --------- Co-authored-by: morluto <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27cef5dbdf
ℹ️ 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".
| if (size > bytesRead) | ||
| throw new BinaryTargetError( |
There was a problem hiding this comment.
Keep the XML limit from overriding
.hop database routing
When an automatically inferred .hop file is larger than 1 MiB and starts with whitespace or an unterminated XML comment/PI through this limit, this throws before the .hop database branch at lines 177-186 can run. tests/boundary/filesystem/targetDiagnostics.test.ts:401-410 codifies that non-WASM .hop content routes automatically by suffix (and explicit targetKind: "database" already skips this probe), so the selected database now gets an XML file_format_rejected; let recognized database routing bypass this limit-only failure while preserving the earlier WASM header check.
AGENTS.md reference: AGENTS.md:L13-L13
Useful? React with 👍 / 👎.
| if ( | ||
| format === "plist" && | ||
| !hasBinaryPlistSignature(prefix) && | ||
| ["javascript", "source-map", "entitlements"].includes(byPath.kind) |
There was a problem hiding this comment.
Preserve
.asar precedence in root inventory roles
When XML plist bytes are named *.asar, detectArtifactFormat returns asar because namedArtifactFormat at BinaryTargetResolver.ts:313-314,367-373 runs before the XML probe, but this exception preserves only JavaScript/source-map/entitlements roles, so inspect_artifact reports a plist root while the active target remains an ASAR archive. Fresh evidence beyond the earlier JavaScript/source-map thread is the resolver's explicit .asar branch; preserve that resolved fact for root inventory without relabeling nested headerless .asar entries.
AGENTS.md reference: AGENTS.md:L19-L19
Useful? React with 👍 / 👎.
Preserve XML and Interface Builder identity at their parsing boundary, retain usable Objective-C slots with precise coverage, and keep native trace failures distinct from absence. Add caller-selected Interface Builder summaries backed by complete retained Evidence, and preserve comparison limitations. Reviewed fixes: #1969, #2088, #2108, #2513, #2639, #2684, #2731, #2759, #2875, #2888, #2889, #2970, #2971, #3002. Validation: relevant native/domain focused lane passed 142 tests; earlier Interface Builder/MCP checks passed 24 tests. Real native UI and Ghidra producer coverage was not repeated.
Normalize path facts once at the owning filesystem boundary, preserve caller spelling and unavailable inventory members, and retain typed read failures. Record exclusion entry kinds so only proven directories can establish descendant symlink targets; omitted legacy kinds stay unknown. Reviewed fixes include #1969, #2642, #2759, and #2994. Validation: 26 reference graph source tests passed; prior artifact checks passed 275 tests with one Windows-only skip. Updated compiled import workflows are included in final validation after regeneration.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Superseded by the delivered behavior on main: ec271121e. XML keyed-archive classification follows content through the inventory owner; root ASAR XML behavior is covered by 55dd21a, and caller-selected .hop interpretation by 168bfe5. Current classification/target-selection boundaries cover the behavior, so the older implementation and its alternate end-to-end cases are superseded. Closing this earlier proposal; the linked report is already resolved. Current main qualification passed: https://github.com/morluto/rea/actions/runs/38690953281. |
|
Thank you @HeadmasterEggy for identifying keyed-archive XML by its contents rather than relying on the filename. Main includes content-aware archive admission. |
Summary
Fixes #2751. Also preserves cancellation semantics when the bounded XML probe is cancelled during its final size check.
Problem and expected behavior
inspect_keyed_archiverejects a valid XML NSKeyedArchiver when its filename is not.plist, although the same document opens when named.plist. Binary plists already use content detection independent of extension. XML plist content should receive the same treatment where no known artifact suffix has selected another format.Change and scope
The shared target resolver now recognizes a bounded XML plist prolog after checking binary signatures and known named artifact formats. The recognizer supports UTF-8 and BOM-marked UTF-16, optional XML declarations/comments, and plist DOCTYPE or root tags. It identifies the format only; the existing plist reader remains responsible for decoding and validation.
appleArchiveFormatsignature helper;BinaryTargetResolverformat classification.asar,.js,.map, and.plistnames retain their current classificationsExpected effects:
Evidence
open_binaryplusinspect_keyed_archiveflow..archiveversus.plistbehavior. The base resolver recognizes binary plist magic and named.plist, but has no XML-content detection; the regression tests exercise the fixed case.archive_path: "Model.archive",archive_format: "xml-plist", and the decodedleafobject.For evidence-bearing changes:
Validation performed
npm run test:focused -- tests/boundary/filesystem/binaryTarget.test.ts— 65 tests passed, including cancellation during the final probestat().npm run check:fast— passed.git diff --check— passed.npm run check:fast— passed.Merge Danger
Compatibility, safety, and release
Before merge
type(scope): outcome.