Skip to content

Move the runtime overlay to Crystal 1.22.3 - #4

Merged
crimson-knight merged 1 commit into
mainfrom
feature/runtime-overlay-crystal-1.22.3
Nov 24, 2026
Merged

crimson-knight merged 1 commit into
mainfrom
feature/runtime-overlay-crystal-1.22.3

Conversation

@crimson-knight

Copy link
Copy Markdown
Member

The agent-crystal tap's move to 1.22.3-incremental-1 (crimson-knight/homebrew-agent-crystal#23) fails Formula CI at the public SDK step: this overlay's gc/boehm.cr is the Crystal 1.21 copy, and 1.22.3's crystal/system/unix/pthread_condition_variable.cr calls GC.syscall, which that copy does not define (undefined method 'syscall' for GC:Module).

What changed

  • runtime_overlay/gc/boehm.cr, fiber.cr and crystal/system/thread.cr are now crimson-knight/crystal v1.22.3-incremental-1 (commit 8ccce497) plus exactly the changes the 1.21 overlay made on top of its base 9c1e8ec6:
    • GC.malloc, GC.malloc_atomic, GC.realloc: record into Fiber::AllocationTally after 1.22.3's out-of-memory checks.
    • fiber.cr: the fiber/allocation_tally require and HOOK_LAYER, the Fiber.inactive live-list hook, the main-fiber thread_started hook.
    • crystal/system/thread.cr: the current_fiber= switch-out hook.
    • fiber/allocation_tally.cr is unchanged.
  • gc/boehm.cr stops at compile time with a message naming the compiler version when a compiler older than 1.22.3 reads it. Commit 58c20acf stays the Crystal 1.21 overlay (the tap's 1.21.0-incremental-10 lock pins it).
  • runtime_overlay/manifest.json base commit and hashes, PACKAGE_PINS.json, README, shard.yml (crystal: ">= 1.22.3, < 2.0.0"), and a new CHANGELOG.md.

The memory_budget-only diffs (overlay vs 9c1e8ec6) were isolated first; overlay vs stock 1.21.0 also carries the fork's own WASM changes, which v1.22.3-incremental-1 already has.

Checks

  • Local: ruby -Itest suite 143 runs, 0 failures; docs corpus verify and controls pass.
  • Installed 1.22.3 compiler: the tap's public SDK qualification on m4-mini-02 and Formula CI on both runners (results in comments below).

The runtime overlay's gc/boehm.cr, fiber.cr and crystal/system/thread.cr
were copies of the Crystal 1.21 runtime (crimson-knight/crystal 9c1e8ec6).
Crystal 1.22.3 calls GC.syscall from
crystal/system/unix/pthread_condition_variable.cr, which the 1.21 copy of
gc/boehm.cr does not define, so specs built against an installed 1.22.3
standard library stopped with "undefined method 'syscall' for GC:Module".

Each overlay file is now the v1.22.3-incremental-1 source (commit
8ccce497524ef3e35fdc48c487854ab0743b0541) with exactly the changes the 1.21
overlay made on top of 9c1e8ec6: the allocation tally records in GC.malloc,
GC.malloc_atomic and GC.realloc (placed after 1.22.3's out-of-memory
checks), the Fiber.inactive live-list hook, the main-fiber thread_started
hook, the fiber/allocation_tally require, and the Thread#current_fiber=
switch-out hook. fiber/allocation_tally.cr is unchanged.

gc/boehm.cr stops at compile time with a message naming the compiler
version when a compiler older than 1.22.3 reads it; commit
58c20ac remains the Crystal 1.21 overlay.
shard.yml declares crystal >= 1.22.3. The manifest's base commit, overlay
hashes, package pins, README and a new CHANGELOG record the move.
@crimson-knight

Copy link
Copy Markdown
Member Author

Grant source package controls (macos-26) is red on main too, for a runner reason. The job stops before reading anything this PR changes: the macos-26 image now ships Python 3.15.2, which has no reviewed entry in tools/grant_compile_acceptance/PUBLICATION_PINS.v101.json source_python_profiles ("Observed source-test Python needs exact profile review"). A workflow_dispatch of the same workflow on main (6aaf4f9), run 45327088029, fails the same way; ubuntu-24.04 (Python 3.12.3) passes on both. This PR does not touch tools/grant_compile_acceptance/. Reviewing the new interpreter is a separate change.

Docs corpus and portable fixtures (143 runs) pass.

@crimson-knight

Copy link
Copy Markdown
Member Author

Installed 1.22.3 compiler, m4-mini-02 (macOS 27.2.1) through cluster-pool dispatch: agent-crystal 1.22.3-incremental-1 built from source from tap PR 23 head bfe69f4d (467 s). The tap's public SDK qualification, with its lock pinned to this PR's head d7db826, passed: GREEN compiler output, 39/39 examples default and 39/39 with -Dwithout_mt, installed bundle 68 payload files + manifest, tutorial exits 0 normally and 1 with the injected regression. (The job-local lock used this Mac's aarch64-apple-macosx27.2 target string; CI runners keep macosx26.7.)

Controls on the same keg: the 58c20ac overlay reproduces undefined method 'syscall' for GC:Module; this overlay type-checks. On a 1.21.0 compiler the 58c20ac overlay type-checks and this one stops with "memory_budget runtime_overlay requires Crystal 1.22.3 or newer; this compiler is 1.21.0 ...".

@crimson-knight
crimson-knight merged commit 1bcad58 into main Nov 24, 2026
5 of 6 checks passed
@crimson-knight
crimson-knight deleted the feature/runtime-overlay-crystal-1.22.3 branch November 24, 2026 04:45
crimson-knight pushed a commit to crimson-knight/homebrew-agent-crystal that referenced this pull request Nov 24, 2026
Formula CI stopped at "Exercise public SDK with the ordinary installed
compiler" on both runners: memory_budget 58c20acf copies its Crystal 1.21
runtime overlay over the installed standard library, and 1.22.3's
crystal/system/unix/pthread_condition_variable.cr calls GC.syscall, which
that overlay's gc/boehm.cr does not define.

amberframework/memory_budget#4 moved the overlay's gc/boehm.cr, fiber.cr
and crystal/system/thread.cr to crimson-knight/crystal v1.22.3-incremental-1
with the same allocation tally hooks, and added CHANGELOG.md. The lock's sdk
block now pins merge commit 1bcad5894e50c337cce8d1f6a98af0eeeb33e1f6: codeload
archive 8,372,074 bytes, sha256
f25334e5ee275090ef009ba565eb0c973ddb4e2df8a12f194cc492226acda4c4, 141 files,
each checked against the commit's Git tree (mode and blob). The installed
bundle stays at 68 payload files.

Lock, CPU diagnostic LOCK_SHA256 and Formula CI digests re-chained. The
formula and the lock's alpha block are unchanged.
crimson-knight pushed a commit to crimson-knight/homebrew-agent-crystal that referenced this pull request Nov 24, 2026
Formula CI stopped at "Exercise public SDK with the ordinary installed
compiler" on both runners: memory_budget 58c20acf copies its Crystal 1.21
runtime overlay over the installed standard library, and 1.22.3's
crystal/system/unix/pthread_condition_variable.cr calls GC.syscall, which
that overlay's gc/boehm.cr does not define.

amberframework/memory_budget#4 moved the overlay's gc/boehm.cr, fiber.cr
and crystal/system/thread.cr to crimson-knight/crystal v1.22.3-incremental-1
with the same allocation tally hooks, and added CHANGELOG.md. The lock's sdk
block now pins merge commit 1bcad5894e50c337cce8d1f6a98af0eeeb33e1f6: codeload
archive 8,372,074 bytes, sha256
f25334e5ee275090ef009ba565eb0c973ddb4e2df8a12f194cc492226acda4c4, 141 files,
each checked against the commit's Git tree (mode and blob). The installed
bundle stays at 68 payload files.

Lock, CPU diagnostic LOCK_SHA256 and Formula CI digests re-chained. The
formula and the lock's alpha block are unchanged.
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