Skip to content

fix: aletheia has not compiled since June — repair it, then gate it#123

Merged
hyperpolymath merged 4 commits into
mainfrom
worktree-maa-ci-repair
Jul 21, 2026
Merged

fix: aletheia has not compiled since June — repair it, then gate it#123
hyperpolymath merged 4 commits into
mainfrom
worktree-maa-ci-repair

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

A sitrep on this repo turned up something bigger than the CI gap it started as:
aletheia has not compiled since 2026-06-17. This branch fixes that, then adds the
gate that would have caught it, and clears two unrelated reds.

# Finding State
1 aletheia fails to build — unclosed delimiter in src/config.rs fixed & verified
2 aletheia has no CI anywhere; its 16 workflows are inert root gate added
3 Governance red — pages.yml missing SPDX header fixed
4 absolute-zero pinned to a nonexistent commit; Dependabot dead re-pinned — needs your confirmation

1. The compile break

Config::load_config opened three blocks on one collapsed line and closed two.
Introduced by b5322c2 "security: remediate Track C and Track E findings" — which
correctly added a 1 MiB read cap against memory exhaustion, then dropped a brace
collapsing the block. main has been unbuildable for over a month.

The security intent is preserved exactly; the cap is retained and now commented.

2. Why nothing noticed

aletheia/ is vendored as plain tracked files (mode 100644), not a submodule.
Actions only reads .github/workflows/ at the repository root, so all 16 files under
aletheia/.github/workflows/rust-ci, codeql, cflite_*, SLSA3, GHCR — have
never executed. There is no standalone hyperpolymath/aletheia running them either;
it was removed from GitHub in early 2026. No root workflow mentioned cargo, and root
codeql.yml's language matrix excludes Rust. ~962 lines were completely ungated.

Adds root .github/workflows/rust-ci.yml: debug + release build, 26 unit tests,
cargo fmt --check, and a zero-dependency check enforcing the RSR Bronze constraint
from aletheia/CLAUDE.md. It uses the runner's preinstalled Rust — no new
third-party action
, no added supply-chain surface.

Also adds aletheia/.github/workflows/README.md so nobody edits an inert workflow again.

What I deliberately did not gate

Two things are genuinely red, and a hollow green job is worse than no job. Neither is
masked with continue-on-error; both are documented in the workflow header:

  • Integration tests: 27 of 29 fail. They exercise a CLI surface — --help,
    --version, --format=, --badge, --html, --init-hook — that src/main.rs
    does not implement. It parses only --json and --sarif.
  • clippy -D warnings: 25 findings, mostly dead code.

These share one root cause: the crate was split into 5 modules (962 lines) but
main.rs is only 117 lines and never wires most of them up. glob_match,
check_path_security, parse_toml, TomlValue, PathCheckResult are all unreachable.
aletheia is mid-refactor and incomplete — its 823-line test suite is closer to a
specification of the intended tool than a description of the current one.

That is a product decision, not a CI fix, so I have left it to you.

4. Submodule re-pin — please confirm

ad085baa does not exist upstream (API 422), nor on the GitLab or Codeberg mirrors;
orphaned by a force-push during the Ddraig rollout. Dependabot has failed since
2026-07-20 with upload-pack: not our ref.

Re-pinned to current upstream main 87902bb7. This is a semantic bump, not a
restore
— the old pin's content is unrecoverable, so I cannot verify 87902bb7 is the
intended CNO state.

It may also not be durable: this repo has already oscillated three times (#89bef4c92
#117). Worth settling submodule-vs-vendor, or barring force-push on absolute-zero.

Verification

All run locally from a clean target dir before pushing:

build:    PASS      release:  PASS
tests:    26 passed; 0 failed
fmt:      PASS      zero-dep: PASS
git submodule update --init absolute-zero  ->  checks out 87902bb7 cleanly

Notes

  • PROOF-NEEDS.md is stale: it claims one Admitted in y_not_cno. There are
    zero — it is a documented KEPT AXIOM. A declared trust assumption, not an unproven
    hole. Worth correcting separately.
  • rustfmt.toml sets 18 nightly-only options that stable rustfmt silently ignores.
  • aletheia/Cargo.toml still points repository at the deleted GitHub repo.
  • Untouched: the uncommitted SonarCloud edits in the working copy (unpinned @master),
    and the 4 unpushed local commits. Both are yours to decide.

🤖 Generated with Claude Code

hyperpolymath and others added 4 commits July 21, 2026 07:12
…e 2026-06-17

`Config::load_config` opened three blocks on one collapsed line but closed only
two, so `cargo build` failed with "this file contains an unclosed delimiter".

Introduced by b5322c2 ("security: remediate Track C and Track E findings"), which
correctly added a 1 MiB read cap to stop a hostile `.aletheia.toml` exhausting
memory, but collapsed the block onto a single line and dropped a brace. The crate
has therefore not built for over a month.

Nothing caught it because nothing ever built this code: `aletheia/` is vendored as
plain files, so its 16 nested workflows never execute, and no root workflow
referenced cargo. A root Rust CI gate lands separately in this branch.

The security intent is preserved exactly — the 1 MiB `take()` cap is retained and
now commented. `mut` is dropped from the binding because `Read::take` consumes
`self`, so it was an unused-mut warning waiting to happen.

Verified: cargo build clean; 26/26 unit tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mechanical `cargo fmt` across the crate; no behavioural change. This makes the
`cargo fmt --check` gate added in this branch pass from the outset rather than
landing pre-broken.

Note: `rustfmt.toml` sets 18 nightly-only options (wrap_comments, imports_granularity,
group_imports, brace_style, …) which stable rustfmt silently ignores. The formatting
here is therefore stable-rustfmt's, not the configured intent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two independent CI defects.

1. aletheia had no CI anywhere.
   `aletheia/` is vendored as plain tracked files (mode 100644), not a submodule.
   GitHub Actions only reads `.github/workflows/` at the repository root, so the 16
   workflow files under `aletheia/.github/workflows/` — rust-ci, codeql, cflite,
   SLSA3 provenance, ghcr-publish — have never executed. No standalone
   `hyperpolymath/aletheia` repo runs them either; it was removed from GitHub in
   early 2026. No root workflow mentioned cargo or rust, and root codeql.yml's
   language matrix excludes Rust, so ~962 lines went entirely ungated. The
   consequence is the month-long compile break fixed earlier in this branch.

   Adds `.github/workflows/rust-ci.yml` at the root: debug + release build, the 26
   unit tests, `cargo fmt --check`, and an explicit zero-dependency check enforcing
   the RSR Bronze constraint from aletheia/CLAUDE.md. It uses the runner's
   preinstalled Rust rather than a third-party toolchain action, so it adds no new
   supply-chain surface.

   Deliberately NOT gated, because both are genuinely red and a hollow green job is
   worse than none: the 27/29 failing integration tests (they exercise a CLI surface
   src/main.rs does not implement) and `clippy -D warnings` (25 findings, mostly
   dead code from modules main.rs never wires up). Both are filed as issues and
   documented in the workflow header. Neither is masked with continue-on-error.

   Adds `aletheia/.github/workflows/README.md` so the next person does not edit an
   inert workflow and wonder why nothing happens.

2. Governance was red on main.
   `.github/workflows/pages.yml` was missing its SPDX header — a real gate catching
   a real defect. Header added to match every other workflow in the directory.

All commands verified locally before committing: build, unit tests, fmt check and
the zero-dependency check all pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The gitlink pointed at ad085baa7d25de23fd9cf4de3e88e5896e35c708, which does not
exist in hyperpolymath/absolute-zero (GitHub API returns 422) and is absent from
the GitLab and Codeberg mirrors. It was orphaned by an upstream history rewrite
during the estate-wide Ddraig SSG rollout.

Consequences: Dependabot has failed since 2026-07-20 with "upload-pack: not our
ref ad085baa…"; any `submodules: recursive` checkout fails; the local submodule
could not be initialised; and the CNO reference implementation was unreachable.

Re-pinned to current upstream main, 87902bb770e767c10e065d9ac75d111e80a01be1.

NOTE FOR REVIEW: this is a semantic bump, not a restore. The content of the old
pin is unrecoverable, so it cannot be verified that 87902bb7 is the intended CNO
state — please confirm. Per .gitmodules, pointer bumps are a deliberate act.

Re-pinning may also not be durable on its own: the pin was orphaned by an upstream
force-push, so the next sweep can re-orphan it. This repo has already oscillated
three times (#89 convert to submodule, bef4c92 remove it, #117 restore .gitmodules).
Worth settling submodule-vs-vendor, or barring force-push on absolute-zero main.

Verified: `git submodule update --init absolute-zero` now succeeds and checks out
87902bb7 cleanly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hyperpolymath
hyperpolymath marked this pull request as ready for review July 21, 2026 12:06
@hyperpolymath
hyperpolymath merged commit 0392152 into main Jul 21, 2026
22 of 24 checks passed
@hyperpolymath
hyperpolymath deleted the worktree-maa-ci-repair branch July 21, 2026 12:06
@hyperpolymath

Copy link
Copy Markdown
Owner Author

CI results + one more fix

Rust CI is green on its first ever run — Build (debug+release), Unit tests, Formatting all success. The gate this repo has never had now exists and passes.

Governance: SPDX fixed, second defect uncovered, one left deliberately alone

Fixing the SPDX header advanced the workflow-security linter past its first gate (it exit 1s straight after the SPDX/permissions block), which revealed a defect that had been masked all along — the same file also had 4 unpinned actions:

actions/checkout@v4  x2 · actions/upload-pages-artifact@v3 · actions/deploy-pages@v4

Both faults share one cause: pages.yml was dropped in by the Ddraig SSG mass-rollout (#121) without this repo's SPDX + SHA-pinning conventions.

Now pinned, reusing the vetted SHAs already in casket-pages.yml (the active, compliant Pages workflow) so the two agree. SPDX errors: 0. Unpinned actions at root: 0.

Check Workflow Staleness will stay red — please don't read that as a regression

It was already failing on main before this branch existed (run 29688088909). The standards reusable pins d7c2271 are 59 commits / 24 days behind HEAD 8813ecf.

I have deliberately not refreshed them here:

  • that refresh is shared across all ~54 callers and is coordinated centrally (scripts/propagate-workflow-pins.sh);
  • there is an active finding that consumers should not be re-pinned yet — the gitleaks reusable runs detect --source . with no --config, so re-pinning early reverts on false positives.

Its remediation text also says "Remove legacy scorecard-enforcer.yml". That file does not exist at the repo root — the only copy is aletheia/.github/workflows/scorecard-enforcer.yml, one of the inert files. The log prints no path, so whether the check reaches into the nested directory is unverified. If it does, that is a strong argument for deleting the inert set rather than merely documenting it.

hyperpolymath added a commit that referenced this pull request Jul 21, 2026
…erge) (#128)

Follow-up to #123. This is the one commit from that branch that **missed
the merge** —
#123 was squash-merged at head `120f32d` (12:06 UTC); this commit was
authored at
12:17 UTC, ten minutes later, so it was never part of the PR and never
ran CI.

Main is red on `governance / Workflow security linter` today purely
because of it.

## What this fixes

`pages.yml` was dropped in by the Ddraig SSG mass-rollout (#121) without
this repo's
SPDX and SHA-pinning conventions. #123 fixed the missing SPDX header —
and that is
exactly what exposed this second defect: the linter `exit 1`s
immediately after its
SPDX/permissions block, so the pin check downstream had never been
reached.

```
ERROR: Found unpinned actions:
  .github/workflows/pages.yml:25  actions/checkout@v4
  .github/workflows/pages.yml:27  actions/checkout@v4
  .github/workflows/pages.yml:44  actions/upload-pages-artifact@v3
  .github/workflows/pages.yml:57  actions/deploy-pages@v4
```

The SHAs are **copied verbatim from `casket-pages.yml`** — the active,
already-compliant
Pages workflow in this repo — rather than freshly resolved, so the two
Pages workflows
converge on one vetted set instead of diverging into a third.

Side effect worth naming: this also moves `upload-pages-artifact` v3→v5
and
`deploy-pages` v4→v5, which is what makes them consistent with
`casket-pages.yml`.
`pages.yml` is `disabled_manually`, so there is **no runtime risk
today** — we are
unblocking a linter on a workflow that does not currently run.

## Verified locally (reproducing the linter's own grep)

```
PASS: all root actions SHA-pinned
(no root workflow missing an SPDX header)
all root workflows parse OK
```

## Expected CI on this PR — please read before judging the tick

`governance / Workflow security linter` → **should go green**.

`governance / Check Workflow Staleness` → **will stay red, by design.**
It is
independent of this change and was already failing on `main` before #123
existed. Its
three errors are all standards-reusable pin staleness (`d7c22711e830`,
59 commits / 24d
behind `8813ecf2a841`). That refresh is shared across ~54 callers and
coordinated
centrally, and there is a standing estate finding that consumers should
not be re-pinned
yet. Left to that effort deliberately.

**So the Governance *workflow* will still report failure on this PR.**
That is the
staleness job, not this fix. Do not read it as "the pin fix didn't work"
— check the
per-job conclusions.

Also settled while verifying: the staleness job's "Remove legacy
scorecard-enforcer.yml"
line is its **generic remediation summary**, printed on any failure —
not a path
detection. The only copy of that file is in the inert
`aletheia/.github/workflows/`, and
nothing is reaching into it. No action needed there.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant