From 1bd8d355b45e891ddf293f540dccf30eb9f6c4a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 16 Feb 2026 10:50:43 +0000 Subject: [PATCH] update port-astgen skill: full test in Phase 0, fix corpus search pattern Co-Authored-By: Claude Opus 4.6 --- stage0/.claude/skills/port-astgen/SKILL.md | 25 ++++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/stage0/.claude/skills/port-astgen/SKILL.md b/stage0/.claude/skills/port-astgen/SKILL.md index e3c782f1ce..be30a673e8 100644 --- a/stage0/.claude/skills/port-astgen/SKILL.md +++ b/stage0/.claude/skills/port-astgen/SKILL.md @@ -25,20 +25,27 @@ edit `astgen.c`. The worker handles all of that. ## Phase 0: Check for leftovers -Before enabling anything new, run the existing tests: +Before enabling anything new, run the **full** test suite: ```sh cd ~/code/zig -./zig3 build test-zig0 -Dzig0-cc=tcc 2>&1 | head -20 +./zig3 build all-zig0 -Dvalgrind > /dev/null 2>&1 ; echo "EXIT: $?" ``` -If tests **FAIL**: dispatch a worker (Step 4 below) with context -describing the failure — no test was "enabled", just paste the first -~20 lines of output and tell the worker existing tests are failing. -After the worker returns, follow Steps 5–7 as normal. Re-run Phase 0 -until existing tests pass before proceeding to the main loop. +Also check for failures: -If tests **PASS**: proceed to the main loop. +```sh +./zig3 build all-zig0 -Dvalgrind 2>&1 | grep -iE 'FAIL|error:' | head -5 +``` + +If EXIT is non-zero or any FAIL/error lines appear: dispatch a worker +(Step 4 below) with context describing the failure — no test was +"enabled", just paste the output and tell the worker existing tests are +failing. After the worker returns, follow Steps 5–7 as normal. Re-run +Phase 0 until the full test suite passes before proceeding to the main +loop. + +If EXIT is 0 with no failures: proceed to the main loop. ## Main Loop @@ -58,7 +65,7 @@ Pick the first one. Note the test name (the `test "..."` header above the skip line) and the line number. **Priority B — Commented corpus entries:** -If no SkipZigTest lines exist, search for lines matching `//.{ "` inside +If no SkipZigTest lines exist, search for lines matching `//"..\` inside the `corpus_files` tuple (between `const corpus_files = .{` and `};`). Pick the first one. Note the file name and line number.