Skip to content

ci: consolidate Haec gates, repair K9 envelopes and FFI validation - #27

Merged
hyperpolymath merged 3 commits into
mainfrom
fix/consolidate-dogfood-gate
Jul 27, 2026
Merged

ci: consolidate Haec gates, repair K9 envelopes and FFI validation#27
hyperpolymath merged 3 commits into
mainfrom
fix/consolidate-dogfood-gate

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What this is

Previously-unpushed work that existed only in a local worktree whose .git
pointer was broken (it referenced a stale duplicate clone at
hyper-repos/haec that has since been deleted). Repaired with
git worktree repair and pushed here so it is no longer a single local copy.

36 files, ~610 insertions / ~1265 deletions, in two commits:

  • 5c25f99 — consolidates dogfood-gate.yml (453 lines → net −310) and
    repairs the K9 contract envelopes (coordination.k9,
    session/custom-checks.k9, methodology-guard.k9.ncl, six
    template-*/example .k9.ncl files).
  • e5c86e8 — consolidates gate workflows into ci.yml; removes
    dependabot-automerge.yml, quality.yml, pages.yml, security-policy.yml,
    npm-bun-blocker.yml, hypatia-scan.yml, push-email-notify.yml; trims
    dependabot.yml; and reworks the Zig/Idris FFI validation
    (src/interface/Abi/Foreign.idr, ffi/build.zig, ffi/src/main.zig,
    ffi/test/integration_test.zig), plus Justfile and test-script updates.

⚠️ Not mergeable as-is

Conflicts with #22#24 on six files, because those PRs added SPDX headers to
workflows this branch deletes:

CONFLICT (content)        .github/workflows/governance.yml
CONFLICT (modify/delete)  .github/workflows/hypatia-scan.yml
CONFLICT (modify/delete)  .github/workflows/pages.yml
CONFLICT (content)        .github/workflows/release.yml
CONFLICT (modify/delete)  .github/workflows/rsr-antipattern.yml
CONFLICT (content)        .github/workflows/trope-check.yml

The modify/delete cases resolve trivially (keep the delete); the three content
conflicts need review.

Relationship to #26

The three startup_failure deletions have been split out into #26, which
merges cleanly and fixes the red CI on its own. Rebase this branch on top of #26
once that lands; the deletions will then already be in the base.

Left as draft pending conflict resolution and review of the FFI rewrite.

🤖 Generated with Claude Code

@hyperpolymath
hyperpolymath marked this pull request as ready for review July 27, 2026 13:05
Resolves ten conflicts. This branch predates #19-#25, so several of its
deletions had gone stale and would have silently removed working CI.

Restored from origin/main (branch's deletion was stale — each backs a
currently-green check, three of them hard gates):

  npm-bun-blocker.yml    🔴 Gate: No-npm/bun policy
  quality.yml            🔴 Gate: Code quality (fmt/lint/test)
  security-policy.yml    🔴 Gate: Security policy present
  hypatia-scan.yml       🟡 Check: Hypatia baseline security scan
  rust-ci.yml            🟡 Check: Rust CI (build/test)
  pages.yml              GitHub Pages (Ddraig SSG) — added by #19, newer
  mirror.yml             ⚙ Auto: Mirror to forges
  dependabot-automerge.yml

Deletion kept:

  push-email-notify.yml  — matches the estate ruling that push-email is
                           removed except for three named dual-use repos.

Content conflicts — kept this branch's structure (the point of the PR), then
adopted origin/main's newer action pins so #24/#25 are not regressed:

  governance.yml, trope-check.yml  pin-only conflicts -> took origin/main
  release.yml, dogfood-gate.yml    structural -> kept branch, re-pinned

Verified: every workflow parses as YAML and declares at least one live job,
so no new startup_failure is introduced.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@hyperpolymath
hyperpolymath merged commit 3ffd80e into main Jul 27, 2026
36 of 42 checks passed
@hyperpolymath
hyperpolymath deleted the fix/consolidate-dogfood-gate branch July 27, 2026 13:29
hyperpolymath added a commit that referenced this pull request Jul 27, 2026
…I job (#28)

Follow-up to #27, which merged before these two fixes were pushed.
Without them
`main` is red on `🔴 Gate: Static analysis` and `CI / required`.

## 1. `.envrc` — Hypatia critical `secret_detected`

#27 turned the Hypatia step in `static-analysis-gate.yml` from a **fake
gate**
into a real one. Before #27 it passed without ever scanning, via three
separate
routes:

- `continue-on-error: true` on the scanner build,
- `if: steps.build.outputs.ready == 'true'` skipping the scan when that
build failed,
- `echo "[]" > hypatia-findings.json` overwriting unparseable output
with an empty array.

#27 pins the scanner to a commit, verifies the SHA, builds it properly,
and fails
on critical findings. It went red because it **started working** — this
is not a
regression.

The first thing it caught:

```
.envrc:24   # export API_KEY="..."
```

A commented-out placeholder, so a false positive — but the fix is to
stop writing
assignment-shaped comments rather than to suppress the finding. The
guidance is
kept in prose, pointing at the gitignored `.env`.

The scan also reports **7 `high`** findings (`instant-sync.yml`,
`build/setup.sh`,
`src/interface/ffi/src/main.zig` ×2, and duplicates). Those do not gate
and are
left for separate triage rather than being swept in here.

## 2. `ci.yml` — Zig setup failed inside the Idris2 container

The pinned `idris2-pack` image ships no `xz` binary, so `setup-zig`'s
`.tar.xz`
download died:

```
tar (child): xz: Cannot exec: No such file or directory
Error: The process '/usr/bin/tar' failed with exit code 2
```

Installs `xz-utils` first, guarded by a `command -v` check so it is a
no-op on
images that already have it.

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

Co-authored-by: Claude Opus 5 <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