ci: run tree-sitter FFI gate on a container-safe nix runner #359
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/prolog-rlm!359
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/tree-sitter-runner-labels"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Runtime invariant
The tree-sitter CI gate must run the real FFI build and the full native
test suite in the environment the runtime is actually built against (the
pinned nixpkgs flake), not a divergent apt environment. Runner jobs on
this Forgejo instance execute in Docker containers without systemd, so
Nix is installed with
--init noneand the daemon is spawned directly.Diagnosis (infra vs job code)
The failures were job code, not runner infrastructure:
tree-sitter-python-srcandtree-sitter-javascript-srcdo not existon ubuntu-24.04 (reproduced locally in a stock ubuntu:24.04 container:
apt exit 100).
(runs 77/86), and
ci.yml/pack-install.ymlstayed green on the samerunner fleet throughout - the fleet and labels were never the problem.
already carried the broken package list, so every PR merge ref
inherited it. After #349 merged, push runs on main fail as well.
Changes
.github/workflows/tree-sitter.yml: replace the apt lane withnix develop(container-safe Nix install:--init none+ directdaemon spawn, then FFI build, grammar fixture links, full suite,
whitespace check).
flake.nix: addpkg-configto the devShell (without it the Makefilesilently produced a foreign library with undefined tree-sitter
symbols); add an
incompatible-abigrammar fixture derivation (thenix lane never built it, failing two tests); pin
LANG/LC_ALL=C.UTF-8(locale-less containers mis-decoded non-ASCIItest literals, failing two more tests).
test/rlm_project_query_test.pl: fixread_only_project_root_is_a_structured_failure- it never registereda grammar (could only fail with
source_parse_failed, never theexpected
kb_unwritable) and its chmod lockout does not apply to theroot user CI runs as; the KB root is now blocked by a regular file,
deterministic in any environment.
Non-goals
nix.ymlitself (same container/systemd installer rootcause; follow-up slice).
model configuration on this instance).
Verification evidence
container with a fresh Nix install: 65/65 tree-sitter suite tests
green (machine-recorded in
.prolog/facts.kb).test/run_tests.pl1179/1179,test/check_runtime.pl,test/load_all.pl,git diff --checkallgreen.
Follow-up
nix.yml.instance-gated.
0d79941df88f0515da4123b9aff