Skip to content

Update for SuperDB v0.4.0, add CI for docs and recipes - #105

Merged
chrismo merged 3 commits into
mainfrom
ccr-d7b2b2b0-e2b6at
Nov 1, 2026
Merged

chrismo merged 3 commits into
mainfrom
ccr-d7b2b2b0-e2b6at

Conversation

@chrismo

@chrismo chrismo commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Summary

Updates all docs, tutorials, and recipes for SuperDB v0.4.0, and adds CI so the next release upgrade is "bump one file, fix what fails."

SuperDB v0.4.0 content

  • Upgrade guide: new "Changes in v0.4.0" section and ~20 quick-reference rows: unified BSUP (with a migration path tested against real v0.3.0/v0.4.0 binaries), pools → tables, db attach/detach, input format from file extension, static type checking, has()/missing()/quiet() → is_ok()/ok(), option types and none, greatest()/least(), time → timestamp, the fuse/blend rename swap, flatten()/paths(), new SUP set/map/named-type syntax. Lists known issues.
  • Expert guide: updated in place, plus new sections on option types, missing-field handling, method-style calls, -- args, and the persistent database (new expert:database slug).
  • Recipes: ::time → ::timestamp, sk_keys built on keys(), sk_array_append([], x) no longer returns a none-typed union, skdoc metadata casts to "skdoc" (bare <skdoc> is no longer an implicit named type).
  • Tutorials: SQL joins use is null, SQL on JSON uses -static, super_db_update rewritten as a tested tables walkthrough, and several pre-existing doc bugs fixed (collect-first query in moar_subqueries, sup_to_bash IFS output, single-quoted SUP data in bash_to_sup, typeof() comparisons, round() output).

skdoc parser fix (affects skops and the MCP server)

The regex-based skdoc parser silently dropped examples whose text contained brackets or braces. 11 recipes (sk_keys, sk_merge_records, sk_add_ids, sk_array_*, ...) showed no examples in skops / super_recipes. It also truncated three descriptions at escaped quotes and didn't decode escapes. It's replaced with a small parser for the SUP subset skdoc uses, and a new test checks it against super's own evaluation of every skdoc record.

CI

  • .github/workflows/test.yml: on push to main and on PRs, installs the SuperDB release pinned in .superdb-version, then runs typecheck, npm test, and npm run test:docs
  • scripts/install-super.sh: installs an official super release (linux/darwin, amd64/arm64)
  • scripts/mdtest.mjs: dependency-free runner following superdb/super's mdtest conventions; replaces needing a Go build of super for test-doc.sh
  • src/docs.test.ts: every doc's superdb_version must match the pin
  • Recipe example assertions canonicalize expected output with super, run concurrently (106s → 35s), and now cover every recipe with examples
  • vitest.config.ts limits tests to src/ so stale dist/ copies don't run

Test plan

  • npm test: 109 passed locally against v0.4.0
  • npm run test:docs: 70/71 pass locally; the chess tutorial fetches from lichess.org, which is blocked in the dev sandbox but should work in Actions
  • Doc suite run 20× and debug.md 30× to flush out order-dependent examples (two debug operators interleave nondeterministically in v0.4.0; those examples now sort stderr)
  • Mutated an expected recipe output to confirm the suite fails
  • Watch the first CI run; the fork streaming demo in debug.md is timing-sensitive on small runners

Known upstream issues (filed here for now)

After merge

Bump the package version and npm publish, then bump @chrismo/superkit in superdb-mcp. Its super_db_* tools also need updating for v0.4.0 (-lake is rejected, pools are now tables).


Generated by Claude Code

Every mdtest, skdoc example, and runnable doc snippet was re-run against
the official v0.4.0 release binary.

Upgrade guide: new "Changes in v0.4.0" section and quick-reference rows
covering unified BSUP (with a tested migration path), pools -> tables,
db attach/detach, file-extension input formats, static type checking,
ok()/is_ok() replacing has()/missing()/quiet(), option types and none,
greatest()/least(), time -> timestamp, the fuse/blend rename swap,
flatten()/paths(), and the new SUP set/map/named-type syntax. Lists
known issues observed in v0.4.0.

Expert guide: updated in place for the same changes, plus new sections
on option types, missing-field handling, method-style calls, -- args,
and the persistent database (new "database" section slug).

Recipes: ::time -> ::timestamp, sk_keys built on keys(), sk_array_append
avoids a none-typed union on [], and skdoc metadata casts to "skdoc"
since <skdoc> is no longer an implicit named type (parser accepts both).

Tutorials: SQL joins use `is null`, SQL on JSON uses -static, debug
streaming demo pins -i sup and -unbuffered, super_db_update rewritten
as a tested tables walkthrough, and several pre-existing doc bugs fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PmeX9cMYrm5ZcCFq3zZtuD
…ream issues

The miscount seen with piped numbers comes from the JSON reader splitting
top-level numbers at 512 KiB buffer boundaries (files too), not from stdin
auto-detection. Also link full outer join to upstream #6310 and note the
timestamp subtraction regression of #1792.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PmeX9cMYrm5ZcCFq3zZtuD
CI (.github/workflows/test.yml) installs the SuperDB release pinned in
.superdb-version and runs the typecheck, the recipe tests, and every
mdtest example in docs/. Moving to a new SuperDB release is now: bump
.superdb-version and fix what fails.

- scripts/install-super.sh: installs an official super release binary
- scripts/mdtest.mjs: dependency-free runner following superdb/super's
  mdtest conventions (bash -e -o pipefail, combined output, fails, head);
  `npm run test:docs`
- src/docs.test.ts: every doc's superdb_version must match the pin

The skdoc parser used regexes that silently dropped any example whose
text contained brackets or braces (11 recipes showed no examples in
skops or the MCP server), truncated descriptions at escaped quotes, and
didn't decode escapes. It's now a small parser for the SUP subset skdoc
uses, and a new test checks it against super's own evaluation of every
skdoc record. Example assertions canonicalize the expected output with
super instead of string munging, run concurrently, and now cover all
recipes with examples.

Doc fixes found by the stricter runs: debug.md examples with two debug
operators sort their stderr (v0.4.0 interleaves them nondeterministically)
and write to the test's working dir instead of /tmp; sk_fields example
stores \\t so it decodes to the query text users should type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PmeX9cMYrm5ZcCFq3zZtuD
@chrismo
chrismo merged commit 68b9665 into main Nov 1, 2026
1 check passed
@chrismo
chrismo deleted the ccr-d7b2b2b0-e2b6at branch November 1, 2026 02:15
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