Skip to content

regress: resource-staging cluster dissolved; jit-bundle-resolution family design - #439

Merged
obj-p merged 5 commits into
mainfrom
resource-staging-family
Jul 21, 2026
Merged

regress: resource-staging cluster dissolved; jit-bundle-resolution family design#439
obj-p merged 5 commits into
mainfrom
resource-staging-family

Conversation

@obj-p

@obj-p obj-p commented Jul 21, 2026

Copy link
Copy Markdown
Owner

What happened to the resource-staging cluster

Re-verification of B04/R02/R03 on current main dissolved the cluster three different ways:

  • R02 closed (fixture defect). String(localized:bundle:locale:) never selects an .lproj — its locale: parameter only affects interpolation formatting, proven with a native harness against the healthy built bundle. The corrected fixture resolves the title through the locale's .lproj sub-bundle with visible staging-failure states. All surfaces render Recursos cargados (macOS control, iOS single-preview control, iOS index 1 after a live switch). Row flips to Guard passes.
  • B04 closed (fixture defect). Bundle.allFrameworks only lists frameworks containing ObjC classes — pure-C DynamicBadge could never be observed, proven with a native dlopen control — and its JSON sat under Resources/ in a flat iOS framework. The fixture gains an ObjC marker class, a root-level resource, and a Bundle(for:) lookup with per-stage failure states. The EPC-dlopened framework serves its internal resource; row flips to Guard passes. B02's combined render re-verified after the artifact change.
  • R03's iOS crash was core: capture the host-arch slice of fat Xcode builds (R03 iOS crash) #438 (fat-build x86_64 capture), fixed and merged separately; iOS is back to the macOS-identical partial baseline.

The one genuine gap and its design

docs/jit-bundle-resolution.md: Bundle(for:) on a class compiled into the JIT resolves to the agent image; only Generated*Symbols.swift gets the #151 rewrite to CODESIGNING_FOLDER_PATH (why R03's color renders while its strings/plist/momd miss — resources verified present on disk both platforms). Design: an agent-side +[NSBundle bundleForClass:] hook keyed on class_getImageName == NULL, wrapper path plumbed from the build settings; stage 2 retires the text rewrite. Adversarial design review ran native experiments — the swizzle mechanics, cache behavior, and both wrapper layouts verified; dladdr rejected as discriminator (misattributes runtime metadata in Swift processes); imageless JIT-linked SwiftPM package classes documented as a gated limitation needing its own matrix row.

Gates

/simplify pass + adversarial correctness pass on the branch diff (findings folded: rebase-orphaned SHAs dropped, failure-state list corrected, README rationale fixed); design doc had its own experimental adversarial review (amendments folded). Unit tier, integration tier, and manual RegressToolGuardTests all green locally; lint exit 0 on every commit.

🤖 Generated with Claude Code

obj-p and others added 5 commits July 21, 2026 14:15
B04 unchanged. R02's blank framebuffer is gone; its Spanish assertion is
a fixture defect (String(localized:locale:) cannot select an lproj).
R03 macOS unchanged; iOS regressed to an agent SIGILL — the Xcode
build-log capture takes an x86_64 simulator invocation that
stripForeignTargetTriple accepts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…oses

String(localized:bundle:locale:) does not select the .lproj (locale:
affects interpolation formatting only, proven natively against the
built bundle), so the 2026-07-15 fixture variant could never display
Spanish even against correct staging. The title now resolves through
the locale's .lproj sub-bundle with visible staging-failure states.
With the mechanism corrected, all R02 surfaces render Recursos
cargados (macOS control, iOS single-preview control, iOS index 1 after
a live switch) and the row flips to Guard passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bundle.allFrameworks never lists a framework without ObjC classes
(proven natively with a dlopen control), and the JSON sat under
Resources/ in a flat iOS framework whose resource directory is the
wrapper root. DynamicBadge gains an ObjC marker class, the payload
moves to the framework root, and the preview resolves through
Bundle(for:) with distinct failure states. With the mechanism
corrected the iOS snapshot renders the payload — the EPC-dlopened
framework serves its internal resource, so B04 flips to Guard passes.
B02's combined render re-verified after the artifact change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The resource-staging cluster dissolved under re-verification: R02 and
B04 were fixture-mechanism defects, R03's iOS crash was the fat-build
capture bug (#438). The one genuine gap is Bundle(for:) on JIT-compiled
classes resolving to the agent image while only Generated*Symbols.swift
gets the #151 wrapper rewrite. Design: an agent-side bundleForClass:
hook keyed on class_getImageName == NULL, wrapper path plumbed from
CODESIGNING_FOLDER_PATH; stage 2 retires the text rewrite. Amendments
from adversarial review with native experiments folded: dladdr is
unsound as the discriminator in a Swift process, and imageless
JIT-linked SwiftPM package classes are a documented, gated limitation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop rebase-orphaned commit SHAs from the design doc (cite rows
instead), list B04's failure states by stage rather than an incomplete
enumeration, and correct the DynamicBadge README's rationale — the
marker anchors Bundle(for:), while the allFrameworks ObjC requirement
is a separate fact.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@obj-p obj-p added the merge Run CI and auto-merge (squash) on success label Jul 21, 2026
@obj-p
obj-p enabled auto-merge (squash) July 21, 2026 18:41
@obj-p
obj-p merged commit d0f936c into main Jul 21, 2026
3 checks passed
@obj-p
obj-p deleted the resource-staging-family branch July 21, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge Run CI and auto-merge (squash) on success

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant