Skip to content

Commit 5dffa52

Browse files
committed
docs: reframe wishlist 3a/3c/3g as one headless-conformance effort
Chris pushed back on the §3c framing "turns examples/*.bas into a regression suite" — most examples are gfx demos, interactive RPG loops, music demos, or visual tutorials that need a window / user gesture / event loop. ASSERT alone doesn't make them CI-runnable. Updated all three entries to make the actual shape explicit: - §3a `--json-status` flag: structured exit JSON, useful alone, also the third leg of the conformance trio - §3c ASSERT primitive: enables a new headless `conformance/` corpus written for CI, NOT a retrofit of `examples/`. Examples and conformance are two separate audiences in two separate directories - §3g shared conformance suite: layout sketch (string/, json/, dict/, http/, fileio/), tagged by feature for partial-runs, runs in both native CLI and basic-wasm node harness. Suggested first deliverable is `conformance/string/escapes.bas` paired with §1a's docs update — one small script proves the §3a + §3c + §3g loop end-to-end
1 parent 440562b commit 5dffa52

1 file changed

Lines changed: 38 additions & 6 deletions

File tree

docs/haversack-wishlist.md

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,25 @@ When chasing handle-leak / lifetime bugs in tools, having a way to dump the curr
119119

120120
Listed in `notehub/docs/TOOLS.md` under "Debugging + triage > RGC-side asks that would make this easier". Replicated here so this wishlist is self-contained:
121121

122-
### 3a. `--json-status` flag on native CLI (2026-05-22)
122+
### 3a. `--json-status` flag on native CLI (2026-05-22, reframed 2026-05-23)
123123

124-
Final stdout line as structured JSON: `{"exit": N, "reason": "...", "line": N}`. Trivialises CI assertions in any host (bash, node, PHP) and fills in the Haversack auto-report template cleanly.
124+
Final stdout (or stderr) line as structured JSON: `{"exit": N, "reason": "...", "line": N, "assert_msg": "..."}`. Trivialises CI assertions in any host (bash, node, PHP) and fills in the Haversack auto-report template cleanly.
125+
126+
**Reframed 2026-05-23:** this is one leg of a three-part "headless conformance" effort. Pairs with §3c (ASSERT primitive) and §3g (conformance corpus). When all three ship, CI runs `basic --json-status conformance/foo.bas`, the script uses `ASSERT` to gate behaviour, and the final JSON line gives CI a structured pass/fail without `grep`-on-stdout. Each piece is useful alone (e.g. 3a is useful for any existing script today), but the real payoff is the trio.
125127

126128
### 3b. `RGCVERSION$()` builtin (2026-05-22)
127129

128130
Returns the build's version string. Tools and tests can branch on minimum version (`IF RGCVERSION$() < "2.1.3" THEN PRINT "needs 2.1.3+"`). Bug reports compare against runtime version automatically.
129131

130-
### 3c. `ASSERT cond, msg$` primitive (2026-05-22)
132+
### 3c. `ASSERT cond, msg$` primitive (2026-05-22, reframed 2026-05-23)
133+
134+
Halts with structured exit if `cond` is false. Records `msg$` so a CI driver (or §3a's `--json-status`) can report which assertion fired.
135+
136+
**Reframed 2026-05-23 (Chris flagged):** the original entry claimed this "turns the existing `examples/*.bas` corpus into a regression suite". That overpromises — most examples are gfx demos, interactive RPG loops, music demos, or visual tutorials that need a window / user gesture / event loop. Realistically maybe 30-40% of `examples/*.bas` is headless-friendly today. ASSERT alone doesn't make the rest runnable in CI.
131137

132-
Halts with structured exit if `cond` is false. Turns the existing `examples/*.bas` corpus into a regression suite without rewriting them as a separate test framework.
138+
What ASSERT actually enables is **a new `conformance/` corpus written specifically to be headless** (see §3g) — short scripts that exercise one feature each, assert expected values, exit with structured status via §3a. The `examples/` directory stays as "demos / tutorials for humans". Two audiences, two directories.
139+
140+
So the right way to read 3a + 3c + 3g is "ship the three legs together as a single CI-conformance effort", not "retrofit examples".
133141

134142
### 3d. Source line in runtime error messages (2026-05-22) — **PROMOTED 2026-05-23 (next-up)**
135143

@@ -145,9 +153,33 @@ Mirrors `#OPTION JSON STRICT`. Tools forget to check `HTTPSTATUS()` constantly;
145153

146154
Drives the WASM bundle via emscripten's Node bindings, captures `Module.print`, returns exit code. Same harness shape as the native CLI, so both build targets share one CI matrix.
147155

148-
### 3g. Shared conformance suite (2026-05-22)
156+
### 3g. Shared conformance suite (2026-05-22, reframed 2026-05-23)
157+
158+
Set of headless `.bas` scripts in `rgc-basic/conformance/` tagged by feature (JSON-read, JSON-write, DICT, HTTP$, HTTPFETCH, FOREACH, string-escapes, etc.). Each script ends with structured pass/fail via §3a's `--json-status` and uses §3c's `ASSERT`. Haversack pulls + runs against its bundled WASM as a regression gate. One regression corpus, both projects benefit, no drift between what RGC tests and what Haversack relies on.
159+
160+
**Reframed 2026-05-23:** explicitly *separate from* `examples/` — examples are demos for humans (gfx, music, RPG, interactive tutorials, many of which can't be CI-driven). Conformance is short, headless, asserts-on-known-output, runs in both native CLI and `basic-wasm` node harness (§3f). Tag scripts by feature so Haversack can run a subset matching the features it actually uses, and rgc-basic can run the full set in its own CI.
161+
162+
Suggested layout:
163+
164+
```
165+
conformance/
166+
README.md # how to run, tagging convention, exit-code contract
167+
string/
168+
escapes.bas # ASSERT "a\"b" produces a"b ; \n produces newline ; etc.
169+
midstr_edge.bas
170+
json/
171+
read_basic.bas
172+
write_strict.bas # uses #OPTION JSON STRICT
173+
dict/
174+
push_path.bas
175+
foreach_pairs.bas
176+
http/
177+
status_mocked.bas # against a tiny local server or recorded fixture
178+
fileio/
179+
bytes_roundtrip.bas
180+
```
149181

150-
Set of `.bas` scripts in `rgc-basic/conformance/` tagged by feature (JSON-read, JSON-write, DICT, HTTP$, HTTPFETCH, FOREACH, etc.). Haversack pulls + runs against its bundled WASM as a regression gate. One regression corpus, both projects benefit, no drift between what RGC tests and what Haversack relies on.
182+
Practical first deliverable: ship `conformance/string/escapes.bas` alongside the §1a docs update — that gives Haversack a concrete CI gate for the escape behaviour it already depends on, and proves the §3a/§3c/§3g loop end-to-end with one small script.
151183

152184
## 4. Runtime / host integration
153185

0 commit comments

Comments
 (0)