Commit 320df2d
feat: drive NQC through Phase 1-4 — tests, spec, ABI/FFI, polish
Phase 1 — 128 unit tests across database, formatter, client, and main
module. Promoted key utility functions to pub for testability.
Phase 2 — EBNF grammar (spec/grammar.ebnf) covering meta-commands,
protocol wire format, CLI arguments, and output formatting. Formal
specification (spec/SPEC.core.scm) defining type system, protocol
invariants, registry semantics, and correctness guarantees. 19
conformance tests verifying spec invariants.
Phase 3 — Idris2 ABI with dependent type proofs for ports, non-empty
strings, URL paths, format roundtrip, and memory layout alignment.
Zig FFI (32 tests) implementing CSV escape, semicolon stripping, URL
construction, query body building, and status classification.
Phase 4 — Custom profile JSON loading from nqc-profiles.json. Persistent
query history (~/.nqc_history) with search. In-memory LRU query cache
with mutation bypass. ANSI keyword highlighting. New meta-commands:
\history, \search, \clearcache. 43 additional tests.
Total: 190 Gleam + 32 Zig = 222 tests, all passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 0c18c24 commit 320df2d
File tree
29 files changed
+4125
-92
lines changed- nqc
- ffi/zig
- src
- test
- spec
- src
- abi
- nqc
- test
- conformance
- nqc
29 files changed
+4125
-92
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
0 commit comments