Skip to content

Strip local paths from Release app binaries - #37

Merged
VladimirBrejcha merged 1 commit into
mainfrom
codex/rr21-app-release-paths
Aug 31, 2026
Merged

Strip local paths from Release app binaries#37
VladimirBrejcha merged 1 commit into
mainfrom
codex/rr21-app-release-paths

Conversation

@VladimirBrejcha

Copy link
Copy Markdown
Contributor

What changed\n\nRelease macOS builds now generate the external dSYM first, then strip debugging records only from the shipped executable while leaving Swift symbols intact. Distribution packaging resolves the exact Xcode-visible checkout root immediately before signing and verifies the staged Mach-O rather than relying on text scanners.\n\nThe verifier requires exactly arm64 and x86_64, scans both thin slices and the universal container as raw bytes, and rejects retained STABS/debug records, absolute-path symbol names, or embedded DWARF. The compiled regression covers clean output, leaks in either required slice, bytes appended outside slices, a leaking arm64e third slice, a missing architecture, and a same-version unstripped build whose original checkout root differs from the current checkout.\n\nThe failure required several conditions together: compiler and linker metadata survived in NUL-containing binary bytes, text and strings-based scanners did not see it, a current-root-only check could miss moved-checkout reuse, and required-slice-only inspection could miss extra or container bytes. The correction keeps those defenses independent and checks the final pre-signing boundary.\n\n## How you verified\n\n- [x] Pre-fix Release executable reproduced 118 exact checkout-root occurrences across the universal binary and both architecture slices\n- [x] Final unsigned Release build contains zero exact Xcode-root occurrences in the universal executable, arm64, and x86_64\n- [x] Final executable and external dSYM UUIDs match for both architectures; the dSYM resolves line information and stays outside the app and archive\n- [x] Repaired verifier rejects the real pre-fix executable even when supplied an unrelated current root\n- [x] Release app stayed live under isolated runtime state until controlled termination\n- [x] Full implementation profile passed, including the full npm test, app 171/171, harness build, and harness 113/113\n- [x] Spec-only profile passed, including docs 42/42 and harness config 10/10\n- [x] Repository and independent staged current-source audits passed\n- [x] Independent review reproduced two bypasses, both were repaired, and final re-review found no P1/P2 issues\n\n## Notes\n\nThe defense intentionally targets the observed Release debug/linker metadata and exact current build root. It does not add a broad temporary-directory ban or arbitrary binary privacy scanner. External dSYMs retain local source paths for crash symbolication and remain build artifacts, never distribution payloads.\n\nNo signing, notarization, release, tag, retained Alpha artifact, or publishing behavior was invoked or changed.\n\nThis project is Alpha, macOS-only, and needs Xcode to talk to iOS Simulators. See CONTRIBUTING.md.

Why:
- Release Mach-O debug and linker metadata retained checkout and DerivedData paths that text-only scans missed.
- Same-version skip-build reuse and extra universal bytes required defenses independent of the current checkout spelling.

Changed:
- Generate the external dSYM before Release-only debugging-symbol stripping while preserving Swift symbols.
- Gate the staged executable on exact architectures, fat and thin raw bytes, debug records, absolute-path symbols, and embedded DWARF.
- Add deterministic Mach-O regressions and document the pre-signing contract.

Verification:
- agent:verify implementation passed.
- agent:verify spec-only passed.
- Release universal, both thin slices, dSYM UUID matching, runtime smoke, negative baseline, and public-source audits passed.

Affected:
- macOS Release app builds and distribution pre-signing validation.

Refs:
- RR21
- https://how.complexsystems.fail/

Session:
- task-sessions/rr21-release-path-remapping-20260831
@VladimirBrejcha VladimirBrejcha added the autopilot:on Enable Autopilot processing for this PR label Aug 31, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 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-08-31T10:48:24.848429Z 4c703a0 PR opened
ℹ️ 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.

@fiveonecode-autopilot

Copy link
Copy Markdown

Reviewed top-level PR feedback and left the current code unchanged.

These items were posted as PR review bodies or conversation comments rather than unresolved review threads, so this acknowledgement is recorded on the PR timeline.

  • Source: Strip local paths from Release app binaries #37 (comment)
    This is Codex's review-status dashboard for HEAD 4c703a0, not a review finding. It reports that Code Review completed when the PR opened and lists no defects, suggestions, or requested changes. A completed no-findings Codex summary does not require a repository change.

@VladimirBrejcha
VladimirBrejcha merged commit c1ac3e9 into main Aug 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autopilot:on Enable Autopilot processing for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant