Repository navigation
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The PR appears safe to merge; no actionable issue was found. SummaryPreserves complete XML dictionary key names at the shared
The previous and current commits have different merge bases, so this review covered the full PR diff. No previous review threads were supplied. Static review found no actionable correctness or security issue. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[XML source] --> B[Normalize line endings]
B --> C[Check nesting depth]
C --> D[Combine key text and CDATA]
D --> E[Choose collision-free placeholder]
E --> F[Rewrite changed key contents]
F --> G[Pinned plist decoder]
G --> H[Remove placeholder entries and count omissions]
H --> I[Shared consumers]
Reviews (2) · Last reviewed commit: "fix(plist): preserve complete XML charac..." · Reviewed by Greptile |
|
TL;DR: The fix works on its own branch: a plist key split across text and CDATA, like Edit: Newer results for the rebased head are here. The branch was rebased onto 1b97b0f and now sits at 789e8a6. The Before and After rows below are for the old head 86c06b3. My line about GitHub showing the PR as mergeable and clean is out of date. GitHub now shows it as dirty, with three files in conflict with main. Results (Linux, Node 24.18.0)
Merge driftMain moved on after this branch started. A later change, #4105 (fe7bcc3), also edited the key parser. The patch no longer applies cleanly to main for that file. GitHub still shows the PR as mergeable and clean. Because of that, I tested the head tree as the author branched it. I did not test head merged with main. Not run
Thanks, thangldw, for the clear fix and the tests. Test setupCommandsgit -C ~/code/rea-mirror/rea.git archive 86c06b38e | tar -x -C /tmp/t12-1015/h3426
npm ci && npm run build && npm run test:prepare # in the head tree, then again in a main tree
# after, in the head tree
npm run test:focused -- src/domain/propertyListKeys.test.ts tests/boundary/cli/keyedArchivePrototypeKeyCli.test.ts
# before, in the main tree after applying only the PR's two test-file changes
npm run test:focused -- src/domain/propertyListKeys.test.ts tests/boundary/cli/keyedArchivePrototypeKeyCli.test.ts🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
86c06b3 to
789e8a6
Compare
|
Replying to your Linux verification: thank you for checking the before/after behavior and identifying the main drift. Rebased the branch onto main
GitHub CI for this rewritten head is a new run; the previous green CI belongs to |
Use the validated DOM's character-data key names for both identity and prototype omission. Replace first-child reinterpretation with canonical, collision-free aliases inside the pinned decoder boundary; restore names through the existing dictionary projection. Alias every spelling of the same name to preserve duplicate assignment order. Handle empty key spellings and keep scalar key elements outside aliasing. Preserve value text and bytes. Adapt @thangldw's tests and proposal from PR #3426. Avoid the proposal's closing-content scanner and re-escaping source names. Add duplicate, empty, alias-collision, scalar-key, native fallback and Interface Builder controls. Validation: 180 focused checks across 20 files pass, including built CLI and actual stdio MCP, build, check:fast and docs:check. Baseline public inspection truncates main to ma. 24 tiny completed CLI cost controls preserve ordinary XML/binary full replies and Evidence IDs byte for byte. No statistical speed claim, heavy profiling, investigated-target or real deep-provider execution. Fixes #3371
|
TL;DR: Fixed: the rebased branch still cures the bug. The same four tests fail without the fix and all 43 pass with it. Still open: this branch now conflicts with main in three files. Main landed its own fix for the same bug in 78cf610. Thanks, thangldw, for the rebase and the clear notes. I tested head 789e8a6 as pushed. Results (Linux, Node 24.18.0)
Merge with today's mainGitHub shows this PR as dirty. I merged head 789e8a6 with main 1d5bf5f in a scratch repo (Git's
The cause is main commit 78cf610, which closed #3371. Its title is Not run
Test setup
Commandsgit -C ~/code/rea-mirror/rea.git fetch origin
git -C ~/code/rea-mirror/rea.git archive 789e8a6e1 | tar -x -C /tmp/rea-rt-3426/head
git -C ~/code/rea-mirror/rea.git archive 1b97b0f37 | tar -x -C /tmp/rea-rt-3426/base
git -C ~/code/rea-mirror/rea.git archive 1d5bf5ff0 | tar -x -C /tmp/rea-rt-3426/main
# base: copy only the PR's two test files over the base tree
cp /tmp/rea-rt-3426/head/src/domain/propertyListKeys.test.ts /tmp/rea-rt-3426/base/src/domain/
cp /tmp/rea-rt-3426/head/tests/boundary/cli/keyedArchivePrototypeKeyCli.test.ts /tmp/rea-rt-3426/base/tests/boundary/cli/
# in each tree (head, base, main), Node 24 first on PATH
npm ci && npm run prepare && npm run build:cached && npm run test:prepare
npm run test:focused -- src/domain/propertyListKeys.test.ts tests/boundary/cli/keyedArchivePrototypeKeyCli.test.ts
# tree check and conflict list, in a scratch bare repo that reads the mirror's objects
git init --bare /tmp/rea-rt-3426/scratch/s.git
git -C /tmp/rea-rt-3426/scratch/s.git merge-tree --write-tree 1b97b0f37 86c06b38e # f7b05a3417d3, clean
git -C /tmp/rea-rt-3426/scratch/s.git rev-parse 789e8a6e1^{tree} # f7b05a3417d3
git -C /tmp/rea-rt-3426/scratch/s.git merge-tree --write-tree --name-only 1d5bf5ff0 789e8a6e1 # exit 1, three files🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
|
Thanks @thangldw. Closing this PR as superseded by 78cf6100f on XML dictionary key identity is retained at the shared source-aware owner, including CDATA/prototype-key controls. Current main replaces the earlier local representation. This is an unmerged closure: it does not label this PR as merged or remove contributor history/credit. The decision uses the current source diff and existing validation record; no new local test or provider run is claimed. |
Summary
Fixes #3371. XML dictionary keys split across text and CDATA now retain their complete names. For example,
ma<![CDATA[in]]>staysmain, so named-root selection succeeds;user<![CDATA[ID]]>staysuserID.Problem and expected behavior
The pinned plist decoder reads only the first child of a
<key>. Inspection therefore returnedroots.maandvalue.user, withtruncated: false, and rejected--root main. Nativeplutil, plain XML and binary controls retained the complete names. Inspection must preserve those identities and their UID reference paths.Change and scope
Normalize complete character-data key names at the existing shared XML plist boundary, before the pinned value decoder. Prototype-key omission and placeholder collision checks consume the same identity. Replace only key contents, preserving source values, encoded line endings, depth preflight and the existing handling of unsupported nested markup. Update the owning documentation. No consumer-specific fallback or new dependency.
Contract and boundary impact
parseXmlPropertyListinsrc/domain/propertyListKeys.ts; callers consume its decoded keys.Expected effects:
Evidence and regression coverage
Reproduced through compiled CLI on main
322506d0c0d3; four regressions failed before repair (36 other tests passed).Public regression covers root selection, field identity, UID path, original digest and unchanged source bytes, with plain XML and independently encoded binary controls.
Owner controls cover segmented prototype keys, placeholder collisions, literal CDATA entities/closing-tag text, encoded line endings and unsupported nested elements.
Original compiled CLI and real stdio MCP replay after repair return
main,userID: 42, reference path["main"]and the original digest. Root selection succeeds.Independent subagent review found no actionable findings, independently ran 39 owner tests and 64 compiled-owner stress combinations. It did not rerun the full checks or public transports; the stress oracle uses xmldom.
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
Head
789e8a6e1e9e, rebased onto main1b97b0f3707b, Node 24.18.0 / npm 11.16.0, macOS arm64. The authored XML fix is preserved. OpenStep scanner/helpers from #4105 are byte-identical to main, and both newer regression cases remain included. The rebased tree matches the independently checked three-way integration tree.npm run test:focusedwith 15 exact parser/consumer/CLI/MCP files — 227 passed, one platform skip. Includes keyed-archive number/nesting/encoding controls and Interface Builder consumers.npm run check— passed typecheck, lint, formatting, knip, metadata, module boundaries and architecture guards.npm run docs:check— passed, including five consistency tests.npm run verify:test-discovery— all 1,412 test files discovered exactly once.git diff --check— passed.root: "main"inspection retainmain,userID: 42, the UID edge and original archive digest.Compatibility, safety, and release
Corrects XML key decoding without a caller migration or package/release change. Local validation is macOS arm64; Linux/Windows and the full CI suite have not been executed locally. Synthetic archives and native
plutilcontrols do not measure occurrence in real application archives. No near-64-MiB peak-memory qualification or real disassembler run is claimed.Author readiness
Human owner: @thangldw
Before merge
type(scope): outcome.