Repository navigation
Conversation
inspect_signature described one slice of a universal file (codesign's default for the host) as if it were the whole file. It now queries each slice, names the slice the identity fields describe, lists the other slices with their CDHashes, names slices signed with another identifier, team, authorities, hardened-runtime state or entitlements, and explains when designated_requirement lists CDHashes that cdhashes does not. Fixes morluto#4293 Co-Authored-By: Claude Fable 5.1 <[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: 24e5c08974
ℹ️ 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".
[Medium impact] The PR appears safe to merge, with no new blocking finding. Summary
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Digest-verified snapshot] --> B[Read default signing facts]
B --> C{Universal file?}
C -->|No| G[Return signature observation]
C -->|Yes| D[Name and query slices]
D --> E[Read other slice entitlements when comparable]
E --> F[Describe slices and signing differences]
F --> G
D -->|Command fails| H[Return error with partial observation]
Reviews (13) · Last reviewed commit: "Merge origin/main into fix/signature-uni..." · Reviewed by Greptile |
… entitlement facts Address the first review round. Query the slices of a universal file whose host-default slice is unsigned and name the signed ones. Decode slice entitlements that hold data or date values instead of failing the result, and report omitted __proto__ keys per slice. Attribute requirement CDHashes to the queried slice that carries them, and say when none does. Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b160d44f64
ℹ️ 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".
…read entitlements unobserved Ask lipo for the slice names codesign accepts when the default slice is unsigned, since the target merges CPU subtypes. Keep slice entitlements that could not be read or decoded out of the comparison, carry the plist projection's notes, and project slice captures to provenance as they arrive. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Fall back to the target's CPU families, with a limitation, when lipo cannot name the slices of an unsigned universal file; cancellation, target-change and cleanup errors still propagate. Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8365731b3
ℹ️ 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".
…full Consult lipo only for universal targets, and fall back only on the exact missing-lipo condition with complete cleanup. Name team identifier and authorities for signed slices behind an unsigned default, and list differing entitlements with their values instead of key names. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…lices An entitlement key such as "constructor" or "toString" must not read the other dictionary's prototype, where a function value would make the canonical rendering throw and fail the whole signature result. Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed75ca7afe
ℹ️ 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".
… integers Compare each slice's entitlements with the described slice's as soon as they decode and retain only the outcome. Route entitlement plists with integers beyond the exact range through the XML projection so their digits compare. Carry length and a SHA-256 prefix on cut values so long values that differ past the cut still read as different. Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52bea8b1d0
ℹ️ 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".
| entitlementDifferences: describeEntitlementDifferences( | ||
| decoded.value, | ||
| aggregate.entitlementValue, | ||
| ), |
There was a problem hiding this comment.
Bound retained per-slice difference text
When a FAT target has many signed slices with mutually different large entitlement dictionaries, this stores the full describeEntitlementDifferences sentence in every SliceSignature until the loop finishes. The 80-character cap only bounds each value; key count and key length remain unbounded up to each 64 MiB command budget, so 128 admitted slices can still retain gigabytes and OOM before describeSignatureSlices and result serialization run. Apply an aggregate budget or emit bounded summaries as each slice arrives.
AGENTS.md reference: AGENTS.md:L51-L52
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changed: the per-value cap bounds each rendered value; key count follows the plist, which codesign already caps per command. Measuring an aggregate budget is a separate change if a maintainer wants one.
🤖 Addressed by Claude Code
Take main's plist-owner projection for entitlements (shared value and exact number projections) and keep the decoded flag so an undecodable slice plist stays unobserved rather than failing the result. Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e17beb5212
ℹ️ 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".
Keep main's unknown-scalar entitlement limitation beside the omitted prototype-key one, and the per-slice provenance assertion in the real codesign binding test. Co-Authored-By: Claude Fable 5.1 <[email protected]>
left a comment
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9308314441
ℹ️ 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".
| const decoded = | ||
| sliceEntitlements.value.exitCode === 0 | ||
| ? parseEntitlements(sliceEntitlements.value.stdout) | ||
| : null; |
There was a problem hiding this comment.
Preserve per-slice entitlement failure reasons
When a per-slice --entitlements invocation exits nonzero, this assigns null; the later generic unavailable limitation and provenance retain only the exit code and byte counts, so codesign's diagnostic—the only reason the entitlement is unknown—is lost while the operation returns success. Retain a bounded diagnostic or classified failure reason for that slice.
AGENTS.md reference: AGENTS.md:L31-L31
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changed: whether to carry codesign's diagnostic text for a failed per-slice entitlement query into the result is a design call; the exit code and byte counts are in provenance. Happy to add it if a maintainer wants it.
🤖 Addressed by Claude Code
left a comment
•
There was a problem hiding this comment.
TL;DR: I checked the 10 open bot threads at head 9308314. Only two things were run: the PR's three test files, which pass on Node 22, 24 and 26, and a probe for threads 24 and 27, which is real. The other eight threads I only read in the code, so treat them as readings.
Edit: I retested on head adae09e. The five findings I marked real are fixed there. Four bot threads are still open, all left by the author. New results are here.
The probe found a different shape than the thread described. A <data> value and a plain dict with keys 0, 1 and 2 compare as equal. The dict with $plist_type and base64 keys does not.
Findings and verdicts
Head 9308314. "Read, not run" means I read the code and it does what the thread says. It is not a run. Only threads 24 and 27 were run.
| # | Thread | Sev | Verdict | What the code shows |
|---|---|---|---|---|
| 23 | Quote entitlement keys | P2 | Read, not run: real | Keys are printed unquoted and joined with commas, so x: true, y and two keys x and y print the same |
| 24 | Changed entitlements look unchanged | P2 | Real, tested (other shape) | <data>AQID</data> and a dict with keys 0, 1, 2 holding 1, 2, 3 give the same JSON, and the compare returns null. The thread's own example (keys $plist_type and base64) does give a difference |
| 27 | Compare source types | P2 | Real, tested (same probe) | Same cause as the thread above |
| 25 | Quote slice identity values | P2 | Read, not run: real | Identifier, team and authorities are printed unquoted and joined with ; |
| 26 | Partial entitlement XML | P2 | Read, not run: real | With <?xml but no </plist> the parser returns decoded with a null value, before the error path |
| 29 | Echoed paths in unsigned check | P2 | Read, not run: real | The check scans stdout and stderr, and the snapshot keeps the target's file name |
| 21 | Bound retained difference text | P1 | Read, not run: partly | Values are capped at 80 characters but key count is not. The size of any memory problem is not measured |
| 28 | Keep failure reasons | P2 | Read, not run: partly | The codesign message is dropped, only the exit code and byte counts stay. Whether to keep it is a design call |
| 20 | Unchanged integers look different | P2 | Read, not run: real | The exact-integer form depends on the whole plist, so one slice can differ from another. Marked outdated, and the bot calls it non-blocking |
| 22 | Encoded unsafe integers | P2 | Read, not run: probably fixed | The regex it names is gone from the file. I did not check entity-encoded digits |
Test results, the three test files this PR touches (src/native/signatureSlices.test.ts, tests/boundary/providers/native/nativeInventory.golden.test.ts, tests/boundary/providers/native/nativeSignatureTargetBinding.test.ts):
| Node | Result |
|---|---|
| 24.18.0 | 3 files passed, 69 passed, 1 skipped |
| 22.23.1 | 3 files passed, 69 passed, 1 skipped |
| 26.11.1 | 3 files passed, 69 passed, 1 skipped |
Threads 24 and 27 are one issue. Threads 23 and 25 are the same kind of issue in different fields.
Not run
- Probes for threads 20, 21, 22, 23, 25, 26, 28 and 29. Those are readings only.
- Real codesign output. The box is Linux.
- Main may have moved on. The base is 22ddd82 and main was d6ca7b3 when I looked. The native files are the same on both.
Thanks, Ambar-13, for the work on this.
Test setup
Commands
git archive 930831444 | tar -x (read-only mirror)
npm ci --ignore-scripts; npm run build:cached; npm run test:prepare (exit 0)
npm run test:focused -- <3 files> (once each on Node 24, 22, 26)
probe: parseXmlPropertyList then describeEntitlementDifferences, key com.x
git grep -n doctor 930831444 -- <3 test files> (exit 1, no match)
Files read: src/native/signatureSlices.ts, src/native/NativeMacOSProvider.ts, src/domain/apple/plistNumbers.ts, src/domain/apple/plistValue.ts, src/domain/propertyListXml.ts, src/native/SignatureTargetBinding.ts.
🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊
… plists unknown Address the five review items CassieFox23 confirmed: a plist with an XML header but no closing tag is undecodable rather than "no entitlements"; the echoed snapshot path is removed before matching codesign's not-signed verdict for a slice; identifiers, team, authorities and entitlement keys are JSON-quoted in the limitation sentences; and entitlements are also compared on a type-tagged form of the decoded plist, so a data value and a dictionary shaped like its wrapper no longer read as equal. Co-Authored-By: Claude Fable 5.1 <[email protected]>
commented
Oct 19, 2026
|
@CassieFox23 thanks for taking the time to run this and sort the threads; the table was more useful than the ten threads it summarises. I've pushed one commit (adae09e) covering the five you marked real: a plist with an XML header but no closing tag now counts as undecodable rather than "no entitlements"; the unsigned-slice check strips the echoed snapshot path before matching codesign's verdict, as the main parser already does; identifiers, team, authorities and entitlement keys are JSON-quoted in the limitation sentences; and entitlements are compared on a type-tagged form of the decoded plist, so a data value and a dictionary shaped like its wrapper now read as a difference. Each has a test. Your Left alone on purpose: 21 (retained text size, unmeasured and bounded per value already) and 28 (keeping codesign's diagnostic for a failed per-slice query, which I'd rather a maintainer rule on), with a note on each. 20 is outdated since the merge took main's number projection, and 22 went with it. Would you mind a re-review when you have a moment? It'll need a CI approval again, sorry about that. |
left a comment
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: adae09ed08
ℹ️ 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".
| ? codeSignArchitectures(parsed.format, this.target) | ||
| : universalCodeSignArchitectures(parsed.format) | ||
| : sliceNames.value.names; | ||
| if (mixedSigning || architectures.length > 1) { |
There was a problem hiding this comment.
Inspect a universal fallback even when one family remains
When lipo is unavailable or returns no accepted names and an unsigned universal FAT's slices all collapse to one target CPU family, #unsignedSliceNames falls back to a one-element array; because unsigned also forces mixedSigning false, this guard skips #inspectSignatureSlices even though target.format already proves a universal container. Thus no codesign -a observation runs and a signed non-default slice can be omitted; fresh evidence after the earlier exact-lipo fix is that its normalized fallback is still gated by count rather than sliceNames !== null. Enter this path for any proven unsigned universal target while retaining the fallback ambiguity limitation.
AGENTS.md reference: AGENTS.md:L19-L19
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changed for now: this needs lipo unavailable and an unsigned universal file whose slices all share one CPU family, then the fallback's single name skips the per-slice query. Entering the slice path whenever the target format proves a universal container is a small change; I'd rather a maintainer confirm they want the extra codesign call in that case, since the fallback name is already marked ambiguous.
🤖 Addressed by Claude Code
| return canonicalJson(value) === canonicalJson(theirs) | ||
| ? [] |
There was a problem hiding this comment.
Retain type-only differences beside value changes
When a source-type collision (for example <data>AQID</data> versus an ordinary dictionary equal to its $plist_type projection) appears alongside any second entitlement change, the whole dictionaries differ so the shape fallback is bypassed; this per-key projected-JSON equality then drops the colliding entry and only reports the second change before the raw plist is discarded. Fresh evidence after the prior data-wrapper fix is that source shape is checked only for the whole-tree equality case. Compare per-entry source-aware shapes, or retain a source-aware diff, so all signed differences remain visible.
AGENTS.md reference: AGENTS.md:L19-L19
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changed for now: the type-tagged comparison runs on the whole plist, so a data-vs-wrapper collision is reported only when nothing else differs; alongside another change, that entry is folded into the dictionary-level difference. A per-entry shape diff is possible, but the raw plist is deliberately not retained and I'd like a maintainer's view before widening the sentence format again.
🤖 Addressed by Claude Code
left a comment
•
There was a problem hiding this comment.
TL;DR: At adae09e, all five findings I marked real are fixed, and I checked each with its own small fixture. The PR's three test files pass on Node 22, 24 and 26. Four bot threads are still open, and the author left all four on purpose.
Edit: Ambar-13 has merged main since. I read the new head bc36fdf: the five fixes still stand, and the new notes are here.
I ran fixtures and named test files only. I did not run real codesign output. Thanks, Ambar-13, for the fast fixes and the clear replies.
My earlier findings
"Old" is my result at 9308314 from my first review. "Now" is my result at adae09e. Node 22.23.1, 24.18.0 and 26.11.1 gave the same text on every probe below.
| # | Finding | Old | Now |
|---|---|---|---|
| 23 | Quote entitlement keys | Read, not run: real | Fixed. A key named x: true, y prints as "x: true, y": true. Two keys x and y print as "x": true, "y": true. A key holding quotes prints with them escaped. |
| 24 and 27 | Changed entitlements look unchanged and Compare source types | Real, tested (other shape) | Fixed. A <data> value against a dictionary shaped like its wrapper now reads "same projected values, but the plist value types differ", in both directions. Two equal <data> values give no difference. My old shape, <data> against a dictionary with keys 0, 1 and 2, also shows as a difference. |
| 25 | Quote slice identity values | Read, not run: real | Fixed. An identifier of a; team identifier "T"; hardened runtime on plus a line break prints as one quoted string. It no longer reads as extra fields. Authorities A, B and C print as two quoted items. |
| 26 | Partial entitlement XML | Read, not run: real | Fixed. Four cut-off shapes now say "cut off before its closing tag; entitlements are unavailable". The limitation "Entitlements could not be read for Mach-O slices: x86_64" follows. Empty output still reads "entitlements none". |
| 29 | Echoed paths in unsigned check | Read, not run: real | Fixed. A file named not signed at all with an unrelated error stays unclassified. The same file name in front of the real message code object is not signed at all is still read as unsigned. |
Threads 20 and 22 are marked resolved. The author says they are outdated since the merge took main's number projection. I did not run them.
Threads open at adae09e
| Thread | Sev | Result at adae09e |
|---|---|---|
| Bound retained difference text | P1 | Author's reply: not changed, a maintainer's call. I read the code only: values are still cut at 80 characters, with no cap on key count. I did not measure memory. |
| Keep failure reasons | P2 | Author's reply: not changed, a maintainer's call. Still as described. A slice whose entitlements call exits 1 with a codesign message gives only "Entitlements could not be read for Mach-O slices: x86_64". The message text is not in the limitations. I did not check the provenance entry. |
| Inspect a universal fallback when one family remains | P2 | Author's call, left open. Not run. |
| Retain type-only differences beside value changes | P2 | Author's call, left open. Not run. |
Tests
The three files this PR touches, run once each on Node 22.23.1, 24.18.0 and 26.11.1: 3 files passed, 74 passed, 1 skipped, on all three. At 9308314 the same files gave 69 passed, 1 skipped. That is five more tests than before.
Not run
- Real codesign or lipo output. The box is Linux, so every result comes from hand-made fixtures and the PR's own fixtures.
- The two threads the author left for a maintainer (the lipo fallback and the per-entry type diff).
- Memory use for the retained-text thread.
- Threads 20 and 22, which are resolved.
Test setup
Commands
git archive adae09ed0 into a fresh folder (read-only mirror)
npm ci --ignore-scripts; npm run build:cached; npm run test:prepare (Node 24, exit 0)
grep -n doctor <each test file> (no match)
npm run test:focused -- src/native/signatureSlices.test.ts tests/boundary/providers/native/nativeInventory.golden.test.ts tests/boundary/providers/native/nativeSignatureTargetBinding.test.ts (Node 22, 24, 26; exit 0 each)
npm run test:focused -- <one probe file> (Node 22, 24, 26; exit 0 each)
The probe file builds the PR's own universal fixture with a fake codesign runner, in the same shape as the PR's golden test. It changes one answer per probe. Quoting probes call describeSignatureSlices and describeEntitlementDifferences directly with hand-built slice objects.
Cut-off plist shapes: header plus an open dict; header only; header plus an open plist; a closing tag before the header. The same cut-off text on the default slice gives entitlements null and the same "cut off" limitation.
Data against wrapper (the entitlement com.x on the x86_64 slice against the default slice):
<data>AQID</data>
<dict><key>$plist_type</key><string>data</string><key>base64</key><string>AQID</string></dict>
Unsigned verdict: the snapshot file is named not signed at all, and the x86_64 call exits 1 with stderr <snapshot path>: code object is not signed at all. Result: "Unsigned Mach-O slices: x86_64." With stderr <snapshot path>: invalid or unsupported format, the result is "Signature state could not be classified for Mach-O slices: x86_64."
🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊
Adopt main's exact snapshot-framed unsigned verdict for the aggregate and per-slice checks; the slice inspection and entitlement comparison keep their behaviour on top of it. Co-Authored-By: Claude Fable 5.1 <[email protected]>
left a comment
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88349c03d7
ℹ️ 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".
| team_identifier: parsed.team_identifier, | ||
| cdhashes: parsed.cdhashes, | ||
| authorities: parsed.authorities, | ||
| hardened_runtime: parsed.hardened_runtime, | ||
| }; |
There was a problem hiding this comment.
Preserve each slice's timestamp and hash algorithms
When a universal file is assembled from separately signed slices whose identifier, team, authorities, runtime, and entitlements match but whose Hash choices or Timestamp differ, parseCodeSignature observes those fields for every codesign -a result, but this projection ends without retaining either. The top-level hash_algorithms and timestamp describe only the default slice, while provenance retains no command output, so callers cannot discover a weaker hash choice or different signing time on another slice; carry both fields through SliceSignature and the difference report.
AGENTS.md reference: AGENTS.md:L19-L19
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changed for now: per-slice hash choices and timestamps are parsed but not carried into the sentence, by design to keep the limitation readable. Adding them is a small extension of SliceSignature; I'd like a maintainer to say whether they want those fields reported before the sentence grows again.
🤖 Addressed by Claude Code
| return `data:${Buffer.from(value).toString("base64")}`; | ||
| if (value instanceof Date) | ||
| return `date:${Number.isNaN(value.getTime()) ? "invalid" : value.toISOString()}`; | ||
| if (typeof value === "number") return `number:${String(value)}`; |
There was a problem hiding this comment.
Distinguish integer and real entitlement shapes
When one slice signs <integer>1</integer> and the described slice signs <real>1</real> for the same entitlement, the XML decoder produces the number 1 for both and their JSON projections are equal; this branch also gives both the shape number:1, so describeEntitlementDifferences returns null and the source-type difference disappears when the raw slice output is discarded. Carry the XML numeric element kind into the comparison shape rather than deriving it solely from the decoded JavaScript value.
AGENTS.md reference: AGENTS.md:L19-L19
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changed for now: the shape is derived from the decoded value, so <integer>1</integer> and <real>1</real> do collapse. Telling them apart means threading the XML element kind out of the plist decoder, which is the decoder's owner to decide; happy to follow if a maintainer wants it.
🤖 Addressed by Claude Code
| entitlementDifferences: describeEntitlementDifferences( | ||
| decoded.value, | ||
| aggregate.entitlementValue, | ||
| { slice: decoded.shape, described: aggregate.entitlementShape }, | ||
| ), |
There was a problem hiding this comment.
Keep ambiguous exact integers out of equality checks
When each plist contains 9007199254740992 and 9007199254740993 under different keys and the slices swap those values, both literals round to the same JavaScript number; createPlistNumberProjection deliberately leaves both occurrences ambiguous because the rounded value maps to two decimals, and entitlementShape sees the same rounded tree. This comparison can therefore return null even though the signed policies differ; fresh evidence beyond the fixed single-literal case is the two-literal collision, so propagate numeric ambiguity and leave the slice comparison unknown (or retain occurrence-aware exact literals) instead of treating the projected trees as aligned.
AGENTS.md reference: AGENTS.md:L21-L21
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changed for now: when two literals in one plist round to the same number, the number projection already marks both ambiguous. Propagating that ambiguity into the slice comparison (reporting it as unknown rather than equal) is reasonable; I'd rather have a maintainer confirm that direction than widen the comparison on my own.
🤖 Addressed by Claude Code
Combine main's partial-observation retention for slice inspection (morluto#5765) with the per-slice comparison: provenance and limitations accumulate on the shared observation as slices arrive, a slice query that fails for a reason other than being unsigned is a failure that keeps the facts collected so far, and the mixed-state notes are recorded before the slice loop. Co-Authored-By: Claude Fable 5.1 <[email protected]>
| ["-d", "-a", architecture, "--verbose=4"], | ||
| signal, | ||
| ); | ||
| if (!slice.ok) return slice; |
There was a problem hiding this comment.
Completed slice facts disappear
#inspectSignatureSlices keeps completed signed-slice facts only in its local signed array. If a later query fails or is cancelled, the caller returns partialObservation before adding those slice descriptions. Earlier differences in identifiers or entitlements disappear, and provenance records only commands and byte counts—not their output.
This is non-blocking, but makes partial results less useful. Add completed slice descriptions to the shared observation before returning an error.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/native/NativeMacOSProvider.ts
Line: 908
Comment:
**Completed slice facts disappear**
`#inspectSignatureSlices` keeps completed signed-slice facts only in its local `signed` array. If a later query fails or is cancelled, the caller returns `partialObservation` before adding those slice descriptions. Earlier differences in identifiers or entitlements disappear, and provenance records only commands and byte counts—not their output.
This is non-blocking, but makes partial results less useful. Add completed slice descriptions to the shared observation before returning an error.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Agreed on the gap: completed slice facts live in the helper's local array until the loop ends, so a failure part way retains provenance and limitations but not the per-slice descriptions. The fix is small (describe the slices seen so far into the shared limitations before returning the error). I'll do it if a maintainer wants partial observations to carry it; leaving the thread open for that call.
🤖 Addressed by Claude Code
left a comment
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab0c82e6f1
ℹ️ 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".
| if (start < 0) | ||
| return { value: null, limitations: [], decoded: true, shape: null }; |
There was a problem hiding this comment.
Treat nonempty declaration-less entitlements as unknown
When a successful --entitlements capture is nonempty but lacks <?xml—for example, an otherwise valid <plist>...</plist> document with the optional XML declaration omitted—this branch marks it decoded with value null; the slice comparison can then report entitlements none or no difference instead of unavailable. Fresh evidence beyond the fixed missing-closing-tag case is that this pre-parser return still conflates every nonempty unframed body with codesign's genuinely empty no-entitlements output; only empty/whitespace output should mean none, while other unframed output should remain unknown.
AGENTS.md reference: AGENTS.md:L21-L21
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fair: the pre-parser check keys on <?xml, so a nonempty body without the optional declaration reads as no entitlements. The tighter rule is: empty or whitespace output means none, anything else without a parseable plist stays unavailable. Small change; leaving the thread open for a maintainer to say whether they want it in this PR or alongside the other open entitlement-parsing threads.
🤖 Addressed by Claude Code
Adjacency only: main's new plist observation helper sits beside the entitlement parser. Co-Authored-By: Claude Fable 5.1 <[email protected]>
left a comment
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c531497234
ℹ️ 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".
| @@ -787,72 +834,258 @@ class NativeMacOSClient implements AnalysisClient { | |||
| ); | |||
| return err(slices.error.retainPartialObservation(observation())); | |||
There was a problem hiding this comment.
Retain completed slice facts on later failures
When one architecture has been parsed (and possibly had entitlements compared) but a later slice display or entitlement command fails or is cancelled, this branch builds the partial observation before describeSignatureSlices ever runs. The completed SliceSignature and entitlementsUnavailable entries live only in the callee's local arrays, while provenance contains just command metadata, so the retained error loses the successful slice's identifier, CDHashes, differences, and unknown-entitlement fact; project these entries into limitations as each slice finishes or attach them to the error before returning.
AGENTS.md reference: AGENTS.md:L31-L31
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Same gap Greptile raised above (completed slice facts stay in the helper's local arrays until the loop ends, so a later failure retains provenance and limitations but not the per-slice descriptions). The fix is to describe the slices seen so far into the shared limitations before returning the error; small, and I'll do it on a maintainer's word rather than reshape the sentences again on my own. Leaving open for that call.
🤖 Addressed by Claude Code
Thread main's command deadline through the slice and lipo captures. The real-codesign CLI test on a universal file now accepts the slice sentences beside the snapshot note while still rejecting any forged text in them. Co-Authored-By: Claude Fable 5.1 <[email protected]>
commented
Oct 22, 2026
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
commented
Oct 22, 2026
|
@CassieFox23 quick note so the new commits don't look like more changes: everything since adae09e is merge-conflict resolution with main (four merges, the latest bc36fdf). Main rewrote the unsigned verdict and added partial-observation retention in this same function, so the slice code now sits on top of those; the only test edit is the new real-codesign CLI test, which asserted the limitations list exactly and now accepts the slice sentences while still checking that no forged text reaches them. No new behaviour. Each push reset the workflow approval, so the checks for bc36fdf are waiting again. I'll re-request your review so it shows up for you; if you can approve the workflows when you look, that would unblock CI. Thanks again. |
left a comment
There was a problem hiding this comment.
TL;DR: Since my last review at adae09e, Ambar-13 has only merged main. I read the new head bc36fdf, and the five fixes I confirmed still stand. One behaviour changed. A slice whose codesign call fails for an unknown reason now fails the whole call. Before, it added a limitation. Four old threads and six new bot threads are still open, and CI is waiting for a maintainer to approve it.
I read the code only this round. I ran no tests and no probes.
What changed since adae09e
- Four merges of main. The PR's own files
src/native/signatureSlices.tsandsrc/native/signatureSlices.test.tsare byte-identical to adae09e. So my fixed findings still hold by reading. Two are on quoting entitlement keys and quoting slice identity values. One is on the<data>against dictionary compare. src/native/NativeMacOSProvider.tswas reworked to sit on top of main's new "keep what was seen when a call fails" code. Ambar-13 says there is no new behaviour. That is true for the five fixes, with one exception below.- The only test edit besides adapting to main is in
tests/boundary/cli/nativeSignatureCli.test.ts. The limitations check now accepts the slice sentences. It still checks that no forged text reaches them.
My five earlier findings at bc36fdf
| Finding | Result at bc36fdf (read, not run) |
|---|---|
| Quote entitlement keys | Still fixed. Same signatureSlices.ts as adae09e. |
| Changed entitlements look unchanged and Compare source types | Still fixed. Same file as adae09e. |
| Quote slice identity values | Still fixed. Same file as adae09e. |
| Partial entitlement XML | Still fixed. parseEntitlements at NativeMacOSProvider.ts:1885 still returns "cut off before its closing tag; entitlements are unavailable". |
| Echoed paths in unsigned check | Fixed another way. Main replaced the path-stripping check. isNonzeroUnsignedObservation (NativeMacOSProvider.ts:1733) now accepts only the exact line <snapshot path>: code object is not signed at all, so a file name that says "not signed at all" cannot pass. |
One behaviour change to know about
A slice call that failed for another reason gave the limitation Signature state could not be classified for Mach-O slices: x86_64. at adae09e. That sentence is gone from src/ at bc36fdf. NativeMacOSProvider.ts:1010 now returns the failure, and the call fails with the facts seen so far kept (:913-915). The updated test in nativeInventory.golden.test.ts expects exactly that. This matches how the aggregate queries already behave, so it looks intended. My earlier check of that case would now show an error, not a limitation.
Still open
Old threads, all left for a maintainer by Ambar-13. None changed:
Bound retained difference text. Values are still cut at 80 characters, with no cap on key count.- Keep failure reasons. Still as described. A slice entitlements call that exits non-zero gives only
Entitlements could not be read for Mach-O slices(NativeMacOSProvider.ts:1049-1079). The codesign message is not kept. Inspect a universal fallback when one family remainsandRetain type-only differences beside value changes.
Six bot threads opened after my review, on heads 88349c0 to c531497. Ambar-13 replied to each and left each open for a maintainer. I read the code for two of them:
Completed slice facts disappear(Greptile) andRetain completed slice facts on later failures(Codex) are the same gap.signedis a local array (NativeMacOSProvider.ts:976). A later failure still keeps the command metadata and limitations. It does not keep the per-slice descriptions. Real, as described. The new keep-partial-results code is where it shows.Treat nonempty declaration-less entitlements as unknown. Real, as described.NativeMacOSProvider.ts:1883treats any output without<?xmlas "no entitlements".- Not checked:
hash choices and timestamps,integer against realandambiguous exact integers.
None of the ten undoes the five fixes. Ambar-13 asked a maintainer to decide on all of them, which seems right to me.
CI
On bc36fdf, the CI and PR title workflow runs show action_required, and PR readiness passed. Ambar-13 asked me to approve the workflows. I can't: my account has read access only on this repo, so a maintainer has to approve them.
Not run
- Any test or probe at bc36fdf. Everything above is a reading of the code and the compare between the two heads.
- Real codesign or lipo output. This box is Linux.
- The three bot threads marked "Not checked".
🤖 Written with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊
Main (morluto#6315 area, commit 2721650) now asks codesign for the selected architecture with -a on every inspect_signature query and probes the other slices only for their signing state. This merge keeps that binding: the result's fields describe the requested slice, and the per-slice comparison from this branch runs on top of it. With -a, codesign reports the requested slice as "Mach-O thin (<arch>)" even for a universal file (checked against /usr/bin/true on macOS 27), so the Format line no longer names the other slices. A universal target's slice names therefore come from lipo -archs, with the target's CPU families as the fallback when lipo is unavailable; main's own probe loop found no slices on a real universal file for this reason. Wording follows main: "Partial signature coverage: ... describe the requested <arch> architecture; other slices are queried separately", and main's two "unavailable because codesign reported it unsigned" notes replace this branch's mixed-signing notes. Other signed slices, differing fields, requirement hashes and the unsigned-requested-slice case keep their limitations, now phrased against the requested slice. Co-Authored-By: Claude Fable 5.1 <[email protected]>
commented
Oct 24, 2026
|
@CassieFox23 thanks for the triage and for taking the time on this one. The new push (6dc8d4d) is a merge with main, no new behaviour of its own: main's 2721650 now binds |
left a comment
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6dc8d4df67
ℹ️ 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".
| // The aggregate entitlements belong to the requested slice; another | ||
| // slice's entitlements are hashed into its own code directory. | ||
| if ( | ||
| !requested.entitlementsComparable || |
There was a problem hiding this comment.
Report skipped slice entitlements as unknown
When a signed requested slice's entitlement plist is undecodable, entitlementsComparable is false, so this branch skips the --entitlements command for every other signed slice. It pushes each slice as ordinary facts without either entitlementDifferences or an entitlementsUnavailable entry, and the final limitations therefore do not say that those slices' entitlements were unexamined; a slice with a different policy is indistinguishable from one that matched. Record the skipped slices as unknown, or emit a comparison-unavailable limitation, instead of silently omitting the fact.
AGENTS.md reference: AGENTS.md:L19-L19
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Noted, and the observation is right: when the requested slice's entitlements could not be read or decoded, the other slices are not asked for theirs and no limitation says so, though the requested slice's own "Entitlements: …" or "unavailable because codesign reported it unsigned" note is present. A one-line "entitlements of the other slices were not compared" limitation would close it. Leaving it for the maintainers to decide, as with the other open design items on this PR; happy to add it if wanted.
commented
Oct 24, 2026
|
Closing: #4293 was fixed on main by 2721650 with a different boundary (the result describes the requested architecture; other slices are not described), and the filer verified and closed it. Thanks CassieFox23 for the review time. One note for whoever touches this next: with -a, codesign prints Format=Mach-O thin () even for a universal file (try codesign -d -a arm64e --verbose=1 /usr/bin/true), so the probe loop in main that reads slice names from the Format line finds no other slices on a real universal binary; lipo -archs gives the names. |
Summary
Fixes #4293.
On a universal Mach-O where every slice is signed,
inspect_signaturereturned the identity of one slice and said nothing about the others. Now the fields describe the requested architecture (main's-abinding, since the 2026-10-24 merge below), and the result lists the other slices and their CDHashes, says which slices are signed differently and how, and explains whydesignated_requirementcan list CDHashes thatcdhashesdoesn't. No schema change; the new facts are limitations plus per-sliceprovenanceentries.Problem and expected behavior
Build a two-slice file where the arm64 slice is ad hoc signed as
com.example.armslicewith the hardened runtime anddisable-library-validation, and the x86_64 slice ascom.example.x86slicewith no hardened runtime andget-task-allow(commands intests/fixtures/native-macos/codesign-universal-signed/README.md). On main,rea inspect-signature fixture --jsonreportscom.example.armslice, one CDHash,hardened_runtime: trueand onlydisable-library-validation, with no mention of slices, whiledesignated_requirementlists both CDHashes.Each slice of a universal binary carries its own signature (Apple TN3126), and
codesign -dwithout-adescribes one slice. Presenting one slice's facts as the file's facts gets the x86_64 slice exactly wrong on the two facts that decide whether it can be debugged.Change and scope
src/native/NativeMacOSProvider.ts: when the aggregate display reports a signedMach-O universal (…)with more than one slice, runcodesign -d -a <slice> --verbose=4for each slice (before, this only happened once an aggregate query had already hit an unsigned slice). Parse each signed slice with the existingparseCodeSignature. A slice whose CDHash differs from the aggregate is also asked for its entitlements, since they're sealed per code directory. Unsigned slices keep theUnsigned Mach-O slices: …limitation. Slice names come from codesign's ownFormat=line with no allow-list, soarm64e.x1on macOS 27 is queried too.src/native/signatureSlices.ts(new, pure): finds the described slice by CDHash, lists the others, names the differing fields (identifier, team, authorities, hardened runtime, entitlement keys), and reports CDHashes that appear in the requirement but not incdhashes. An unmatched default slice is reported as unmatched, not guessed. Empty and absent entitlements compare equal, since codesign prints nothing for either.docs/native-investigation.md: a paragraph on what the fields describe for universal files.Not included: a structured per-slice field (agents that want the full record still run
codesign -d -athemselves; the limitation tells them which slices and what differs), and the case where codesign's default slice is the unsigned one, which stayssigned: falseas in #3583.Overlap with #3583: it also queries every slice and renames
#inspectMixedSignatureSlicesto#inspectSignatureSlices, but only to report unsigned slices; its own test asserts no limitation when all slices are signed. This PR adds the comparison on top. If #3583 lands first, I'll rebase.Ordinary fix inside the existing
inspect_signatureboundary. All added commands are read-onlycodesign -druns on the registered snapshot.Review follow-up (second commit)
Codex and Greptile raised four points; all are in the second commit.
signedstays false for the default slice, as fix(native): check every slice of a signed universal Mach-O #3583 left it. Verified on a real file (arm64 slice unsigned, x86_64 ad hoc signed) on this Mac.<data>or<date>:jsonValueSchemarejected them and the exception took the whole result down.parseEntitlementsnow falls back to the plist projectioninspect_plistuses (typed$plist_typeobjects) with a limitation, and reports an undecodable plist as null instead of throwing. This also hardens the aggregate path, which had the same gap.__proto__keys in a slice's entitlements are now reported asEntitlements of the <slice> slice: …, same as the aggregate.names CDHashes of other slices (x86_64 2696…), and any hash matching no slice is listed separately as unmatched rather than attributed.Tests added: unit tests for the unmatched-hash case and the unsigned-default description; golden tests for an unsigned default slice with a signed sibling (exact provenance) and for a non-default slice whose entitlements hold a data value and a
__proto__key. Re-ran: the signature test set (111 passed), every native test file (49 files),npm run check,npm run docs:check.Review follow-up, round two (third commit)
arm64,arm64eandarm64e.x1. The unsigned path now askslipo -archsfor the names codesign accepts and falls back to the target's families only if lipo cannot answer. The golden test covers a signedarm64e.x1sibling behind an unsignedx86_64default; the real-file run above still works and gains thelipo -archsprovenance entry.parseEntitlementsreports whether it decoded anything; a slice whose plist could not be decoded keeps its entitlements unobserved and is named inEntitlements could not be read for Mach-O slices, so the comparison can no longer sayentitlements nonefor it. The same flag stops slice entitlement queries when the aggregate plist itself did not decode. New golden test with a malformed plist on the non-default slice.__proto__count are replaced by the entitlement-specific ones.9007199254740992and9007199254740993compare as different (golden test); long values are cut at 80 characters but carry their length and a SHA-256 prefix so two long values that differ past the cut still read as different (unit test).constructorortoStringcannot reach a prototype property and throw inside the rendering; unit test added.mach-o-universaltargets, so unsigned thin files never depend on it; the missing-lipo fallback is narrowed to the exactlipo is unavailable through xcrunreason with complete cleanup, so a closed client or cleanup failure still propagates; signed slices behind an unsigned default now report team identifier and authorities too; and entitlement differences carry values (get-task-allow: true (described slice false),… absent) instead of key names only, with a unit test for the same-key-different-value case.Re-ran: signature test set (7 files, 130 passed), every native test file (49 files),
npm run check,npm run docs:check, and the three CLI runs (fixture,/bin/ls, the real default-unsigned file).Merge with main (2026-10-18)
Main rewrote
parseEntitlementsto project entitlement scalars through the plist owners (shared value and exact-number projections). The merge takes that version, which also covers the integer and data cases earlier commits here handled separately, and keeps only thedecodedflag so an undecodable slice plist stays unobserved. After the merge: signature test set 122 passed, every native test file (60 files, 785 passed),npm run checkandnpm run docs:checkok.Review follow-up after CassieFox23's triage (2026-10-19)
One commit (adae09e) for the five items marked real: a plist with an XML header but no closing tag is now undecodable rather than "no entitlements"; the echoed snapshot path is stripped before the per-slice not-signed verdict is matched, as the main parser already does; identifiers, team, authorities and entitlement keys are JSON-quoted in the limitation sentences; and entitlements are compared on a type-tagged form of the decoded plist as well as the projected JSON, so a
<data>value and a dictionary shaped like its wrapper read as different. Each has a test. Left alone with a note on the thread: 21 (retained text size, unmeasured) and 28 (carrying codesign's diagnostic for a failed per-slice query, a design call); 20 is outdated and 22 resolved by the merge with main. Re-ran: signature test set 128 passed, every native test file (62 files, 809 passed),npm run check,npm run docs:check, and the CLI on the two real fixtures.Merge with main (2026-10-22)
Main threaded a per-command deadline through the native provider; the slice and lipo captures now pass it along. Main also added a real-codesign CLI test that runs
inspect-signatureon a universal copy of/usr/bin/truewith forged text in the file name and asserted the limitations list exactly; it now accepts the two slice sentences this PR adds beside the snapshot note, and additionally checks that none of the forged text (authority, identifier, entitlement, requirement) reaches any limitation. On the merged tree: signature test set 143 passed, every native test file (75 files, 987 passed),npm run checkandnpm run docs:checkok.Merges with main (2026-10-21)
Two more merges. Main adopted an exact snapshot-framed unsigned verdict (
isNonzeroUnsignedObservationnow requires codesign's diagnostic for the bound snapshot and nothing else), which supersedes the echoed-path handling from adae09e; both the aggregate and the per-slice checks use it. Main's #5765 then added partial-observation retention for slice inspection: this merge keeps that, so provenance and limitations accumulate on the shared observation as slices arrive, a slice query that fails for a reason other than being unsigned is a failure that retains the facts collected so far (the earlier "could not be classified" limitation is gone), and the mixed-state notes are recorded before the slice loop. The echoed-file-name test now asserts that failure path. After the merge: signature test set 142 passed, every native test file (71 files, 913 passed),npm run docs:checkok;npm run checkfails only on knip's unlistedg++binary insrc/windows/WindowsHandleClose.test.ts, a file from main (43ac3d1) that this branch does not touch.Merge with main (2026-10-24)
Main's 2721650 now asks codesign for the selected architecture with
-aon all threeinspect_signaturequeries and probes the other slices only for their signing state, with a limitation saying their metadata is not returned. The merge keeps the-abinding, so the result's fields describe the requested slice by name instead of codesign's host default, and runs this PR's per-slice comparison on top; the limitation now ends "other slices are queried separately" and is followed byOther signed Mach-O slices, the differing fields, and the requirement-hash note. Main's two "unavailable because codesign reported it unsigned" notes replace this branch's mixed-signing notes.One thing surfaced while merging: with
-a, codesign reports the requested slice asFormat=Mach-O thin (<arch>)even for a universal file (checked on/usr/bin/true, macOS 27), so main's probe loop, which takes slice names from the Format line and treats a thin format as no slices, finds nothing on a real universal file; its tests substitute a universal Format line. Here a universal target's slice names come fromlipo -archs(the path this branch already had for the unsigned case), with the target's CPU families as the fallback when lipo is unavailable. Main's real-codesign binding test, which expected the probes to follow the target's CPU families, now expects lipo's exact slice names. On the merged tree: signature test set 91 passed, every native test file (87 files, 1239 passed),npm run checkandnpm run docs:checkok, with Node 26.12.1 as main now requires.Contract and boundary impact
#inspectBoundSignature/#inspectSignatureSlicesin the native macOS provider, plus the newdescribeSignatureSlices.provenancegains one-d -a <slice> --verbose=4entry per slice and one--entitlements :-per differing slice.#captureSignature, so it reads the digest-verified snapshot and re-verifies the target before and after, like the existing calls.Expected effects:
Evidence and regression coverage
Tests added or updated:
src/native/signatureSlices.test.ts(new, 7 tests): differing slices, slices signed alike, unmatched default slice, slices not asked for entitlements, empty vs absent entitlements, case-insensitive CDHash match, no slices.tests/boundary/providers/native/nativeInventory.golden.test.ts: a real-capture case from the issue's fixture asserting the three new limitations and the exact six-command provenance; a signed-alike control (described-slice note only); a thin control (three commands, no slice note, runner throws on any-a). Existing mixed-signature tests pass unchanged.tests/boundary/providers/native/nativeSignatureTargetBinding.test.ts: the real-codesign swap test copies/usr/bin/true, which is universal, so it now checks that every call, including per-slice ones, reads$ARTIFACTinstead of expecting exactly three.Base reproduction: built main
42fc6c5and ran the CLI on the fixture; output as described above, three provenance entries, no slice limitation. The new golden test fails on main.CLI output on this branch (macOS 27.0.1 arm64):
Remaining proof gaps: one Apple Silicon Mac. On Intel the default slice differs, so the fields describe a different slice (the limitation names it). Slice names beyond
x86_64,arm64,arm64e,arm64e.x1weren't tried against real codesign. Extra run time not measured: onecodesign -d -aper slice and one--entitlementsper differing slice, only for signed universal files.For evidence-bearing changes:
Validation performed
macOS 27.0.1 arm64, Node 26.7.0, npm 11.19.0, on top of main
42fc6c5.npm ci --ignore-scripts— oknpm run test:focusedon the 7 signature-related files (new unit test, golden, target binding, nativeProvider, nativeSignatureCli, nativeSignatureTargetBindingMcp, appleApplication) — 127 passednpm run test:focusedon every test file undertests/boundary/providers/nativeandsrc/native(49 files) — 625 passednpm run check:fast— oknpm run check— oknpm run docs:check— oknpm run verify:test-discovery— all 1401 test files found oncenpm run build:cached, then the CLI runs above before and aftertest:fast), Linux, Intel macOSCompatibility, safety, and release
codesignon macOS 27.0.1 arm64 (CLI runs and the/usr/bin/truetest).codesign -don the registered snapshot; no target execution.Author readiness
Human owner: @Ambar-13
Before merge
🤖 Generated with Claude Code