Skip to content

Commit 3d7e8dc

Browse files
fix(ci): green the remaining gates and rebuild the config files honestly (#130)
Follow-on to #129. That PR made the two dead gates *run*; this one makes the remaining four checks *pass*, and replaces four config files that a sweep had overwritten with generic estate boilerplate. ## Gates ### Rust CI — `clippy -D warnings` (was exit 101) ~32 lints. Most came straight from `cargo clippy --fix`. Two groups needed judgement: - **19 × `&[x.clone()]` → `std::slice::from_ref(&x)`** — single-element slices; drops a needless clone. - **5 × `clippy::approx_constant` — a false positive.** Every hit is the literal `3.14` used as arbitrary decimal test data: `abs(-3.14) == 3.14`, a JSON float round-trip, a channel send/receive. None of them mean π. Substituting `std::f64::consts::PI` would change what the tests assert, so the test modules carry a narrowly scoped `#[allow]` with the reason written beside it. **This failure was masking three other jobs.** `Cargo audit`, `Cargo test` and `Coverage` were all `skipped` behind it. Tests now actually run: **236 pass, 0 fail.** ### Cargo Audit + Security — RUSTSEC-2026-0190 Both were red on the same advisory (unsoundness in `anyhow`'s `Error::downcast_mut()`). The plan was a time-boxed `audit.toml` ignore. It turned out not to be needed: `anyhow` is transitive and **1.0.104 is released**, so this is a real fix. Bumped `1.0.102 → 1.0.104`; `cargo audit -D warnings` now exits 0. **No suppression file added.** ### ClusterFuzzLite — `open Dockerfile: no such file or directory` `.clusterfuzzlite/` holds a `Containerfile` per the estate's podman-first naming, but ClusterFuzzLite hardcodes `.clusterfuzzlite/Dockerfile`. Added `Dockerfile` as a **symlink** to `Containerfile` (git mode `120000`), so the tool finds the name it demands while the estate convention remains the single source of truth. ## Config files These carried generic multi-language boilerplate that didn't describe this repo — and in two cases actively contradicted it. | File | What was wrong | |---|---| | `mise.toml` | `rust = "latest"` **against** `rust-toolchain.toml`'s deliberate `1.96.0` pin; declared node/python/go/java/bun/npm/yarn/pnpm/pip — **all BANNED by this repo's own `.claude/CLAUDE.md`**; `[alias]` chained `cargo test \|\| npm test \|\| go test ./...` | | `.tool-versions` | `rust stable` — same contradiction | | `.editorconfig` | Covered Elixir/ReScript/Zig/Ada; **omitted Lean, Coq, ocamllex/menhir and `.woke`/`.wl`** | | `.gitattributes` | Same — absent languages in, present languages out | | `.gitignore` | Cruft for absent languages; missing `*.olean`, `*.ilean`, `.lake/`, Idris `*.ttc` | | `guix.scm` | Licence field that **could never have evaluated** | Two of these deserve spelling out. **The `mise.toml` alias block was a fake gate by construction.** `test = "cargo test || npm test || go test ./..."` converts a genuine `cargo test` failure into an attempt at two toolchains that don't exist here. The pin contradiction matters for the same reason: `rust-toolchain.toml` documents that a drifting `stable` once broke *this very clippy gate* with lints local clippy couldn't see. **`guix.scm`'s licence was broken two ways:** ```scheme (license ((@@ (guix licenses) license) "MPL-2.0" "...")) ``` `@@` reaches into a **non-exported** binding, and the `license` record constructor takes three fields but was given two. Because guix isn't installed on the development host, nothing ever evaluated this file and the fault sat unnoticed. Now `(license mpl2.0)` — what `(guix licenses)` actually exports. Confirmed the file parses under guile and that the old form raises `unbound-variable`. `.gitignore` was checked both directions: no currently tracked file becomes ignored, and the tracked `examples/math.wasm` fixture is explicitly re-included. ## Verified locally ``` cargo clippy --workspace --all-targets -- -D warnings PASS cargo fmt --all -- --check PASS cargo test --workspace PASS (236 tests) cargo audit -D warnings PASS guix.scm parses under guile PASS all 22 workflows structurally valid for Actions PASS no tracked file newly ignored PASS ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 7864eb0 commit 3d7e8dc

15 files changed

Lines changed: 249 additions & 151 deletions

.clusterfuzzlite/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Containerfile

.editorconfig

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,68 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
# .editorconfig — RSR standard editor configuration
2+
# .editorconfig — editor settings for the languages this repository actually
3+
# contains. Deliberately not a generic estate template: the sections below
4+
# track `git ls-files`, so a language that is not present does not get a rule.
35

46
root = true
57

68
[*]
7-
indent_style = space
8-
indent_size = 2
99
charset = utf-8
1010
end_of_line = lf
11-
trim_trailing_whitespace = true
11+
indent_style = space
12+
indent_size = 2
1213
insert_final_newline = true
14+
trim_trailing_whitespace = true
15+
16+
# Trailing whitespace is significant here (Markdown hard line breaks,
17+
# AsciiDoc continuations), so leave it alone.
18+
[*.{md,adoc}]
19+
trim_trailing_whitespace = false
20+
21+
# ── WokeLang itself ────────────────────────────────────────────────────────
22+
[*.{woke,wl}]
23+
indent_size = 4
1324

25+
[*.ebnf]
26+
indent_size = 2
27+
28+
# ── Rust: the primary toolchain (src/) ─────────────────────────────────────
29+
[*.rs]
30+
indent_size = 4
31+
32+
# ── OCaml: the reference core (core/), incl. ocamllex/menhir ───────────────
33+
[*.{ml,mli,mll,mly}]
34+
indent_size = 2
35+
36+
[{dune,dune-project,*.opam}]
37+
indent_size = 1
38+
39+
# ── Proof assistants ───────────────────────────────────────────────────────
40+
[*.lean]
41+
indent_size = 2
42+
43+
[*.v]
44+
indent_size = 2
45+
46+
[*.{idr,ipkg}]
47+
indent_size = 2
48+
49+
# ── Configuration and data ─────────────────────────────────────────────────
50+
[*.{toml,yml,yaml,json,jsonl,ncl,a2ml}]
51+
indent_size = 2
52+
53+
# Guile / Guix
54+
[*.scm]
55+
indent_size = 2
56+
57+
# ── Shell, recipes, TeX ────────────────────────────────────────────────────
58+
[*.sh]
59+
indent_size = 2
60+
61+
[{Justfile,Mustfile,*.just}]
62+
indent_size = 4
63+
64+
[Makefile]
65+
indent_style = tab
66+
67+
[*.{tex,bib}]
68+
indent_size = 2

.gitattributes

Lines changed: 67 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,70 @@
11
# SPDX-License-Identifier: MPL-2.0
2+
# .gitattributes — line-ending normalisation, diff drivers and linguist hints
3+
# for the languages this repository actually contains. Entries track
4+
# `git ls-files`; absent languages (Elixir, ReScript, TypeScript, Zig) are not
5+
# listed, and languages that were missing (Lean, ocamllex/menhir, WokeLang's
6+
# own sources) now are.
27

3-
# Auto detect text files and perform LF normalization
4-
* text=auto
5-
6-
# Source code
7-
*.rs text eol=lf diff=rust
8-
*.ex text eol=lf diff=elixir
9-
*.exs text eol=lf diff=elixir
10-
*.ml text eol=lf diff=ocaml
11-
*.mli text eol=lf diff=ocaml
12-
*.res text eol=lf diff=javascript
13-
*.resi text eol=lf diff=javascript
14-
*.ts text eol=lf diff=typescript
15-
*.js text eol=lf diff=javascript
16-
*.idr text eol=lf
17-
*.v text eol=lf
18-
*.zig text eol=lf
19-
20-
# Configuration
21-
*.toml text eol=lf
22-
*.json text eol=lf
23-
*.yml text eol=lf
24-
*.yaml text eol=lf
25-
*.scm text eol=lf linguist-language=Scheme
26-
27-
# Documentation
28-
*.md text eol=lf diff=markdown
29-
*.adoc text eol=lf
30-
*.txt text eol=lf
31-
32-
# Scripts
33-
*.sh text eol=lf
34-
*.bash text eol=lf
35-
36-
# Build artifacts (binary)
37-
*.wasm binary
38-
*.rlib binary
39-
*.beam binary
40-
*.so binary
41-
*.dylib binary
42-
*.dll binary
43-
*.exe binary
44-
45-
# Lock files (generated)
8+
# Normalise everything to LF in the repository.
9+
* text=auto eol=lf
10+
11+
# ── WokeLang itself ────────────────────────────────────────────────────────
12+
# Report the project's own sources as its own language rather than letting
13+
# linguist guess from the extension.
14+
*.woke text eol=lf linguist-language=WokeLang
15+
*.wl text eol=lf linguist-language=WokeLang
16+
*.ebnf text eol=lf
17+
18+
# ── Rust: the primary toolchain (src/) ─────────────────────────────────────
19+
*.rs text eol=lf diff=rust
20+
21+
# ── OCaml: the reference core (core/) ──────────────────────────────────────
22+
*.ml text eol=lf diff=ocaml
23+
*.mli text eol=lf diff=ocaml
24+
*.mll text eol=lf linguist-language=OCaml
25+
*.mly text eol=lf linguist-language=OCaml
26+
*.opam text eol=lf
27+
28+
# ── Proof assistants ───────────────────────────────────────────────────────
29+
*.lean text eol=lf linguist-language=Lean
30+
*.v text eol=lf linguist-language=Coq
31+
*.idr text eol=lf linguist-language=Idris
32+
*.ipkg text eol=lf
33+
34+
# ── Configuration and data ─────────────────────────────────────────────────
35+
*.toml text eol=lf
36+
*.json text eol=lf
37+
*.jsonl text eol=lf
38+
*.yml text eol=lf
39+
*.yaml text eol=lf
40+
*.ncl text eol=lf
41+
*.a2ml text eol=lf
42+
*.scm text eol=lf linguist-language=Scheme
43+
44+
# ── Documentation ──────────────────────────────────────────────────────────
45+
*.md text eol=lf diff=markdown
46+
*.adoc text eol=lf
47+
*.txt text eol=lf
48+
*.tex text eol=lf
49+
*.bib text eol=lf
50+
51+
# Documentation is not the project's language for linguist's purposes.
52+
docs/** linguist-documentation
53+
wiki/** linguist-documentation
54+
site/** linguist-documentation
55+
56+
# ── Scripts ────────────────────────────────────────────────────────────────
57+
*.sh text eol=lf
58+
*.bash text eol=lf
59+
60+
# ── Binary ─────────────────────────────────────────────────────────────────
61+
*.wasm binary
62+
*.rlib binary
63+
*.so binary
64+
*.dylib binary
65+
*.dll binary
66+
*.exe binary
67+
*.bundle binary
68+
69+
# ── Generated ──────────────────────────────────────────────────────────────
4670
Cargo.lock linguist-generated=true
47-
package-lock.json linguist-generated=true
48-
mix.lock linguist-generated=true

.gitignore

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,11 @@ build/
2121
*.ibc
2222

2323
# Zig
24-
**/zig-out/
25-
**/.zig-cache/
2624

2725
# ReScript
28-
/lib/bs/
29-
/.bsb.lock
3026

3127
# Dependencies
32-
/node_modules/
3328
/vendor/
34-
/deps/
3529

3630
# Secrets
3731
.env
@@ -78,9 +72,23 @@ editors/vscode/lib/
7872
# OS
7973
.Trash-*/
8074
target/
81-
node_modules/
8275
_build/
83-
deps/
84-
.elixir_ls/
8576
.cache/
8677
dist/
78+
79+
# ── Proof-assistant build artefacts ────────────────────────────────────────
80+
# Lean 4 (docs/proofs/verification/) — the .lean sources are tracked, the
81+
# compiled forms are not.
82+
*.olean
83+
*.ilean
84+
*.trace
85+
.lake/
86+
87+
# Idris 2
88+
*.ibc
89+
*.ttc
90+
*.ttm
91+
92+
# ── Exceptions ─────────────────────────────────────────────────────────────
93+
# `*.wasm` is ignored above, but this one is a tracked example fixture.
94+
!examples/math.wasm

.tool-versions

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
# asdf version manager configuration
3-
rust stable
2+
# asdf / mise tool versions.
3+
#
4+
# Rust is pinned to the SAME version as rust-toolchain.toml. That file
5+
# documents why the pin exists: when a developer's `stable` lagged CI's,
6+
# clippy versions diverged (1.94 local vs 1.96 CI) and the `-D warnings` gate
7+
# failed on main with lints local clippy could not see. Declaring `stable`
8+
# here silently reintroduced exactly that drift, so bump the two together.
9+
rust 1.96.0
10+
11+
# OCaml builds the reference core under core/ via dune + menhir.
12+
# Lower bound comes from wokelang.opam ("ocaml" {>= "4.14"}).
13+
ocaml 4.14.2
14+
15+
# Lean is pinned separately by docs/proofs/verification/lean-toolchain
16+
# (leanprover/lean4:v4.30.0), which the lean-proofs workflow reads directly.
17+
# It is deliberately not duplicated here, so there is one source of truth.

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

guix.scm

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,22 @@
1111
(version "0.1.0")
1212
(source #f)
1313
(build-system gnu-build-system)
14-
(synopsis "wokelang")
15-
(description "wokelang — part of the hyperpolymath ecosystem.")
14+
(synopsis "A human-centred, consent-driven programming language")
15+
(description
16+
"WokeLang is a statically typed programming language whose type system
17+
discharges consent and affine-use reasoning, so destructive operations are
18+
scaffolded at the language level rather than by convention. The primary
19+
toolchain is written in Rust; a smaller OCaml reference core cross-checks the
20+
semantics.")
1621
(home-page "https://github.com/hyperpolymath/wokelang")
17-
(license ((@@ (guix licenses) license) "MPL-2.0"
18-
"https://github.com/hyperpolymath/palimpsest-license")))
22+
;; Code is MPL-2.0 (documentation is CC-BY-SA-4.0, see LICENSES/).
23+
;;
24+
;; This previously read:
25+
;; (license ((@@ (guix licenses) license) "MPL-2.0" "…"))
26+
;; which was broken two ways: `@@` reaches into a NON-EXPORTED binding of
27+
;; (guix licenses), and the `license` record constructor takes three fields
28+
;; (name uri comment) but was given two. Since guix is not installed on the
29+
;; development host, nothing ever evaluated this file and the fault went
30+
;; unnoticed. `mpl2.0` is exported by (guix licenses) and is the correct
31+
;; spelling.
32+
(license mpl2.0))

mise.toml

Lines changed: 26 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,27 @@
1-
[tools]
2-
# Language runtimes
3-
node = "latest"
4-
python = "latest"
5-
rust = "latest"
6-
go = "latest"
7-
zig = "latest"
8-
java = "latest"
9-
bun = "latest"
10-
denojs = "latest"
11-
12-
# Package managers
13-
npm = "latest"
14-
yarn = "latest"
15-
pnpm = "latest"
16-
pip = "latest"
17-
cargo = "latest"
18-
go-task = "latest"
19-
20-
# Formatting & Linting
21-
gofmt = "latest"
22-
black = "latest"
23-
isort = "latest"
24-
ruff = "latest"
25-
prettier = "latest"
26-
shfmt = "latest"
27-
stylua = "latest"
28-
29-
# Build tools
30-
cmake = "latest"
31-
make = "latest"
32-
ninja = "latest"
1+
# SPDX-License-Identifier: MPL-2.0
2+
# mise configuration.
3+
#
4+
# This file previously carried a generic estate template that was wrong for
5+
# this repository in three ways, all of which mattered:
6+
#
7+
# 1. `rust = "latest"` contradicted rust-toolchain.toml, which pins 1.96.0
8+
# precisely because a drifting `stable` broke the clippy `-D warnings`
9+
# gate on main with lints local clippy could not see.
10+
# 2. It declared node, python, go, java, bun, npm, yarn, pnpm and pip —
11+
# every one of which is on the BANNED list in this repo's own
12+
# .claude/CLAUDE.md language policy.
13+
# 3. Its [alias] block chained fallbacks, e.g.
14+
# test = "cargo test || npm test || go test ./..."
15+
# which converts a genuine `cargo test` failure into an attempt at two
16+
# more toolchains that do not exist here — a fake gate by construction.
17+
#
18+
# Tool versions live in .tool-versions (which mise reads natively); the Rust
19+
# compiler is owned by rust-toolchain.toml and Lean by
20+
# docs/proofs/verification/lean-toolchain. Nothing is duplicated here, so
21+
# there is exactly one source of truth per toolchain.
22+
#
23+
# Real entry points are `just` recipes in the Justfile — not aliases here.
3324

34-
# Shell tools
35-
git = "latest"
36-
gnu-sed = "latest"
37-
gnu-tar = "latest"
38-
gnu-grep = "latest"
39-
40-
# Testing
41-
vitest = "latest"
42-
pytest = "latest"
43-
jest = "latest"
44-
45-
[env]
46-
# Common environment variables
47-
NODE_ENV = "development"
48-
PYTHONDONTWRITEBYTECODE = "1"
49-
PYTHONUNBUFFERED = "1"
50-
51-
# Task runner alias
52-
[alias]
53-
task = "go-task"
54-
build = "cargo build --release || npm run build || go build"
55-
test = "cargo test || npm test || go test ./..."
56-
lint = "ruff check . || prettier --check . || black --check ."
57-
fmt = "ruff format . || prettier --write . || black ."
25+
[tools]
26+
# Intentionally empty: see .tool-versions, rust-toolchain.toml and
27+
# docs/proofs/verification/lean-toolchain.

src/stdlib/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ mod tests {
400400
let mut caps = test_caps();
401401
let arr = Value::Array(vec![Value::Int(1), Value::Int(2), Value::Int(3)]);
402402

403-
if let Value::Okay(v) = first(&[arr.clone()], &mut caps).unwrap() {
403+
if let Value::Okay(v) = first(std::slice::from_ref(&arr), &mut caps).unwrap() {
404404
assert_eq!(*v, Value::Int(1));
405405
}
406406

0 commit comments

Comments
 (0)