Repository navigation
Upgrade kernel to ShenOSKernel 42.2 (shen-scheme 0.50 parity) - #29
Merged
Merged
Conversation
Replace the Tarver S42 lineage (s42-pristine-20260825) with the community ShenOSKernel 42.2 that upstream shen-scheme 0.50 ships (Shen-Language/shen-sources tag shen-42.2, commit 73507e0; ShenOSKernel-42.2.tar.gz SHA-256 1d022730...2678d8). kernel/klambda/*.kl, kernel/tests/, kernel/stlib/ (from lib/stlib/) and kernel/README.md are byte-identical copies of the release tarball. New: dict.kl, init.kl, stlib.kl, extension-namespaces.kl, extension-type-annotations.kl. Removed: backend.kl (Tarver's cl.* backend). The port adaptation and regenerated AOT modules follow in the next commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X718xocsFckMvso6EAKoXR
Adapt the loader to the community 42.2 kernel (#28): - boot: load the defun-only .kl set in shen-scheme 0.50's order, call shen.initialise, install AOT + native overrides, then run shen.x.programmable-pattern-matching.initialise, shen.x.namespaces.initialise and stlib.initialise (shen-scheme 0.50's init order). The standard library now boots from the precompiled stlib.kl; boot::load_stlib is removed. *version* is "42.2". - primitives: the native put/get/unput implement Tarver's pointer-list property store, so only install them over a kernel that defines shen.change-pointer-value; 42.2 keeps its dict.kl-based put/get. - klcompile: restore the four stlib.initialise-* defuns to the kernel known-slow skip set (large literal tables, run once at boot). - Regenerate crates/shen-rust/src/aot/kernel/ with scripts/codegen-kernel-aot.sh (Gate 6 audit OK); drop backend.rs, add dict/init/stlib/extension_namespaces/extension_type_annotations. - shenffi: embed the same file set and run the same post-boot initialisers in shen_boot_embedded. - Tests: (version) = "42.2"; regression test for the <-address/or AOT helper (Bifrost tuple-not-vector). - Docs: PROVENANCE (lineage choice, port-upgrade audit, S42 kept as history), stlib PROVENANCE, CHANGELOG, README, STATUS. Kernel tests: 143 passed, 0 failed (release). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X718xocsFckMvso6EAKoXR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the Tarver S42 kernel (
s42-pristine-20260825) wholesale with the community ShenOSKernel 42.2, the kernel upstream shen-scheme 0.50 ships (option (a) from #28). Source:Shen-Language/shen-sourcestagshen-42.2, commit73507e069fe147aefb728d632c4ce40bc6a7b314; tarballShenOSKernel-42.2.tar.gz, SHA-2561d02273003654d34ec020ae67cb214ecec410dee3350419ff807d82b652678d8.(version)is now"42.2".Changes
kernel/klambda/*.kl(23 files): addsdict.kl,init.kl,stlib.kl,extension-namespaces.kl,extension-type-annotations.kl; dropsbackend.kl.kernel/tests/(the 42.2 suite, 143 tests),kernel/stlib/andkernel/README.md.interp/boot.rs): follows shen-scheme 0.50's file order and init order:.klfiles, which now contain onlydefuns.shen.initialise.shen.x.programmable-pattern-matching.initialise, thenshen.x.namespaces.initialise, thenstlib.initialise.stlib.kl;boot::load_stlibis removed.primitives.rs):put/get/unputassume Tarver's pointer-list layout. They are now installed only when the kernel definesshen.change-pointer-value, so 42.2 uses its owndict.klversions. This also fixes the embedded CAS kernel in shenffi, whose dict layout the old overrides did not handle.value/or,<-address/orand<-vector/orstay installed unconditionally because klcompile emits calls to them. A regression test is added.stlib.initialise-*defuns are inKERNEL_SLOW_DEFUNS(left tree-walked).crates/shen-rust/src/aot/kernel/was rebuilt withscripts/codegen-kernel-aot.sh, andmod.rswas updated.(version)is now expected to be"42.2"; the<-address/orregression test is added; comments updated.kernel/klambda/PROVENANCE.mdrecords the lineage choice and the 42.0–42.2 port-upgrade audit, keeping S42 as history.kernel/stlib/PROVENANCE.md, README and STATUS are updated.CHANGELOG.mdis added.Verification
diff -rof the vendored files against the extracted tarball: clean. Staged blobs were checked with sha256.cargo build --release -j 2: OK.scripts/kernel-tests.sh:passed: 143, failed: 0.cargo test -j 2 --workspace --no-fail-fast: 238 passed, 0 failed, 1 ignored.cargo fmt --all -- --check: OK.cargo clippy --workspace --all-targets -- -D warnings: clean.scripts/kernel-aot-audit.sh: OK.eval -e):(version), arithmetic,append/reverse/map,@s, closures,trap-error, the(head [])message insidetrap-error,filter/arity,macroexpand [input+ number],read-from-string,make-string, tuples.scriptand(load F)on files with no trailing newline: identical output.read-file,read): identical output.*language*,hashvalues, closure printing, the top-level error prefix,strof a cons.go run . --impls shen-rust,shen-schemewith shen-scheme 0.50: 63 pass, 3 FAIL. None of the three is a shen-rust bug:version-expr-42: the golden is still"42"; both ports print42.2(Track Shen 0.50 / ShenOSKernel 42.2 support across all ports bifrost#26).stdin-eof-clean-exit: shen-scheme 0.50 fails; shen-rust passes.hush-file-write: shen-rust writes the file, which is the resolved behaviour; stock shen-scheme 0.50 does not.Remaining work / known failures
kernel-tests --debug/--debug-gcand the VM/JIT differential modes. README/STATUS lines that say "134/0 in every mode" refer to the older runs.rusttarget (tests/fib.shenfrom a 42.2 slice; binary size and startup indocs/targets.md), tracked in Retarget shaker and builders to Shen 0.50 / ShenOSKernel 42.2 yggdrasil#32.boot_from_kl_source(shaken slices) still runs onlyshen.initialise. Shaken builds must callboot::run_post_aot_initialisersthemselves if they need stlib types or macros.shen.x.features.initialiseis not called, as before: the port implementsshen.x.features.currentnatively. shen-scheme reports[shen/scheme]; shen-rust reports[shen.x/sha256-host].shen-rustwith no arguments still uses the old host-side REPL, which parses KL syntax and bypasses the kernel reader, so 42.1 source-form handlers do not run there.shen-rust repl,evalandscriptuse the kernel's own read loop.Closes #28
🤖 Generated with Claude Code
https://claude.ai/code/session_01X718xocsFckMvso6EAKoXR
Generated by Claude Code