Skip to content

test(ci): wire the 147 Idris2 + 186 Zig integration tests into CI; clear RSR template drift#97

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/gossamer-95-root-cause-rlhts0
Jul 1, 2026
Merged

test(ci): wire the 147 Idris2 + 186 Zig integration tests into CI; clear RSR template drift#97
hyperpolymath merged 2 commits into
mainfrom
claude/gossamer-95-root-cause-rlhts0

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Follow-up hygiene from the repo-wide audit (the same audit that produced the #82 rewrite). Two independent wins, each verified with the real toolchain, not asserted:

  • (a) Run the tests that already exist but never ran in CI. The 147 Idris2 ABI tests were only typechecked; the 186-case Zig integration suite was never wired into build.zig and, it turns out, never compiled. Both now build and pass, and both run in CI.
  • (b) Clear three RSR template-drift bugs the audit flagged (a live {{…}} placeholder, a stale repo identity, and a version drift).

Toolchain used locally: idris2 0.8.0 (Chez, matching abi-typecheck.yml) + zig 0.15.2 + GTK/WebKit (matching e2e.yml).

Changes

(a) CI test wiring — commit test(ci): …

  • abi-typecheck.yml — after typechecking shell+groove, idris2 --build + run gossamer-abi-tests147 passed, 0 failed. Path filters extended to tests/idris2/** and gossamer-abi-tests.ipkg.
  • e2e.yml + src/interface/ffi/build.zig — new test-integration step, run in the E2E job → 186 passed. Making test/integration_test.zig compile required:
    • main.zig re-exports its FFI submodules (csp/filesystem/ssg/groove/plugin/clipboard/dialog/tray) so a test/-rooted module can reach them through the gossamer module (Zig 0.15 forbids ../src imports across a module root — the reason it was never wired);
    • completing the export fnpub export fn migration on the C-ABI surface (identical C symbols, now Zig-visible) so the test can call them;
    • fixing three latent bugs the never-built suite hid: gossamer_notify returns u32 not Result; std.mem.zeroes(GossamerHandle) is rejected by Zig 0.15 (byte-zero the handle instead); the Result enum has 12 variants now, not 11 — and Zig main.zig and Idris2 Types.idr agree (verified: guard_locked=11GuardLocked=11).
  • Regression-checked: default test, test-display, test-android, and the libgossamer.so artifact all still build/pass.

(b) RSR drift — commit chore(rsr): …

  • bot_directives/methodology.a2ml — fill the {{PROJECT_UNIQUE_STRENGTH}} placeholder (the file's own reject-if-contains rule flags unresolved {{…}}).
  • ai/AI.a2ml — repo identity claimed to be rsr-template-repo; corrected to gossamer (also self-flagged by the same reject rule).
  • .well-known/groove/manifest.jsonservice_version 0.1.00.3.1 (matches the canonical root 0-AI-MANIFEST.a2ml).
  • .editorconfig — stale RSR-template-repo header → gossamer.

RSR Quality Checklist

Required

  • Tests pass (idris2 147/0; zig integration 186/0; default/display/android green)
  • Code is formatted (Zig edits are pub prefixes + submodule re-exports; consistent with house style)
  • Linter is clean (no new warnings)
  • No banned language patterns (Idris2 / Zig / YAML / a2ml / JSON only)
  • No unsafe blocks without // SAFETY: comments (none added)
  • No banned functions (believe_me, unsafeCoerce, Obj.magic, Admitted, sorry)
  • SPDX headers unchanged on all touched source files
  • No secrets, credentials, or .env files included

As Applicable

  • ABI/FFI changes validated (src/interface/abi/src/interface/ffi/ — the 186 integration tests now enforce result-code/ABI agreement in CI)
  • CHANGELOG — intentionally omitted (CI-plumbing + manifest hygiene; happy to add an entry if you'd prefer)

Testing

# abi-typecheck.yml flow, locally (idris2 0.8.0):
guard PASS · shell GREEN(11) · groove GREEN(4) · gossamer-abi-tests → 147 passed, 0 failed

# e2e.yml step, locally (zig 0.15.2 + GTK/WebKit):
zig build test-integration → 186 passed
zig build test / test-display / test-android → all green
zig build → libgossamer.so.0.3.0 (no regression)

Companion to the #82 rewrite (done separately, no code change). Deliberately scoped to CI plumbing + manifest hygiene — no product-behaviour change.

🤖 Generated with Claude Code

https://claude.ai/code/session_013Zg1kEsjSRpcf1wFBZyeNj


Generated by Claude Code

claude added 2 commits July 1, 2026 12:33
Both suites existed but never ran in CI (the Idris2 tests were only
typechecked; the Zig integration suite was never wired into build.zig and
in fact never compiled). Wire and green both, verified locally with the
real toolchain (idris2 0.8.0 + zig 0.15.2 + GTK/WebKit).

Idris2 (abi-typecheck.yml): after typechecking shell+groove, build and run
gossamer-abi-tests -> 147 passed, 0 failed. Path filters extended to
tests/idris2 and gossamer-abi-tests.ipkg.

Zig integration (e2e.yml + build.zig): add a `test-integration` step and
run it in the E2E job. Making test/integration_test.zig compile required:
- main.zig re-exports its FFI submodules (csp/filesystem/ssg/groove/plugin/
  clipboard/dialog/tray) so a test/-rooted module can reach them via the
  `gossamer` module (Zig 0.15 forbids ../src import across a module root);
- completing the `export fn` -> `pub export fn` migration on the C-ABI
  surface (identical C symbols; now Zig-visible) so the test can call them;
- fixing three latent bugs the never-built suite hid: gossamer_notify
  returns u32 not Result; std.mem.zeroes(GossamerHandle) is rejected by
  Zig 0.15 (byte-zero the handle instead); the Result enum has 12 variants
  now, not 11 (Zig main.zig and Idris2 Types.idr agree - verified).
Result: 186 passed; the default test/test-display/test-android steps and
the libgossamer artifact are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Zg1kEsjSRpcf1wFBZyeNj
…n drift

- methodology.a2ml: fill the {{PROJECT_UNIQUE_STRENGTH}} placeholder with
  gossamer's actual unique strength. The file's own reject-if-contains rule
  flags unresolved {{...}}, so this was a self-flagged bug.
- ai/AI.a2ml: the repo identity claimed to be `rsr-template-repo`; correct
  to `gossamer` (methodology.a2ml lists `rsr-template-repo` as a
  state-corruption marker, so this too was self-flagged).
- .well-known/groove/manifest.json: service_version 0.1.0 -> 0.3.1 to match
  the canonical root 0-AI-MANIFEST.a2ml version.
- .editorconfig: stale `RSR-template-repo` header -> `gossamer`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Zg1kEsjSRpcf1wFBZyeNj
@hyperpolymath hyperpolymath marked this pull request as ready for review July 1, 2026 13:16
@hyperpolymath hyperpolymath merged commit 3323ba7 into main Jul 1, 2026
22 of 23 checks passed
@hyperpolymath hyperpolymath deleted the claude/gossamer-95-root-cause-rlhts0 branch July 1, 2026 13:16
hyperpolymath added a commit that referenced this pull request Jul 1, 2026
…eal export

Rebases PR #95's honest-Foreign.idr fix (was 070010f) onto current main.
Replaces the placeholder %foreign surface — 8 of the 11 declared symbols had
no Zig definition (gossamer_init/free/process/get_string/process_array/
register_callback/is_initialized), the "phantom template" flagged as the
CRITICAL item of gossamer#82 — with the real exported C-ABI symbols. All 25
C:libgossamer %foreign declarations now resolve to an actual `export fn` in
src/interface/ffi/src/*.zig (verified 25/25 against main's Zig).

The remainder of PR #95 (ABI de-conflation, standards CI adoption, governance
docs, .machine_readable reorg, licensing) is superseded by work already merged
to main — #96 (de-conflation + split packages), #87/#97 (MPL-2.0 licensing),
#93 (reusable workflows), #78 (wiki) — and merging it as-is regresses those.
This reduces #95 to its one non-superseded contribution so it merges without
conflict or regression.

Verified with idris2 0.8.0: gossamer-abi + gossamer-groove --typecheck green,
147/147 ABI tests pass, ABI decoupling guard passes. Addresses the CRITICAL
item of gossamer#82.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Zg1kEsjSRpcf1wFBZyeNj
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.

2 participants