From 4716e8958a4721919fdccbd9c796859efd9b94b5 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 15:58:08 +0000 Subject: [PATCH 1/6] ci: fix the Julia CI Format and JET steps and floor Julia at 1.10 Both steps crashed before checking anything, and the 1.9 leg could not start, so Julia CI had never exercised this package on main. Format (JuliaFormatter), three defects in the step: - `filter(isfile, Iterators.flatten(...))` is a MethodError: filter needs a collection, so the Flatten is collected; - `format_string` is not in JuliaFormatter 2; `format_text` is; - it read every file in src/, including src/README.adoc, and format_text throws a ParseError on a non-Julia file; only `*.jl` files are checked now. (Found by running the step locally past the first fix; the first two alone would have crashed on that file.) JET: `JET.test_package(path=".", julia_version="1")` matches no method in JET 0.9 or newer; the package module is the argument. Julia floor: the 1.9 leg failed in setup-julia ("Unable to load dependent library .../julia/1.9.4/.../libopenlibm.so") before any test, on main and on every PR. The owner chose a 1.10 LTS floor: the matrix leg is 1.10 and compat julia is 1.10, so the repository claims only what CI tests. A breaking change for Julia 1.9 users, recorded in the changelog. Verified locally with Julia 1.11.5: the Format step, extracted from the workflow and run as written, exits 0 after the formatting commit that follows; JET.test_package(CoprocessorRuntime) with JET 0.9.20 raises no finding. Not verified: JET on the newest Julia (what CI runs), and the 1.10 leg (CI decides). Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0136P7ZoXueEiNpcpgdeBR67 --- .github/workflows/julia-ci.yml | 11 ++++++----- CHANGELOG.adoc | 19 ++++++++++++++++++- Project.toml | 2 +- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/julia-ci.yml b/.github/workflows/julia-ci.yml index ae61014..2d46def 100644 --- a/.github/workflows/julia-ci.yml +++ b/.github/workflows/julia-ci.yml @@ -38,13 +38,13 @@ jobs: using Pkg Pkg.add("JuliaFormatter") using JuliaFormatter - for f in filter(isfile, Iterators.flatten(( + for f in filter(f -> isfile(f) && endswith(f, ".jl"), collect(Iterators.flatten(( [joinpath("src", x) for x in readdir("src")], [joinpath("test", x) for x in readdir("test") if x != "cases"], [joinpath("test", "cases", x) for x in readdir(joinpath("test", "cases"))], - ))) + )))) text = read(f, String) - formatted = JuliaFormatter.format_string(text) + formatted = JuliaFormatter.format_text(text) if text != formatted @error "not formatted" file=f exit(1) @@ -66,7 +66,8 @@ jobs: using Pkg Pkg.add("JET") using JET - JET.test_package(path=".", julia_version="1")' + using CoprocessorRuntime + JET.test_package(CoprocessorRuntime)' test: name: Test (Test + Aqua) @@ -74,7 +75,7 @@ jobs: strategy: fail-fast: false matrix: - julia: ["1.9", "1"] + julia: ["1.10", "1"] os: [ubuntu-latest] steps: - uses: actions/checkout@v7.0.1 diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 5439a97..4615c72 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -20,10 +20,27 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning]. (Hyperpolymath.jl cannot be pushed from this session). * `docs/status/HYPATIA-GATE.adoc` — why the CodeRabbit compare has no merge-base, and which CI reds this tree can actually fix. -* `.github/workflows/julia-ci.yml` (format / JET / Test+Aqua on 1.9 and 1). +* `.github/workflows/julia-ci.yml` (format / JET / Test+Aqua on 1.10 and 1). + +==== Changed + +* *Breaking:* the minimum Julia is now 1.10 (`julia = "1.10"` in `[compat]`), + and CI's oldest leg is 1.10. The 1.9 leg could not run: `setup-julia` + installed 1.9.4 and the runner could not load its `libopenlibm.so`, so the + leg failed before any test and the repository claimed a version CI never + tested. ==== Fixed +* `julia-ci.yml` Format step: it called `filter` over an uncollected + `Iterators.Flatten` (a `MethodError`), used `format_string` (not in + JuliaFormatter 2), and read every file in `src/`, including + `src/README.adoc`, which is not Julia. It now collects the list, uses + `format_text`, and checks only `*.jl` files. +* `julia-ci.yml` JET step: it passed `path=` and `julia_version=`, which + `JET.test_package` does not take; it now passes the package module. +* Seven files that JuliaFormatter flagged are formatted (the syntax tree of + each is identical before and after). * Reverted Dependabot's `codeql-action` 4.38.1 pin to v4.38.0 (`b96794f`), which is what `actions.lock` already recorded. 4.38.1 is blocked estate-wide (nexia-list#100) and was the `startup_failure` on diff --git a/Project.toml b/Project.toml index d480432..b6c2882 100644 --- a/Project.toml +++ b/Project.toml @@ -22,6 +22,6 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" test = ["Test", "Aqua"] [compat] -julia = "1.9" +julia = "1.10" Test = "1.9" Aqua = "0.8" From da9fea8680a01608351d8685b3033a0b4cc481f2 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 15:58:08 +0000 Subject: [PATCH 2/6] style: format the seven files JuliaFormatter flags Once the CI Format step can run, it correctly reports these files as unformatted: src/Choreography.jl, src/CoprocessorRuntime.jl, src/Nullity.jl, src/Receipts.jl, src/Sessions.jl, test/cases/receipts.jl and test/cases/sessions.jl. They are formatted with JuliaFormatter 2.14 (default style), nothing else. Formatting only, and checked: for each file the old and new text were parsed, line numbers stripped, and the syntax trees compared; all seven are identical, so no behaviour changes. A file would not have been written otherwise. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0136P7ZoXueEiNpcpgdeBR67 --- src/Choreography.jl | 20 ++++++-------- src/CoprocessorRuntime.jl | 55 ++++++++++++++++++++++++++++++--------- src/Nullity.jl | 4 +-- src/Receipts.jl | 14 ++++------ src/Sessions.jl | 4 +-- test/cases/receipts.jl | 18 ++++++------- test/cases/sessions.jl | 2 +- 7 files changed, 70 insertions(+), 47 deletions(-) diff --git a/src/Choreography.jl b/src/Choreography.jl index 0a171e3..619c378 100644 --- a/src/Choreography.jl +++ b/src/Choreography.jl @@ -51,13 +51,13 @@ function project(plan::LaunchPlan, role::Role) local_eps = Endpoint[e for e in plan.endpoints if typeof(e.role) === typeof(role)] injective = plan.loss.map.injective ( - role=role, - endpoints=local_eps, - grade=plan.grade, - loss=plan.loss, - grade_eq=injective, - warrant_bound=injective ? :degenerate_base : :open, - kcut=:open, + role = role, + endpoints = local_eps, + grade = plan.grade, + loss = plan.loss, + grade_eq = injective, + warrant_bound = injective ? :degenerate_base : :open, + kcut = :open, ) end @@ -89,9 +89,5 @@ protocol would be the Protocol Squisher claim that `hub_ceiling` refutes. Callers who need a backend use AcceleratorGate selection, not a hub. """ function universal_hub_allowed() - throw( - HubCeilingRefusal( - "hub_ceiling: no universal coprocessor adapter", - ), - ) + throw(HubCeilingRefusal("hub_ceiling: no universal coprocessor adapter")) end diff --git a/src/CoprocessorRuntime.jl b/src/CoprocessorRuntime.jl index 5dc609e..4a7ee83 100644 --- a/src/CoprocessorRuntime.jl +++ b/src/CoprocessorRuntime.jl @@ -37,18 +37,49 @@ close_session!(s) """ module CoprocessorRuntime -export Role, HostRole, DeviceRole, - CoprocessorKind, CPUKind, GPUKind, NPUKind, TPUKind, FPGAKind, QPUKind, - DSPKind, UnknownKind, - 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, - CNOClaim, ONDClaim, reset_session!, observe_null, - InverseMeta, inversion_of, irreversible, - Endpoint, LaunchPlan, launch_plan, project, projected_grade, - universal_hub_allowed, HubCeilingRefusal, - kind_label +export Role, + HostRole, + DeviceRole, + CoprocessorKind, + CPUKind, + GPUKind, + NPUKind, + TPUKind, + FPGAKind, + QPUKind, + DSPKind, + UnknownKind, + 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, + CNOClaim, + ONDClaim, + reset_session!, + observe_null, + InverseMeta, + inversion_of, + irreversible, + Endpoint, + LaunchPlan, + launch_plan, + project, + projected_grade, + universal_hub_allowed, + HubCeilingRefusal, + kind_label include("Kinds.jl") include("Grades.jl") diff --git a/src/Nullity.jl b/src/Nullity.jl index ffe5f6e..e7eada0 100644 --- a/src/Nullity.jl +++ b/src/Nullity.jl @@ -74,8 +74,8 @@ Construct an OND claim. Callers must list out-of-scope observables in function observe_null( secret::Symbol, observer::Symbol; - residue::Vector{Symbol}=Symbol[], - status::Symbol=:unproved, + residue::Vector{Symbol} = Symbol[], + status::Symbol = :unproved, ) status in (:unproved, :model_checked) || throw(ArgumentError("OND status must be :unproved or :model_checked, got $status")) diff --git a/src/Receipts.jl b/src/Receipts.jl index 2a2b575..3045847 100644 --- a/src/Receipts.jl +++ b/src/Receipts.jl @@ -30,18 +30,14 @@ end function issue_receipt( session::Session; - standpoint::Symbol=:host, - warrant::WarrantKind=WarrantOnly, - claim::AbstractString="", - sound::Bool=false, + standpoint::Symbol = :host, + warrant::WarrantKind = WarrantOnly, + claim::AbstractString = "", + sound::Bool = false, ) isopen(session) || throw(ArgumentError("session $(session.id) is closed")) if standpoint === :device && warrant === Knowledge && !sound - throw( - ArgumentError( - "device Knowledge without a soundness check is smuggling", - ), - ) + throw(ArgumentError("device Knowledge without a soundness check is smuggling")) end LaunchReceipt(session.id, standpoint, warrant, String(claim), sound) end diff --git a/src/Sessions.jl b/src/Sessions.jl index 25e1f5f..342087d 100644 --- a/src/Sessions.jl +++ b/src/Sessions.jl @@ -9,7 +9,7 @@ const _session_counter = Ref{UInt64}(UInt64(0)) An opened coprocessor session. Opening a session does not allocate device memory and does not prove the device exists. It is a host-side handle. """ -mutable struct Session{K <: CoprocessorKind} +mutable struct Session{K<:CoprocessorKind} id::UInt64 kind::K role::Role @@ -24,7 +24,7 @@ Base.isopen(s::Session) = s.open Mint a host-side session handle. `role` is this endpoint's choreographic projection (almost always `HostRole` in Julia). """ -function open_session(kind::K; role::Role=HostRole()) where {K <: CoprocessorKind} +function open_session(kind::K; role::Role = HostRole()) where {K<:CoprocessorKind} _session_counter[] += UInt64(1) Session{K}(_session_counter[], kind, role, true) end diff --git a/test/cases/receipts.jl b/test/cases/receipts.jl index bbfd77e..133b5f2 100644 --- a/test/cases/receipts.jl +++ b/test/cases/receipts.jl @@ -3,22 +3,22 @@ @testset "epistemic receipts" begin s = open_session(NPUKind()) - r = issue_receipt(s; warrant=WarrantOnly, claim="kernel returned") + r = issue_receipt(s; warrant = WarrantOnly, claim = "kernel returned") @test !host_may_claim(r) fact = issue_receipt( s; - standpoint=:host, - warrant=Knowledge, - claim="host saw flag", - sound=true, + standpoint = :host, + warrant = Knowledge, + claim = "host saw flag", + sound = true, ) @test host_may_claim(fact) @test_throws ArgumentError issue_receipt( s; - standpoint=:device, - warrant=Knowledge, - claim="smuggled", - sound=false, + standpoint = :device, + warrant = Knowledge, + claim = "smuggled", + sound = false, ) close_session!(s) @test_throws ArgumentError issue_receipt(s) diff --git a/test/cases/sessions.jl b/test/cases/sessions.jl index f646e4e..ac44159 100644 --- a/test/cases/sessions.jl +++ b/test/cases/sessions.jl @@ -12,7 +12,7 @@ @test isopen(s) close_session!(s) @test_throws ArgumentError reset_session!(s) - ond = observe_null(:weights, :host; residue=[:thermal, :em_sidechannel]) + ond = observe_null(:weights, :host; residue = [:thermal, :em_sidechannel]) @test ond.status === :unproved @test ond.residue == [:thermal, :em_sidechannel] @test irreversible(:reduce).inverse === nothing From 9548c3008d40f5465e71b72332b398b34df03575 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 09:00:22 +0000 Subject: [PATCH 3/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 | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 4615c72..e259b8f 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -48,6 +48,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 4a7ee83..077b59c 100644 --- a/src/CoprocessorRuntime.jl +++ b/src/CoprocessorRuntime.jl @@ -62,6 +62,10 @@ export Role, injective_transfer, collapsing_transfer, WarrantKind, + Knowledge, + Belief, + WarrantOnly, + Unsound, LaunchReceipt, issue_receipt, host_may_claim, From 74d08b15a63b908060e2b918bfb2044c83fbabd0 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 16:05:44 +0000 Subject: [PATCH 4/6] docs: state the Julia 1.10 floor in the developer quickstart Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0136P7ZoXueEiNpcpgdeBR67 --- .machine_readable/ai/PLACEHOLDERS.adoc | 2 +- docs/onboarding/QUICKSTART-DEV.adoc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.machine_readable/ai/PLACEHOLDERS.adoc b/.machine_readable/ai/PLACEHOLDERS.adoc index 4d3ad24..f629f73 100644 --- a/.machine_readable/ai/PLACEHOLDERS.adoc +++ b/.machine_readable/ai/PLACEHOLDERS.adoc @@ -104,7 +104,7 @@ surfaces any left unfilled. |---|---|---|---| | `CoprocessorRuntime` | Package / module name (slug) | `my-project` | docs/onboarding/QUICKSTART-MAINTAINER.adoc | | `{{DESCRIPTION}}` | Short repo description (forge metadata) | `A tool for X` | .github/settings.yml | -| `Julia (1.9+)` | Language / toolchain stack | `Idris2 + Zig` | docs/onboarding/QUICKSTART-DEV.adoc | +| `Julia (1.10+)` | Language / toolchain stack | `Idris2 + Zig` | docs/onboarding/QUICKSTART-DEV.adoc | | `julia --project=. -e 'using Pkg; Pkg.instantiate()'` | Build command | `just build` | docs/onboarding/QUICKSTART-DEV.adoc | | `julia --project=. -e 'using Pkg; Pkg.test()'` | Test command | `just test` | docs/onboarding/QUICKSTART-DEV.adoc | | `src/` | Build artefact output path | `build/` | docs/onboarding/QUICKSTART-MAINTAINER.adoc | diff --git a/docs/onboarding/QUICKSTART-DEV.adoc b/docs/onboarding/QUICKSTART-DEV.adoc index e7a75c1..33918d6 100644 --- a/docs/onboarding/QUICKSTART-DEV.adoc +++ b/docs/onboarding/QUICKSTART-DEV.adoc @@ -1,14 +1,14 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell // Template: QUICKSTART-DEV.adoc — clone → build → test → PR -// Replace rsr-template-repo, julia --project=. -e 'using Pkg; Pkg.instantiate()', julia --project=. -e 'using Pkg; Pkg.test()', Julia (1.9+) with actuals +// Replace rsr-template-repo, julia --project=. -e 'using Pkg; Pkg.instantiate()', julia --project=. -e 'using Pkg; Pkg.test()', Julia (1.10+) with actuals = rsr-template-repo — Quick Start for Developers :toc: :toclevels: 2 == Tech Stack -Julia (1.9+) +Julia (1.10+) == Set Up Development Environment From 19aee19b92a66a99472dd3c8e06011db7e56a026 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 16:05:54 +0000 Subject: [PATCH 5/6] docs: changelog entry for the quickstart Julia floor Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0136P7ZoXueEiNpcpgdeBR67 --- CHANGELOG.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index e259b8f..3ae02a6 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -30,6 +30,8 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning]. leg failed before any test and the repository claimed a version CI never tested. +* `docs/onboarding/QUICKSTART-DEV.adoc` states Julia 1.10+, matching the floor. + ==== Fixed * `julia-ci.yml` Format step: it called `filter` over an uncollected From 012d81824cf81d80c80a82baf8e9d5df5f58f9bc Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 16:26:56 +0000 Subject: [PATCH 6/6] fix: typed inner constructors for ONDClaim and LaunchPlan JET 0.13 on Julia 1.13 reports five possible errors through the default constructors' convert into Vector{Symbol} and Vector{Endpoint}. Typing the constructors rejects ill-typed input at the call, keeps conforming callers unchanged, and clears the report (JET.test_package exits 0 on 1.13.4; 46/46 tests pass on 1.13.4, 1.11.5 and 1.10.10). Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0136P7ZoXueEiNpcpgdeBR67 --- CHANGELOG.adoc | 7 +++++++ src/Choreography.jl | 11 +++++++++++ src/Nullity.jl | 12 ++++++++++++ 3 files changed, 30 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 3ae02a6..abbfbb0 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -39,6 +39,13 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning]. JuliaFormatter 2), and read every file in `src/`, including `src/README.adoc`, which is not Julia. It now collects the list, uses `format_text`, and checks only `*.jl` files. +* `ONDClaim` and `LaunchPlan` now have typed inner constructors. The default + ones accepted `Any` and converted to the field types, which JET 0.13 on Julia + 1.13 reported as five possible errors (`convert` into `Vector{Symbol}` and + `Vector{Endpoint}`), so the JET job was red on the "1" runner. Callers that + already pass the declared types (`observe_null`, `launch_plan`, the tests) + are unaffected; a direct call with a different vector type, such as + `Vector{Any}`, is now a `MethodError` at the call instead of a conversion. * `julia-ci.yml` JET step: it passed `path=` and `julia_version=`, which `JET.test_package` does not take; it now passes the package module. * Seven files that JuliaFormatter flagged are formatted (the syntax tree of diff --git a/src/Choreography.jl b/src/Choreography.jl index 619c378..11bb937 100644 --- a/src/Choreography.jl +++ b/src/Choreography.jl @@ -27,6 +27,17 @@ struct LaunchPlan endpoints::Vector{Endpoint} grade::ResourceGrade loss::EchoResidue + + # Typed inner constructor (see `ONDClaim`): ill-typed input is rejected + # at the boundary instead of deep inside `convert`. + function LaunchPlan( + global_name::Symbol, + endpoints::Vector{Endpoint}, + grade::ResourceGrade, + loss::EchoResidue, + ) + new(global_name, endpoints, grade, loss) + end end function launch_plan( diff --git a/src/Nullity.jl b/src/Nullity.jl index e7eada0..10884d0 100644 --- a/src/Nullity.jl +++ b/src/Nullity.jl @@ -33,6 +33,18 @@ struct ONDClaim observer::Symbol residue::Vector{Symbol} status::Symbol + + # Typed inner constructor: the default one accepts `Any` and converts to + # the field types, which lets ill-typed input fail deep inside `Base` + # (and JET report five "possible errors" through `convert`). + function ONDClaim( + secret_region::Symbol, + observer::Symbol, + residue::Vector{Symbol}, + status::Symbol, + ) + new(secret_region, observer, residue, status) + end end """