You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: docs/haversack-wishlist.md
+38-6Lines changed: 38 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,17 +119,25 @@ When chasing handle-leak / lifetime bugs in tools, having a way to dump the curr
119
119
120
120
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:
121
121
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)
123
123
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.
125
127
126
128
### 3b. `RGCVERSION$()` builtin (2026-05-22)
127
129
128
130
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.
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.
131
137
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".
133
141
134
142
### 3d. Source line in runtime error messages (2026-05-22) — **PROMOTED 2026-05-23 (next-up)**
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.
147
155
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
status_mocked.bas # against a tiny local server or recorded fixture
178
+
fileio/
179
+
bytes_roundtrip.bas
180
+
```
149
181
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.
0 commit comments