From e250d29491f12f8d58243ba261b972bf00495d0c Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 08:59:41 +0000 Subject: [PATCH 1/6] chore: re-mint the package uuid as UUIDv8 Project.toml's uuid was a UUIDv5 derived at mint time. ADR-008 amendment D320 re-mints an unregistered Julia package's own uuid as version 8; the new id comes from the estate generator (standards' scripts/uuid-v8.js, profile T), run once, and is the same convention EpistemicTypes.jl used. The old UUIDv5 literal is in git history and is not spelled out in the tree, because the strict UUIDv8 scanner reads every hyphenated literal, comments included. The wiring doc named the old id in two places for a Hyperpolymath.jl patch that was never applied; it now names the new one. A code search of the default branches visible on 2026-11-14 found no consumer of the old id. check-uuid-v8.sh --strict flagged four files for this id before this change and none after. It still flags CLAUDE.md, which carries rsr-template-repo's uuid (template residue, not changed here). Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0136P7ZoXueEiNpcpgdeBR67 --- CHANGELOG.adoc | 8 ++++---- Project.toml | 10 +++++++--- docs/ecosystem/HYPERPOLYMATH-WIRING.adoc | 9 ++++++--- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 5439a97..32114dc 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -10,10 +10,10 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning]. ==== Added -* Julia package `CoprocessorRuntime` (uuid - `54e4c7d3-acab-5c3f-ab09-6ee0d181492b`): session contracts, tropical - resource grades, echo residues, epistemic receipts, CNO/OND claims, - choreographic projection with `kcut = :open`, and `HubCeilingRefusal`. +* Julia package `CoprocessorRuntime` (uuid in `Project.toml`): session + contracts, tropical resource grades, echo residues, epistemic receipts, + CNO/OND claims, choreographic projection with `kcut = :open`, and + `HubCeilingRefusal`. * `docs/theory/TYPE-INFORMED-BACKENDS.adoc` — what was taken from the `-type` repos and what was deliberately not forced. * `docs/ecosystem/HYPERPOLYMATH-WIRING.adoc` — exact sibling-repo patches diff --git a/Project.toml b/Project.toml index d480432..28755f8 100644 --- a/Project.toml +++ b/Project.toml @@ -2,11 +2,15 @@ # minted by: arena/01a0de6b-coprocessorruntime-jl (2026) # owner: hyperpolymath # -# uuid is UUIDv5(repo-uuid, "julia:CoprocessorRuntime.jl") where -# repo-uuid = UUIDv5(URL namespace, "github.com/hyperpolymath/CoprocessorRuntime.jl") +# uuid below is the UUIDv8 re-mint of the package identity (ADR-008 +# amendment D320: an unregistered Julia package's own uuid re-mints as +# version 8), minted with the estate generator (standards' +# scripts/uuid-v8.js, profile T) on 2026-11-14. It supersedes the mint-time +# UUIDv5 literal (in git history; not spelled out here because the strict +# UUIDv8 scanner reads every hyphenated literal, comments included). name = "CoprocessorRuntime" -uuid = "54e4c7d3-acab-5c3f-ab09-6ee0d181492b" +uuid = "01a1d947-ed2c-8570-92fa-1871a655abc1" description = "Coprocessor support base library for Julia — session contracts, tropical grades, echo residues, epistemic receipts, CNO/OND claims. Not a kernel runtime." authors = ["Jonathan D.A. Jewell "] license = "MPL-2.0" diff --git a/docs/ecosystem/HYPERPOLYMATH-WIRING.adoc b/docs/ecosystem/HYPERPOLYMATH-WIRING.adoc index 35a4ff3..b5df8fa 100644 --- a/docs/ecosystem/HYPERPOLYMATH-WIRING.adoc +++ b/docs/ecosystem/HYPERPOLYMATH-WIRING.adoc @@ -12,15 +12,18 @@ Hyperpolymath.jl is the metapackage. It already re-exports the metal layer (`LowLevel`, `SiliconCore`, `AcceleratorGate`, `QuantumCircuit`, `HardwareResilience`, `FirmwareAudit`) and does **not** yet name this package. -Generate a fresh UUID-compat line using this package's published uuid -`54e4c7d3-acab-5c3f-ab09-6ee0d181492b`. +Generate a fresh UUID-compat line using this package's uuid +`01a1d947-ed2c-8570-92fa-1871a655abc1`. It is the UUIDv8 re-mint of the +package identity (ADR-008 amendment D320); the mint-time UUIDv5 is in git +history. A code search of the default branches visible on 2026-11-14 found +no consumer of the old id; the patches below were never applied. === `Project.toml` Add to `[deps]`: ---- -CoprocessorRuntime = "54e4c7d3-acab-5c3f-ab09-6ee0d181492b" +CoprocessorRuntime = "01a1d947-ed2c-8570-92fa-1871a655abc1" ---- Add to `[compat]`: From f258f927d86b69f2fe474d2915c38de267a93d30 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 09:00:22 +0000 Subject: [PATCH 2/6] fix: export the WarrantKind instances the documented API uses README.adoc, docs/ecosystem/HYPERPOLYMATH-WIRING.adoc and the receipts tests all write `warrant=WarrantOnly` unqualified, but the module exported only the enum type WarrantKind and not its instances Knowledge, Belief, WarrantOnly and Unsound. Pkg.test() therefore failed on main with `UndefVarError: WarrantOnly not defined` (42 passed, 0 failed, 1 errored), the same failure the Test + Aqua jobs show on both Julia versions in CI. Export the instances at the source, in the module's export list, rather than qualifying them at each call site: the documented usage is the unqualified one, and the extension and sibling packages that issue receipts (FirmwareAudit issues WarrantOnly receipts) will write it the same way. Verified locally with Julia 1.11.5: Pkg.test() passes 46 of 46, Aqua included, against 42 passed and 1 errored before. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0136P7ZoXueEiNpcpgdeBR67 --- CHANGELOG.adoc | 6 ++++++ src/CoprocessorRuntime.jl | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 32114dc..35093d2 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -31,6 +31,12 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning]. * Reverted `haskell-actions/setup` v2.12.1 → v2.12.0 to match the lock. * Hypatia caller now passes `secrets: inherit`. This does not cure a hypatia@HEAD build failure (estate-wide after hypatia#863). +* `Knowledge`, `Belief`, `WarrantOnly` and `Unsound` are now exported. The + README, the wiring doc and the receipts tests all write + `warrant=WarrantOnly` unqualified, but only the enum type `WarrantKind` + was exported, so `Pkg.test()` failed with + `UndefVarError: WarrantOnly not defined` (42 passed, 1 errored; now 46 + of 46 pass). ==== Inherited from template diff --git a/src/CoprocessorRuntime.jl b/src/CoprocessorRuntime.jl index 5dc609e..53c4254 100644 --- a/src/CoprocessorRuntime.jl +++ b/src/CoprocessorRuntime.jl @@ -43,7 +43,8 @@ export Role, HostRole, DeviceRole, Session, open_session, close_session!, isopen, ResourceGrade, tropical_alt, tropical_seq, dominates, TransferMap, EchoResidue, injective_transfer, collapsing_transfer, - WarrantKind, LaunchReceipt, issue_receipt, host_may_claim, + WarrantKind, Knowledge, Belief, WarrantOnly, Unsound, + LaunchReceipt, issue_receipt, host_may_claim, CNOClaim, ONDClaim, reset_session!, observe_null, InverseMeta, inversion_of, irreversible, Endpoint, LaunchPlan, launch_plan, project, projected_grade, From 0954217f5832e625d3666f03fa27567a378f8711 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 09:06:17 +0000 Subject: [PATCH 3/6] feat: AcceleratorGateExt maps an AcceleratorGate backend to a kind Add the package extension the wiring doc planned: with AcceleratorGate.jl loaded, `coprocessor_kind(backend)` returns the CoprocessorKind a session is opened against. AcceleratorGate stays a weak dependency ([weakdeps], compat 0.1), so CoprocessorRuntime keeps no hard dependency on it; without the extension the function has no methods and a call is a MethodError, never a silent default. The mapping was checked against AcceleratorGate's real backend types (9b89193), not the wiring doc's suggestion, which omitted four of its fifteen backends. PPUBackend, MathBackend, VPUBackend and CryptoBackend map to UnknownKind because CoprocessorRuntime has no kind for them; adding one is an API change here, not a guess in the extension. A backend AcceleratorGate adds later gets the same default. Tests live in test/ext with their own environment, because AcceleratorGate is not in General: it is fetched by URL from a pinned commit through [sources], which needs Julia 1.11. test/runtests.jl runs that environment in a subprocess so the main test environment still resolves on 1.9, and records a visible Broken test (never a silent skip) on older Julia or when COPROCESSORRUNTIME_SKIP_EXT_TESTS=1. The tests state the mapping a second time, require it to cover every AbstractBackend subtype so a new backend fails the test until it is given a row, and were checked to fail when a mapping is wrong (CUDA mapped to the CPU). Verified locally with Julia 1.11.5: Pkg.test() passes 47 of 47, Aqua included. Not verified: Julia 1.9 and 1.10 (the extension test is Broken there by design). JuliaFormatter 2 accepts the new files; src/ CoprocessorRuntime.jl already failed it on main (its export block) and is left as it was. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0136P7ZoXueEiNpcpgdeBR67 --- .gitignore | 1 + CHANGELOG.adoc | 7 +++ Project.toml | 7 +++ docs/ecosystem/HYPERPOLYMATH-WIRING.adoc | 24 ++++++-- ext/AcceleratorGateExt.jl | 77 ++++++++++++++++++++++++ src/CoprocessorRuntime.jl | 2 +- src/Kinds.jl | 15 +++++ test/ext/Project.toml | 17 ++++++ test/ext/runtests.jl | 64 ++++++++++++++++++++ test/runtests.jl | 28 +++++++++ 10 files changed, 235 insertions(+), 7 deletions(-) create mode 100644 ext/AcceleratorGateExt.jl create mode 100644 test/ext/Project.toml create mode 100644 test/ext/runtests.jl diff --git a/.gitignore b/.gitignore index afbe851..6ac87cc 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ erl_crash.dump *.jl.cov *.jl.mem /Manifest.toml +/test/ext/Manifest.toml # /lib/bs/ diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 35093d2..9233518 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -14,6 +14,13 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning]. contracts, tropical resource grades, echo residues, epistemic receipts, CNO/OND claims, choreographic projection with `kcut = :open`, and `HubCeilingRefusal`. +* Package extension `AcceleratorGateExt` and `coprocessor_kind`: maps an + AcceleratorGate.jl `AbstractBackend` onto the `CoprocessorKind` a session + is opened against. `PPUBackend`, `MathBackend`, `VPUBackend` and + `CryptoBackend` map to `UnknownKind` because there is no kind for them + here. AcceleratorGate stays a weak dependency (`[weakdeps]`, compat + `0.1`). The extension is tested in `test/ext` against a pinned + AcceleratorGate commit, which needs Julia 1.11 (Broken on older Julia). * `docs/theory/TYPE-INFORMED-BACKENDS.adoc` — what was taken from the `-type` repos and what was deliberately not forced. * `docs/ecosystem/HYPERPOLYMATH-WIRING.adoc` — exact sibling-repo patches diff --git a/Project.toml b/Project.toml index 28755f8..9f34f91 100644 --- a/Project.toml +++ b/Project.toml @@ -18,6 +18,12 @@ version = "0.1.0" [deps] +[weakdeps] +AcceleratorGate = "59f742c7-270d-4a76-95d4-a853ae16cc71" + +[extensions] +AcceleratorGateExt = "AcceleratorGate" + [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" @@ -27,5 +33,6 @@ test = ["Test", "Aqua"] [compat] julia = "1.9" +AcceleratorGate = "0.1" Test = "1.9" Aqua = "0.8" diff --git a/docs/ecosystem/HYPERPOLYMATH-WIRING.adoc b/docs/ecosystem/HYPERPOLYMATH-WIRING.adoc index b5df8fa..be8328f 100644 --- a/docs/ecosystem/HYPERPOLYMATH-WIRING.adoc +++ b/docs/ecosystem/HYPERPOLYMATH-WIRING.adoc @@ -72,13 +72,15 @@ FirmwareAudit.jl — firmware attestation as an epistemic warrant source == AcceleratorGate.jl -No hard dependency either way. Optional later: a package extension -`AcceleratorGateExt` in *this* repo mapping `AbstractBackend` → -`CoprocessorKind`. Not in v0.1: AcceleratorGate backends are env-flag -stubs, and a forced extension would look like integration that is not -there. +No hard dependency either way. The package extension `AcceleratorGateExt` +(`ext/AcceleratorGateExt.jl`, in *this* repo, loaded when both packages are) +adds the methods of `coprocessor_kind`, mapping `AbstractBackend` → +`CoprocessorKind`, so a session can be opened against the kind a backend +selection produced. AcceleratorGate backends are env-flag selections, so the +mapping records a *kind*; it does not detect a device or run anything. -Suggested mapping when the extension is written: +The mapping, which `test/ext/runtests.jl` states a second time and checks +against every `AbstractBackend` subtype: ---- JuliaBackend / RustBackend / ZigBackend → CPUKind @@ -88,8 +90,18 @@ NPUBackend → NPUKind FPGABackend → FPGAKind QPUBackend → QPUKind DSPBackend → DSPKind +PPUBackend / MathBackend / VPUBackend / CryptoBackend → UnknownKind ---- +The last row is a decision: CoprocessorRuntime has no kind for those four +backends, and adding one is an API change here, not a guess in the extension. +A backend AcceleratorGate adds later makes the extension's test fail until it +is given a row. + +AcceleratorGate is not in the General registry, so the extension's tests fetch +it by URL from a pinned commit (`test/ext/Project.toml`, `[sources]`), which +needs Julia 1.11. On older Julia the test is recorded as Broken, not dropped. + == EchoTypes.jl / EpistemicTypes.jl Optional, not required. diff --git a/ext/AcceleratorGateExt.jl b/ext/AcceleratorGateExt.jl new file mode 100644 index 0000000..a808655 --- /dev/null +++ b/ext/AcceleratorGateExt.jl @@ -0,0 +1,77 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) + +""" + AcceleratorGateExt + +Package extension: maps an AcceleratorGate.jl `AbstractBackend` onto the +`CoprocessorKind` a CoprocessorRuntime session is opened against. + +It records which *kind* a backend is. It does not select a backend, check that +a device exists, or run anything: AcceleratorGate's backends are env-flag +selections, and this mapping claims no more than that. + +Four AcceleratorGate backends have no kind in CoprocessorRuntime and map to +`UnknownKind`: `PPUBackend`, `MathBackend`, `VPUBackend`, `CryptoBackend`. +Adding a kind for one of them is an API change to CoprocessorRuntime, not a +guess to make here. +""" +module AcceleratorGateExt + +import CoprocessorRuntime: + coprocessor_kind, + CPUKind, + GPUKind, + NPUKind, + TPUKind, + FPGAKind, + QPUKind, + DSPKind, + UnknownKind +import AcceleratorGate: + AbstractBackend, + JuliaBackend, + RustBackend, + ZigBackend, + CUDABackend, + ROCmBackend, + MetalBackend, + TPUBackend, + NPUBackend, + DSPBackend, + FPGABackend, + QPUBackend, + PPUBackend, + MathBackend, + VPUBackend, + CryptoBackend + +# Host-language implementations run on the CPU. +coprocessor_kind(::JuliaBackend) = CPUKind() +coprocessor_kind(::RustBackend) = CPUKind() +coprocessor_kind(::ZigBackend) = CPUKind() + +# GPU vendors. +coprocessor_kind(::CUDABackend) = GPUKind() +coprocessor_kind(::ROCmBackend) = GPUKind() +coprocessor_kind(::MetalBackend) = GPUKind() + +# Coprocessor families CoprocessorRuntime has a kind for. +coprocessor_kind(::TPUBackend) = TPUKind() +coprocessor_kind(::NPUBackend) = NPUKind() +coprocessor_kind(::FPGABackend) = FPGAKind() +coprocessor_kind(::QPUBackend) = QPUKind() +coprocessor_kind(::DSPBackend) = DSPKind() + +# Coprocessor families CoprocessorRuntime has no kind for: named, not guessed. +coprocessor_kind(::PPUBackend) = UnknownKind() +coprocessor_kind(::MathBackend) = UnknownKind() +coprocessor_kind(::VPUBackend) = UnknownKind() +coprocessor_kind(::CryptoBackend) = UnknownKind() + +# A backend type AcceleratorGate adds later: total, and honest about it. The +# extension's tests fail when a backend subtype is missing from the table +# above, so a new backend gets a mapping decision instead of this default. +coprocessor_kind(::AbstractBackend) = UnknownKind() + +end # module AcceleratorGateExt diff --git a/src/CoprocessorRuntime.jl b/src/CoprocessorRuntime.jl index 53c4254..ae57065 100644 --- a/src/CoprocessorRuntime.jl +++ b/src/CoprocessorRuntime.jl @@ -49,7 +49,7 @@ export Role, HostRole, DeviceRole, InverseMeta, inversion_of, irreversible, Endpoint, LaunchPlan, launch_plan, project, projected_grade, universal_hub_allowed, HubCeilingRefusal, - kind_label + kind_label, coprocessor_kind include("Kinds.jl") include("Grades.jl") diff --git a/src/Kinds.jl b/src/Kinds.jl index 47af34d..71284d7 100644 --- a/src/Kinds.jl +++ b/src/Kinds.jl @@ -37,3 +37,18 @@ kind_label(::QPUKind) = :qpu kind_label(::DSPKind) = :dsp kind_label(::UnknownKind) = :unknown kind_label(::CoprocessorKind) = :unknown + +""" + coprocessor_kind(backend) -> CoprocessorKind + +The [`CoprocessorKind`](@ref) that an AcceleratorGate.jl `AbstractBackend` +names, so a session can be opened against the kind a backend selection +produced: `open_session(coprocessor_kind(backend))`. + +This function has no methods until AcceleratorGate.jl is loaded. The methods +live in the package extension `AcceleratorGateExt`, so CoprocessorRuntime keeps +no hard dependency on AcceleratorGate (selection stays there; this package only +records what a launch may claim). Calling it without AcceleratorGate loaded is +a `MethodError` on purpose, never a silent default. +""" +function coprocessor_kind end diff --git a/test/ext/Project.toml b/test/ext/Project.toml new file mode 100644 index 0000000..a1f1510 --- /dev/null +++ b/test/ext/Project.toml @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: MPL-2.0 +# Test environment for the AcceleratorGateExt package extension. AcceleratorGate +# is not in the General registry, so it is fetched by URL from a pinned commit +# through [sources], which needs Julia 1.11. test/runtests.jl runs this +# environment in a subprocess and records a visible Broken test on older Julia. +[deps] +AcceleratorGate = "59f742c7-270d-4a76-95d4-a853ae16cc71" +CoprocessorRuntime = "01a1d947-ed2c-8570-92fa-1871a655abc1" +InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +AcceleratorGate = {url = "https://github.com/hyperpolymath/AcceleratorGate.jl", rev = "9b8919326ef3b7cd31424e24041325cc3689b182"} +CoprocessorRuntime = {path = "../.."} + +[compat] +julia = "1.11" diff --git a/test/ext/runtests.jl b/test/ext/runtests.jl new file mode 100644 index 0000000..33778ca --- /dev/null +++ b/test/ext/runtests.jl @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) + +using Test +using InteractiveUtils: subtypes +using CoprocessorRuntime +using AcceleratorGate + +# The mapping the extension must implement. It is written out here, in full, so +# the test is a second statement of the table and not a restatement of the code. +const EXPECTED = Dict{DataType,DataType}( + JuliaBackend => CPUKind, + RustBackend => CPUKind, + ZigBackend => CPUKind, + CUDABackend => GPUKind, + ROCmBackend => GPUKind, + MetalBackend => GPUKind, + TPUBackend => TPUKind, + NPUBackend => NPUKind, + FPGABackend => FPGAKind, + QPUBackend => QPUKind, + DSPBackend => DSPKind, + PPUBackend => UnknownKind, + MathBackend => UnknownKind, + VPUBackend => UnknownKind, + CryptoBackend => UnknownKind, +) + +# Backends take no argument, a library path, or a device number. +make(::Type{JuliaBackend}) = JuliaBackend() +make(T::Type{<:Union{RustBackend,ZigBackend}}) = T("") +make(T::Type{<:AbstractBackend}) = T(0) + +@testset "AcceleratorGateExt" begin + @testset "the extension is loaded" begin + @test Base.get_extension(CoprocessorRuntime, :AcceleratorGateExt) !== nothing + @test hasmethod(coprocessor_kind, Tuple{JuliaBackend}) + end + + @testset "the table covers every AcceleratorGate backend" begin + # A backend AcceleratorGate adds later must get a mapping decision here, + # not fall through to the extension's UnknownKind default unseen. + @test Set(subtypes(AbstractBackend)) == Set(keys(EXPECTED)) + end + + @testset "each backend maps to its kind" begin + for (backend, kind) in EXPECTED + @test coprocessor_kind(make(backend)) isa kind + end + end + + @testset "kinds the runtime does not model are Unknown, not guessed" begin + for T in (PPUBackend, MathBackend, VPUBackend, CryptoBackend) + @test kind_label(coprocessor_kind(make(T))) === :unknown + end + end + + @testset "a mapped kind opens a session" begin + s = open_session(coprocessor_kind(CUDABackend(0))) + @test isopen(s) + close_session!(s) + @test !isopen(s) + end +end diff --git a/test/runtests.jl b/test/runtests.jl index a418e76..c0a790b 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -14,4 +14,32 @@ using CoprocessorRuntime include(joinpath(@__DIR__, "cases", "sessions.jl")) include(joinpath(@__DIR__, "cases", "receipts.jl")) include(joinpath(@__DIR__, "cases", "choreography.jl")) + + # AcceleratorGate is not in General, so the extension is tested in its own + # environment (test/ext) that fetches it by URL through [sources], which + # needs Julia 1.11. It runs in a subprocess so the main test environment + # stays resolvable on older Julia. A run that cannot happen is recorded as + # a visible Broken test, never dropped silently. + @testset "AcceleratorGateExt" begin + ext_dir = joinpath(@__DIR__, "ext") + if get(ENV, "COPROCESSORRUNTIME_SKIP_EXT_TESTS", "") == "1" + @info "AcceleratorGateExt tests skipped: COPROCESSORRUNTIME_SKIP_EXT_TESTS=1" + @test_skip false + elseif VERSION < v"1.11" + @info "AcceleratorGateExt tests need Julia 1.11 ([sources]); running Julia $VERSION" + @test_skip false + else + script = "import Pkg; Pkg.instantiate(); include(joinpath(\"$ext_dir\", \"runtests.jl\"))" + cmd = `$(Base.julia_cmd()) --startup-file=no --project=$ext_dir -e $script` + # Pkg.test sets JULIA_LOAD_PATH for the sandbox it makes; the + # subprocess must resolve its own environment, not inherit that one. + @test success( + pipeline( + addenv(cmd, "JULIA_LOAD_PATH" => nothing); + stdout = stdout, + stderr = stderr, + ), + ) + end + end end From 58f75225bed23ccdda26904d4cd5396ad48d30c0 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 09:08:30 +0000 Subject: [PATCH 4/6] ci: allow the ext/ root directory Julia package extensions require The estate-rules root-shape gate failed on this PR with one violation more than on main: the new top-level ext/ directory. Julia loads a package extension from ext/ at the package root, so it cannot move into a subdirectory; the gate's remedy for that case is a justified entry in .machine_readable/root-allow.txt. Add it as optional ('?', like benches/ and examples/): only a package that declares an [extensions] entry has the directory, so it is not required everywhere. Checked by running scripts/check-root-shape.sh. Without this entry it reports the four violations CI showed (the deed filename, Project.toml, ext/, test/); with it, the three that are already on main. estate-rules therefore stays red on this branch for those three and for the absent rsr-template-repo_chora.deed; this change removes only the one this PR added. The root allowlist is the template's and lists tests/ and the template's deed filename, which do not fit a Julia package; that is older than this PR and is not changed here. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0136P7ZoXueEiNpcpgdeBR67 --- .machine_readable/root-allow.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.machine_readable/root-allow.txt b/.machine_readable/root-allow.txt index 196dbcf..c577916 100644 --- a/.machine_readable/root-allow.txt +++ b/.machine_readable/root-allow.txt @@ -74,6 +74,7 @@ tests/ ?sonar-project.properties # only where the repo is analysed by SonarCloud ?benches/ # Cargo-conventional at package root ?examples/ # Cargo-conventional at package root +?ext/ # Julia package extensions: Julia loads an [extensions] entry from ext/ at the package root, so it cannot move; present only where Project.toml declares one ?features/ # optional feature packs ?verification/ # proofs; only where formal-proofs is declared ?CONTRIBUTING.md # accepted at root OR .github/; .github/ is the canonical estate location From 4593491781d8eb5ef4b612f5c2b98247846cd001 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 09:19:39 +0000 Subject: [PATCH 5/6] test: pass the extension test directory as an argument, not in source The AcceleratorGateExt test spliced its directory path into a string literal in the child Julia's generated source. A path containing a backslash (every Windows path), a double quote or a `$` is not valid inside that literal: `C:\Users\name` fails to parse because \U is not an escape, and `$` would be interpolated. The child then failed before any extension test ran. Pass the directory as a separate command argument and read it from ARGS in the child; command interpolation quotes the argument correctly on every platform. Reproduced in isolation first: both `C:\Users\name\a$b"q` and a plain `C:\Users\name` give a ParseError when embedded, and the same path round-trips exactly through ARGS. Verified with Julia 1.11.5: Pkg.test() passes 47 of 47 (the extension's 24 included) through the new path, and JuliaFormatter accepts the file. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0136P7ZoXueEiNpcpgdeBR67 --- test/runtests.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index c0a790b..40903ec 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -29,8 +29,11 @@ using CoprocessorRuntime @info "AcceleratorGateExt tests need Julia 1.11 ([sources]); running Julia $VERSION" @test_skip false else - script = "import Pkg; Pkg.instantiate(); include(joinpath(\"$ext_dir\", \"runtests.jl\"))" - cmd = `$(Base.julia_cmd()) --startup-file=no --project=$ext_dir -e $script` + # The directory is passed as an argument and read from ARGS, never + # spliced into the generated source: a path with a backslash (any + # Windows path), a quote or a `$` is not valid inside a string literal. + script = "import Pkg; Pkg.instantiate(); include(joinpath(ARGS[1], \"runtests.jl\"))" + cmd = `$(Base.julia_cmd()) --startup-file=no --project=$ext_dir -e $script $ext_dir` # Pkg.test sets JULIA_LOAD_PATH for the sandbox it makes; the # subprocess must resolve its own environment, not inherit that one. @test success( From 4a9ab390dcb83acdcdf221a4cd56105f30351501 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 13:48:52 +0000 Subject: [PATCH 6/6] chore: mint the package uuid as UUIDv8 profile C, domain julia-package-identity The first re-mint in this branch used profile T (a random v7 with the version nibble set to 8). ADR-008's registry (standards, docs/decisions/ADR-008-profile-c-domains.json) registers the domain julia-package-identity for exactly this case: the UUIDv8 identity of an unregistered Julia package's own uuid, deterministic across re-mints, hashed from github.com// of the hosting repository. The owner ruled on 2026-11-14 to re-mint this package's id under that domain, and chose to switch this PR to it before it merges, so the package identity changes once. New id, reproducible with the estate generator: bun scripts/uuid-v8.js c julia-package-identity \ github.com/hyperpolymath/CoprocessorRuntime.jl which gives 30bdb74d-6d6a-8e6d-a17e-2d6824776af8 (version 8, variant 10). It replaces the profile T id in Project.toml, the extension test environment (test/ext/Project.toml) and the wiring doc, and the Project.toml comment now records the domain and name instead of "profile T". The profile T id is not spelled out in the tree; it is in this branch's history. A new uuid is a different package to a Julia registry. This package is not in General (checked 2026-11-14) and a code search of the default branches visible that day found no consumer of the old id; private registries could not be checked. Only this one id is re-minted. Verified with Julia 1.11.5 from clean manifests: Pkg.test() passes 47 of 47 (the extension's 24 included) and the package loads under the new uuid. check-uuid-v8.sh --strict flags only CLAUDE.md, which carries rsr-template-repo's uuid (template residue, unchanged here). Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0136P7ZoXueEiNpcpgdeBR67 --- Project.toml | 13 ++++++++----- docs/ecosystem/HYPERPOLYMATH-WIRING.adoc | 15 ++++++++++----- test/ext/Project.toml | 2 +- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/Project.toml b/Project.toml index 9f34f91..88936dc 100644 --- a/Project.toml +++ b/Project.toml @@ -4,13 +4,16 @@ # # uuid below is the UUIDv8 re-mint of the package identity (ADR-008 # amendment D320: an unregistered Julia package's own uuid re-mints as -# version 8), minted with the estate generator (standards' -# scripts/uuid-v8.js, profile T) on 2026-11-14. It supersedes the mint-time -# UUIDv5 literal (in git history; not spelled out here because the strict -# UUIDv8 scanner reads every hyphenated literal, comments included). +# version 8). It is profile C, domain julia-package-identity, name +# github.com/hyperpolymath/CoprocessorRuntime.jl, so it is reproducible: +# bun scripts/uuid-v8.js c julia-package-identity github.com/hyperpolymath/CoprocessorRuntime.jl +# (standards' scripts/uuid-v8.js), minted 2026-11-14 on an explicit owner +# ruling for this one id. It supersedes the mint-time UUIDv5 literal (in git +# history; not spelled out here because the strict UUIDv8 scanner reads every +# hyphenated literal, comments included). name = "CoprocessorRuntime" -uuid = "01a1d947-ed2c-8570-92fa-1871a655abc1" +uuid = "30bdb74d-6d6a-8e6d-a17e-2d6824776af8" description = "Coprocessor support base library for Julia — session contracts, tropical grades, echo residues, epistemic receipts, CNO/OND claims. Not a kernel runtime." authors = ["Jonathan D.A. Jewell "] license = "MPL-2.0" diff --git a/docs/ecosystem/HYPERPOLYMATH-WIRING.adoc b/docs/ecosystem/HYPERPOLYMATH-WIRING.adoc index be8328f..6c267e3 100644 --- a/docs/ecosystem/HYPERPOLYMATH-WIRING.adoc +++ b/docs/ecosystem/HYPERPOLYMATH-WIRING.adoc @@ -13,17 +13,22 @@ Hyperpolymath.jl is the metapackage. It already re-exports the metal layer `HardwareResilience`, `FirmwareAudit`) and does **not** yet name this package. Generate a fresh UUID-compat line using this package's uuid -`01a1d947-ed2c-8570-92fa-1871a655abc1`. It is the UUIDv8 re-mint of the -package identity (ADR-008 amendment D320); the mint-time UUIDv5 is in git -history. A code search of the default branches visible on 2026-11-14 found -no consumer of the old id; the patches below were never applied. +`30bdb74d-6d6a-8e6d-a17e-2d6824776af8`. It is the UUIDv8 re-mint of the +package identity (ADR-008 amendment D320), profile C, domain +`julia-package-identity`, name +`github.com/hyperpolymath/CoprocessorRuntime.jl`, so it can be recomputed with +`bun scripts/uuid-v8.js c julia-package-identity github.com/hyperpolymath/CoprocessorRuntime.jl` +in standards. The mint-time UUIDv5 is in git history. A new uuid is a different +package to a Julia registry; this package is not in General (checked +2026-11-14), and a code search of the default branches visible that day found +no consumer of the old id. The patches below were never applied. === `Project.toml` Add to `[deps]`: ---- -CoprocessorRuntime = "01a1d947-ed2c-8570-92fa-1871a655abc1" +CoprocessorRuntime = "30bdb74d-6d6a-8e6d-a17e-2d6824776af8" ---- Add to `[compat]`: diff --git a/test/ext/Project.toml b/test/ext/Project.toml index a1f1510..b3a8b45 100644 --- a/test/ext/Project.toml +++ b/test/ext/Project.toml @@ -5,7 +5,7 @@ # environment in a subprocess and records a visible Broken test on older Julia. [deps] AcceleratorGate = "59f742c7-270d-4a76-95d4-a853ae16cc71" -CoprocessorRuntime = "01a1d947-ed2c-8570-92fa-1871a655abc1" +CoprocessorRuntime = "30bdb74d-6d6a-8e6d-a17e-2d6824776af8" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"