Repository navigation
fix(apple): preflight OpenStep plist value nesting - #2970
rudycelekli wants to merge 2 commits into
Conversation
Signed-off-by: Rudy Celekli <[email protected]>
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: 84fa8d40e4
ℹ️ 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".
| continue; | ||
| } | ||
| if (character === "}" || character === ")") { | ||
| const container = containers.pop(); |
There was a problem hiding this comment.
Stop scanning when a closer does not match
When malformed OpenStep text contains an unexpected closer followed by a deep suffix, such as (} plus 130 opening parentheses, this unconditional pop discards the root, continues into the suffix, and throws the shared RangeError before the pinned parser can report the syntax error at }. The reader path in src/artifacts/apple/KeyedArchiveReader.ts:233-235 classifies that RangeError as reason: "limit", so a malformed archive is incorrectly reported as a capacity failure; return control to the decoder when the closer does not match the active container.
AGENTS.md reference: AGENTS.md:L29-L29
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 51c1a97: admitsOpenStepCloser now returns control to the pinned decoder when a closer does not match the active container (or follows a key without its value). '(}' followed by 130 opening parens now yields the decoder's syntax error (format), not a depth limit; covered by the malformed-input regressions in keyedArchiveXmlNesting.test.ts.
Signed-off-by: Rudy Celekli <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51c1a975a9
ℹ️ 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".
| } else if (character === "<") { | ||
| const end = text.indexOf(">", cursor + 1); | ||
| cursor = end === -1 ? text.length : end + 1; |
There was a problem hiding this comment.
Stop at malformed OpenStep data literals
When an invalid data literal precedes a deep sibling, for example (<gg>, followed by 130 opening parentheses, this branch treats everything through > as a completed scalar. The pinned plist parser rejects the non-hex literal before reading that sibling, but the preflight continues and throws the shared RangeError; KeyedArchiveReader.ts:233-235 then reports the malformed archive as reason: "limit" instead of "format". Validate the data token enough to stop preflighting when the pinned decoder will reject it.
AGENTS.md reference: AGENTS.md:L29-L29
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changing this. With the pinned plist 5.0.0, parseData does not validate hex: '()' decodes without error and '(,' plus 130 opening parens is read through to its end-of-input syntax error, so the decoder does not reject the literal before the sibling. Validating hex in the preflight would add a rule the decoder lacks. The preflight treats <...> as an opaque scalar, as the decoder does, and the depth limit applies to that suffix.
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.
|
CI-fix track: this change is already on main. Merging current main into this branch yields a tree identical to main. 55dd21a lists #2970 among its reviewed fixes and carries the same |
|
Heads up: main already has this change in 55dd21a. The code is in 🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
|
Closing: main already contains this change, so this PR is superseded. Thanks for the review. |
|
Thanks, @rudycelekli, for finding that malformed OpenStep closers could be mistaken for a nesting-depth limit. Main now stops at the first impossible token while preserving the valid deep-input limit check (main). |
The OpenStep nesting preflight could continue after an impossible closer, scalar, or separator and misclassify a malformed document as a depth limit if its suffix contained deeply nested containers. Track the next lexical token expected by each active container and yield at the first impossible token, leaving the pinned plist decoder responsible for exact syntax diagnostics and values. Preserve compound keys, optional dictionary semicolons, array trailing commas, first-root behavior and valid depth protection.
AI-assisted correction responding to review of #2970. Verification: all eight real filesystem-reader regressions fail against the previous owner and pass fixed with the exact plist 5.0.0 syntax message and format classification; a valid deep control remains a limit. Two completed-container regressions also require the exact named limit for deeply nested array siblings and dictionary values after compound keys; both fail against the discarded helper-ordering refinement. All 63 focused tests, test discovery, and npm run check pass. Fresh compiled public CLI replay verifies all eight format failures and the valid limit control, including their distinct outer error codes. Separator transitions and closer admission have separate private helpers. The refined tree also passes 112 pinned-decoder comparisons, six depth controls and all eight malformed-input comparisons; scoped lint has zero diagnostics. Repository checks still report existing warnings; no human approval or full-suite claim is made.