Skip to content

Release scope-bound admitted roots in Swift-JSON 1.6.0 - #40

Closed
ThorFuchs wants to merge 7 commits into
mainfrom
codex/composition-release
Closed

ThorFuchs wants to merge 7 commits into
mainfrom
codex/composition-release

Conversation

@ThorFuchs

@ThorFuchs ThorFuchs commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Change

Scope-bound admitted roots retain a trusted or parsed immutable JSON root for the borrowed composition lifetime and admit it once. Exact owner identity rejects cross-scope handles before navigation; each selected output remains charged to the same cumulative ledger.

Composition instance methods now explicitly declare borrowing, preventing two Swift 6.4 bound-method compiler aborts without changing callback ownership or accounting. Compiler classification accepts the bound-method diagnostic only with its exact primary error and matching source capture note. Five explicit-parameter probes supplement every original ownership/call-site fixture, and standalone reductions isolate the remaining compiler defect without JSON or imports.

Qualification

Fresh focused qualification ran from clean commit 864e033f00df2ca3549f3a77f0ab553ab2030e98 with Swift 6.4.0. All 16 commands returned zero: 20 core functions in Debug/Release/ASan, two independent-scope functions under TSan, strict-memory-safety compilation, both public consumers, five adapter tests in Debug/Release/ASan, eight scale cells, both 50,000-value admitted-root cases, and 14 Python classifier tests. Source inputs remained unchanged. Large-root work and retention totals match the previous qualification.

The overall lane exits 2 / blocked. All 18 semantic ownership negatives pass. Among 14 call-site probes, four original inferred captures still abort the compiler; the original nonescaping bound-method positive now receives an ordinary borrowed-self diagnostic and remains blocked as unsupported. Its positive requirement was not changed into a rejection pass. Five new explicit-parameter counterparts compile or reject as required. No abort or rejected positive counts as success.

The direct adapter still refuses its balanced 128/128 capacity target; five scale cells complete and three reach documented finite quotas. A complete Swift-OpenAPI importer and broad C2 capacity remain unqualified.

Newer toolchain comparison

The minimized crash is filed upstream as swiftlang/swift#93364, with self-contained escaping/local-function reductions, explicit-borrowing counterparts, and a sanitized crash trace.

A fresh focused run tested the official signed and notarized Swift 6.4.1 release on macOS 27.0 with Xcode's macOS 27.2 SDK, using the same clean commit 864e033f00df2ca3549f3a77f0ab553ab2030e98. The source manifest, all 32 compiler source hashes, all expectations, and all compiler outcomes match the 6.4.0 baseline.

All 16 commands returned zero: 20 core functions in Debug/Release/ASan, two TSan concurrency functions, strict-memory-safety compilation, both public consumers, five adapter functions in Debug/Release/ASan, all eight scale characterizations, both admitted-root scale cases, and 14 Python classifier tests. Trusted/parsed large-root work remains 105005/855011 and retention remains 2449081/5349115.

The aggregate lane again exits 2 / blocked. All 18 semantic ownership negatives pass. The 14 call sites include five compilations, four required ownership rejections, four compiler aborts (ContainerEscape, RootContainerEscape, LocalFunctionBorrow, RootOnlyEscape), and the rejected positive MethodBorrow. Swift 6.4.1 clears none of the five blockers. The four standalone minimized sources also have unchanged outcomes: two implicit forms abort, the explicit escape rejects, and the explicit local function compiles.

Private receipts are retained under Artifacts/Qualification/composition-swift-6.4.1/, including installer signature/provenance, minimal results, full lane receipt, and a hash-checked baseline comparison. No source change or baseline reduction was made.

Snapshot compiler comparison

The latest macOS snapshots listed by Swift.org at selection time on 2026-10-16 were tested from clean commit 95267eea3d4ab3c3c1553d4afcf89806fde8788e:

Snapshot Compiler identity Result
6.4 branch, 2026-10-14 6.4.4-dev; Swift 8998d49f3db27e7, LLVM aba857ce8cbfc26; assertions enabled Blocked, exit 2
main, 2026-10-11 6.5-dev; Swift c2b0f686cc0dfdb, LLVM e49d440e0fbb4aa; assertions enabled Blocked, exit 2

Both snapshots retain all five blockers:

Original probe 6.4 branch main
ContainerEscape SIGABRT SIGABRT
RootContainerEscape SIGABRT SIGABRT
RootOnlyEscape SIGABRT SIGABRT
LocalFunctionBorrow SIGABRT SIGABRT
MethodBorrow Rejected positive Rejected positive

All 18 semantic ownership negatives pass on both. Each full 14-call-site matrix contains five compilations, four required rejections, four aborts, and the rejected positive. The four unchanged standalone reductions also have unchanged outcomes: both implicit captures abort; explicit escaping capture rejects normally; explicit synchronous local function emits an object. All 32 public fixture hashes, expectations, and outcomes match the clean Swift 6.4 release control. There are 27 nonzero exits among those 32 probes per snapshot: 23 ordinary diagnostics and four SIGABRTs; expected diagnostic exits remain separate from successful compilation and compiler aborts.

The assertions-enabled traces stop earlier than the release ownership verifier: SILGenFunction::emitCaptures asserts “no address for captured var!”. The 6.4 branch source places that assertion in CaptureKind::ImmutableBox (source at the tested compiler revision).

The added python3 Scripts/ci.py --lane composition-compiler builds a fresh JSON module, runs the classifier tests, and preserves the existing 18-negative/14-call-site gate. Its five commands return zero for each snapshot; aggregation exits 2 for the known blockers and records runtime behavior as not_run. The original 16-command composition lane is unchanged. Library sources, manifest, fixtures, and classifier are unchanged from 864e033. Existing Python qualification tests (15) and classifier tests (14) pass.

Packages were signed by Swift Open Source, verified by macOS, hashed, and checked against every signed XAR data checksum. Main's first full extraction exhausted disk space before compiler execution. Its retained verified payload was then extracted with editor/debugger tools omitted; compiler and SwiftPM binaries were unchanged. That staging failure is recorded separately and is not a compiler result. The inherited SDKROOT for direct probes was the macOS 27.0 CLT SDK; Xcode preflight reports its macOS 27.2 SDK. Both meet the unchanged SDK 27 baseline. Temporary registrations and binaries were removed, with the default toolchain selection preserved.

Private selection, provenance, setup-attempt, source-comparison and per-case receipts are retained under Artifacts/Qualification/composition-snapshots/. These are compiler-only diagnostic comparisons, not release or runtime qualification.

Release hold

Keep this PR draft. Per the current owner instruction, merge, tag/release, and the Swift-OpenAPI pin update remain held. The downstream checkout remains clean at pin 507dbf9ad4b545a5d60d7d6acf6b814795ec3099.

See the compiler diagnosis and release qualification scope.

@ThorFuchs
ThorFuchs marked this pull request as draft October 15, 2026 23:59
@ThorFuchs

Copy link
Copy Markdown
Owner Author

Obsolete: 1.6.0 was released through #45 without this change, and the scope-bound root admission lane was blocked by compiler aborts. Revisit inside the composition track (#63) if still wanted. Closing during the 2026-11-09 open-PR review (maintainer-approved). Branch kept for provenance; source-bound qualification history is preserved.

@ThorFuchs ThorFuchs closed this Nov 9, 2026
@ThorFuchs
ThorFuchs deleted the codex/composition-release branch November 11, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant