Skip to content

Move Bifrost to ShenOSKernel 42.2 - #27

Merged
pyrex41 merged 2 commits into
mainfrom
kernel-42.2
Oct 11, 2026
Merged

pyrex41 merged 2 commits into
mainfrom
kernel-42.2

Conversation

@pyrex41

@pyrex41 pyrex41 commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Summary

Every port Bifrost drives now runs the community ShenOSKernel 42.2: Shen-Language/shen-sources tag shen-42.2, commit 73507e069fe147aefb728d632c4ce40bc6a7b314, SHA-256 1d02273003654d34ec020ae67cb214ecec410dee3350419ff807d82b652678d8. This is lineage option (a): 42.2 replaces Tarver S42.0 wholesale. This PR moves the corpus, adapters and docs to 42.2, adds cases for the 42.1/42.2 behaviour changes, and makes the kernel-split cases hard agreements again.

Port PRs:

Changes

Corpus

  • version-expr-42 is renamed version-expr-42.2 (golden 42.2); version-banner-contains now looks for 42.2.
  • error-message-head is a pinned golden again: head expects a non-empty list.
  • New cases/kernel-42.json:
    • lineread-eof-no-newline and read-eof-no-newline read from a file stream, not REPL stdin, because upstream 0.50's REPL hangs at EOF.
    • source-form-before-macros: a handler and a macro rule share the same head. The result shows the handler ran first and the macro then expanded its output.
    • namespace-externals-expression: (externals (fn-call)), a capability SKIP where namespaces aren't booted.
  • Integer precision is a documented divergence with a per-port bucket table: bigint-2pow53-plus-1 and bigint-2pow63-ordered.
    • Only shen-cl, shen-erl and shen-scheme are true bignums.
    • shen-c and shen-julia wrap at 2^63.
    • shen-rust, shen-swift and shen-truffle overflow to a double.
    • shen-go, ShenScript and shen-lua are IEEE doubles.
  • load-toplevel-echo is a hard agreement. Its doc said the normaliser drops the blank line before the run time: banner, but the code never did; it now does.

Harness

  • A BIFROST-SKIP: output line counts as a capability SKIP, the same as exit 3, since Shen has no portable exit.
  • A known_divergence case can carry a table pinning each port to its bucket; a port that changes bucket is a FAIL.
  • The normaliser drops JVM Picked up JAVA_TOOL_OPTIONS/_JAVA_OPTIONS/JDK_JAVA_OPTIONS: lines, so shen-truffle passes with a proxy-set JAVA_TOOL_OPTIONS.
  • Captured output is capped at 8 MB (upstream 0.50's REPL prints about 5 MB/s at EOF).
  • impls --versions reads the leading kernel token of the banner, and falls back to (version) for port-local banners such as shen-c's Shen-C 0.2.3.
  • evaluateCase is split into run and judgeCase.
  • New tests: version parsing, normaliser, skip marker, bucket table.

Adapters

  • kernel is 42.2 everywhere; shen-joy is bounded-42.2-subset.
  • shen-scheme:
    • Defaults to git-build of the pyrex41 fork (upstream v0.50 merged, plus the EOF and *hush* fixes), using the upstream CI steps: fetch-kernel, fetch-prebuilt, precompile-with-prebuilt, all. The old make all could not build from a fresh clone.
    • brew is documented as not a 42.2 route: homebrew-core has no shen-scheme formula, and the Shen-Language tap ships 0.17.
    • The note now describes 0.50's layout: petite.boot + scheme.boot + lib/shen-scheme/shen-scheme/runtime.so, overridable with $SHEN_SCHEME_HOME.
  • Notes updated for shen-julia (42.2 banner, ~5 s start-up), shen-swift (16 modules plus shen.initialise, ~0.5 s boot, 143/143, native launcher, --stdlib), shen-erl (no unzip), shen-cl (scripts/fetch-kernel.sh), shen-truffle (JDK 23+, JVM notice) and shen-c (boot sequence and known gaps).
  • shen-joy: the shake expectation is programs/joy-sum.shen → 32004000; tests/fib.shen is a capability SKIP.
  • shen-go v1.5.0 and shen-lua v0.11.0 / 0.11.0-1 pins are unchanged, with a TODO: no 42.2 releases exist yet. Use --ref kernel-42.2 until they do.
  • .gitignore covers shen-lua's .stlib cache; .gitattributes keeps the EOF fixtures byte-exact.

Docs

  • docs/matrix.md: kernel, capability SKIP, precision table, upstream-reference notes, known port gaps, normaliser and joy shake.
  • Also updated: docs/install.md, docs/cli.md, docs/port-layout.md, README.md.

Verification

  • go vet ./... && go test ./...: ok.
  • bifrost --impls shen-cl,shen-go,shen-erl,shen-lua,ShenScript,shen-scheme,shen-julia,shen-c,shen-rust,shen-swift,shen-truffle, with every port on kernel-42.2 and shen-scheme as the fork built from shake: add scheme (shen-scheme) target #9: 64 pass, 2 diverge (known), 6 FAIL.
    • 62 of 72 cases pass on every port.
    • namespace-externals-expression passes on shen-scheme and shen-rust and is SKIP elsewhere.
    • Both DIVERGE cases are the integer-precision buckets, and every port is in its tabled bucket.
case FAILing port cause (already present on the port's S42.0 main branch)
float-add-imprecise shen-c prints 0.3
version-banner-contains shen-c banner is Shen-C 0.2.3
bounded-tail-sum-file shen-c script mode echoes toplevel values (not quiet-load)
source-form-before-macros shen-c same script echo; the value itself is correct
integer-float-integral shen-julia native integer? is false for 4.0
hash-agrees-with-equality shen-julia hash 1 ≠ hash 1.0
  • Upstream reference: BIFROST_SHEN_SCHEME=<shen-scheme 0.50> bifrost --impls shen-scheme,shen-cl,shen-go,shen-rust gives 68 pass, 2 diverge, 2 FAIL. The two FAILs are exactly hush-file-write (upstream writes 0 bytes under -q) and stdin-eof-clean-exit (the upstream REPL loops). Both are intended and documented.
  • bifrost impls --versions: all 11 installed ports report 42.2, including shen-c through the (version) fallback, and upstream 0.50.
  • bifrost --heavy --only yggdrasil-shake-parity with a Yggdrasil kernel-42.2 build (shen-julia skipped as a host by default): kernel.kl + manifest are byte-identical across shen-cl, shen-go, shen-erl, shen-rust, shen-lua, ShenScript, shen-scheme, shen-swift and shen-truffle. shen-c FAILs: as a host it loads Yggdrasil but writes no kernel.kl.

Remaining work / known failures

  • New shen-go and shen-lua releases on 42.2 (tag + rock), then move the pins.
  • shen-c: standard --version banner, quiet script mode, float printing, and the Yggdrasil host producing no kernel.kl.
  • shen-julia: integer? on integral floats, and hash agreeing with =.
  • Merge the port PRs; until then, git-build installs need --ref kernel-42.2.
  • shen-joy launcher not built here; shen-swift not pushed yet.
  • --heavy is not fully green while shen-c is included.

Refs #26

🤖 Generated with Claude Code

https://claude.ai/code/session_01X718xocsFckMvso6EAKoXR


Generated by Claude Code

Every port now runs the community ShenOSKernel 42.2 (shen-sources tag
shen-42.2, commit 73507e06), adopted wholesale in place of Tarver S42.0
(#26).

Corpus:
- version-expr-42 becomes version-expr-42.2 (golden 42.2); the banner
  case looks for 42.2.
- error-message-head is a pinned golden again ('head expects a non-empty
  list'), now that no port mixes kernels.
- New cases/kernel-42.json: read and lineread on a file that ends
  without a newline, source-form handlers running before macros, and
  namespace externals given an expression.
- Integer precision is a documented divergence with per-port buckets
  (2^53+1 and 2^63 overflow).
- load-toplevel-echo is a hard agreement: the normaliser now drops the
  blank line before the run-time banner, as its doc already said.

Harness:
- A BIFROST-SKIP: line marks a capability SKIP, like exit 3, for
  programs that probe an optional facility.
- A known divergence may carry a table that pins each port's bucket.
- The normaliser drops the JVM 'Picked up JAVA_TOOL_OPTIONS' notice.
- Captured output is capped at 8 MB (upstream 0.50 loops at REPL EOF).
- impls --versions reads the banner's leading kernel token and falls
  back to (version) for port-local banners such as shen-c's.

Adapters: kernel 42.2 everywhere; shen-scheme defaults to a git-build
of the fork on 0.50 with the upstream CI build steps; stale notes on
boot files, start-up, fetch scripts and pins updated. The shen-go and
shen-lua pins are unchanged until 42.2 releases exist (TODO in notes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X718xocsFckMvso6EAKoXR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X718xocsFckMvso6EAKoXR
@pyrex41
pyrex41 marked this pull request as ready for review October 11, 2026 18:15
@pyrex41
pyrex41 merged commit b0dee04 into main Oct 11, 2026
14 checks passed
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.

2 participants