Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
d5ebe89
Add TypeAliasInfo.body: the syntactic alias body for naming-env const…
aallan Aug 6, 2026
0cdd7e2
Add vera/naming.py: the one total slot/family naming renderer (#1208,…
aallan Aug 6, 2026
6422a70
Prove vera/naming.py renders what the checker renders: the differenti…
aallan Aug 6, 2026
1ae8b36
The checker delegates its two naming entry points to vera/naming (#1208)
aallan Aug 6, 2026
b480a55
Thread the naming environment into every subsystem that will render (…
aallan Aug 6, 2026
fcc72af
Bound ADT visibility by declaration index in naming envs (#1208)
aallan Aug 6, 2026
80c2e1c
Every subsystem renders slot names through vera/naming (#1208)
aallan Aug 7, 2026
36daa4b
Explain-slots, LSP, and call-site messages adopt the one renderer (#1…
aallan Aug 7, 2026
e63c8b0
Composite alias cells collapse to one State/Exn family (#1209)
aallan Aug 7, 2026
7e21da9
Tester alias resolution, helper slot tables, dead-API removal, docs (…
aallan Aug 7, 2026
2ef01ed
Promote the #1208/#1209 probe shapes to conformance; retire their probes
aallan Aug 7, 2026
1d95b92
Hand every renderer the env the checker rendered under (#1208)
aallan Aug 7, 2026
57766fc
Make alias resolution total, and converge the last duplicated derivat…
aallan Aug 7, 2026
cd3849e
Harden the naming gates and make the docs describe what they do (#1208)
aallan Aug 7, 2026
36911ae
KNOWN_ISSUES: row for #1221, re-point the decreases-i64 limitation at…
aallan Aug 7, 2026
97b0f2d
Round-2: one-push alias resolution, surviving-forall post scope, chai…
aallan Aug 7, 2026
29c83a5
Round-3: per-namespace decl order, unpinned-callee env, callee-scoped…
aallan Aug 7, 2026
1018218
KNOWN_ISSUES: rows for #1225 and #1226 (round-4 discoveries)
aallan Aug 7, 2026
00511d4
Round-5: pair the source scope at the mono-clone emission door (#1208)
aallan Aug 7, 2026
2217a11
Import WasmTrapError from the public codegen.api surface (PR #1224 re…
aallan Aug 7, 2026
6645e9f
Merge pull request #1224 from aallan/fix/1208-1209-naming-module
aallan Aug 7, 2026
7154686
Docs: correct the five naming claims that misinform a reader (#1213)
aallan Aug 7, 2026
565c81f
Docs: give the naming architecture a home (#1213)
aallan Aug 7, 2026
2215494
Gate the counts and the document that had drifted unwatched (#1213)
aallan Aug 7, 2026
b1b590d
Make the forall-shadowing example show the difference it claims (#1213)
aallan Aug 7, 2026
669662b
Make the naming-docs sweep say only what the code does (#1208)
aallan Aug 7, 2026
ae1a7b0
List the gates and codes the toolchain actually has (#1208)
aallan Aug 7, 2026
3136707
CLAUDE.md: the diagnostic registry has W codes too
aallan Aug 7, 2026
45c545a
Read the Test Suite counts from the Test Suite section (#1208)
aallan Aug 7, 2026
da70f7a
TESTING: the scripts table's execution-scope sentence matches reality
aallan Aug 7, 2026
e8d39d9
TESTING: venue-neutral execution-scope sentence
aallan Aug 7, 2026
b0031c2
TESTING: the dependency-audit row matches the workflow
aallan Aug 7, 2026
8517a86
Merge pull request #1230 from aallan/docs/naming-architecture-sweep
aallan Aug 7, 2026
7964dec
Make bare effect-op resolution deterministic and source-ordered (#1215)
aallan Aug 7, 2026
622d257
Lower a clause body's bare ops against the enclosing context (#1211)
aallan Aug 7, 2026
2a7f2c5
Register State/Exn families from every handler position (#1210)
aallan Aug 7, 2026
9efe17e
Resolve an effect's TYPE ARGUMENTS in source order too (#1215 sibling)
aallan Aug 7, 2026
89d54ca
CHANGELOG: cite #1231 for the type-argument determinism sibling
aallan Aug 7, 2026
a3bd7e6
Round-3: register every handler position, and refuse what codegen can…
aallan Aug 7, 2026
f3fea80
architecture.svg: the source comments carry the seven-stage numbering…
aallan Aug 7, 2026
1bec6e8
Round-5: walk every lowered position, and compare families in one spe…
aallan Aug 7, 2026
ece4e4d
Round-7: one derivation for every boundary-guard route (#1210)
aallan Aug 7, 2026
fd8a29f
KNOWN_ISSUES: rows for #1229, #1234, #1235
aallan Aug 7, 2026
0a64ae7
Round-9: field-keyed walker obligations, structural rows all the way …
aallan Aug 7, 2026
b27a67e
Merge pull request #1232 from aallan/fix/1210-1211-1215-handler-seman…
aallan Aug 7, 2026
563235d
Make the type-name mangler total over canonical renderings (#1219)
aallan Aug 7, 2026
f59f6b0
Name a function-type-carrying cell by its resolution (#1219)
aallan Aug 7, 2026
6c4cb23
Give a refined State/Exn cell its own family (#1218)
aallan Aug 7, 2026
2020949
Render cell-family predicates in canonical source form (#1218 review)
aallan Aug 7, 2026
60bc2fc
Render the cell key structurally, not canonically (#1218 review round 2)
aallan Aug 7, 2026
43dca44
Make the two coverage gates hold what they claim (#1238 review tail)
aallan Aug 7, 2026
c157483
Merge pull request #1238 from aallan/fix/1218-1219-family-mangling
aallan Aug 7, 2026
ded95dd
Quote an imported callee's clause out of the file that declared it (#…
aallan Aug 7, 2026
124521d
Read an imported callee's contract in its own module's registry too (…
aallan Aug 7, 2026
d90648f
Bind a refinement predicate under the key its own reference resolves …
aallan Aug 7, 2026
c2e6f01
Demote a generic callee's call-site precondition instead of dropping …
aallan Aug 7, 2026
4d9c5fa
Give a module's registry its own imports, and its diagnostics its own…
aallan Aug 7, 2026
508d7fc
Say what the binder walk, the drains, and the corpus diff actually do
aallan Aug 7, 2026
6f00fa7
KNOWN_ISSUES: rows for #1243, #1244, #1245 (fix-round discoveries)
aallan Aug 7, 2026
68eb106
Give an obligation the file its line number belongs to
aallan Aug 7, 2026
d59a430
Close the review round's test-guard and rendering findings
aallan Aug 7, 2026
327162b
Blank every comment form, and keep the synthesised location joinable
aallan Aug 8, 2026
98ee2c4
Merge pull request #1239 from aallan/fix/1220-1225-1226-verifier-xmod
aallan Aug 8, 2026
24e8ba9
Close the closure-lift seam: ordering, cycles, tuple components (#124…
aallan Aug 8, 2026
b5c5ef9
Lower a @Byte literal at i32 wherever a join puts it (#1212)
aallan Aug 8, 2026
5c6bcda
Pin the closure-id hand-back between the two lift passes (#1245)
aallan Aug 8, 2026
66cd738
Drop the closed #1212 from the #1213 roadmap row
aallan Aug 8, 2026
a83eaf8
Remove examples/hello.txt, a run artifact committed by accident
aallan Aug 8, 2026
c691879
Build the sweep's corpus origins in POSIX form, not str()
aallan Aug 8, 2026
b0946ed
Pin the lift guard's chain key, cover the ninth Byte boundary, widen …
aallan Aug 8, 2026
f6ca9f0
Make the @Byte return a marking boundary; correct two overclaims
aallan Aug 8, 2026
3d88a3f
Track the syntactic-head pointer classification as #1255
aallan Aug 8, 2026
733a7d4
Track the apply_fn signature-width derivation as #1256
aallan Aug 8, 2026
da38ff3
Weight the chain-keying oracles, drive the literal match arm, pin the…
aallan Aug 8, 2026
d13e041
Merge pull request #1250 from aallan/fix/c3-lowering
aallan Aug 8, 2026
33af10b
Document the obligation-stream partition `verify --json` emits (#1242)
aallan Aug 8, 2026
477ca95
Substitute a parameterised alias APPLICATION in the verifier's resolv…
aallan Aug 8, 2026
cc6154a
Skip a `vera test` target whose input constraints do not translate (#…
aallan Aug 8, 2026
d44b167
Stop a zero-size call argument from collapsing the call summary (#1214)
aallan Aug 8, 2026
62aafac
Correct the #1214 corpus figures, the #1229 quote, and five review fi…
aallan Aug 8, 2026
b1934c4
Render a Unit literal as `()` in obligation descriptions (#1248)
aallan Aug 8, 2026
ea23562
Make a Tier-3 refinement disclosure name its actual cause (#1251)
aallan Aug 8, 2026
1dbfbf6
Tell the two non-verdicts apart, and correct the text around them
aallan Aug 8, 2026
467a146
Close the structural pin's escape hatches, and finish the taxonomy sweep
aallan Aug 8, 2026
bb35f8e
Re-point the Byte citation, tighten two E506 reads, qualify the skip'…
aallan Aug 8, 2026
4c3c3fa
Complete the rebase onto d13e0411: KNOWN_ISSUES union and oracle counts
aallan Aug 8, 2026
56c0da1
Merge pull request #1247 from aallan/fix/c2-verifier-precision
aallan Aug 8, 2026
1cabfba
Internalize the prelude's type aliases into the reserved namespace (#…
aallan Aug 8, 2026
2c0e150
Order an imported ADT where its own module declared it (#1227)
aallan Aug 8, 2026
8d81b1f
Track the ADT-membership residual as #1253
aallan Aug 8, 2026
9dd8273
Round-1 review: close the reserved namespace at the binder (#1221)
aallan Aug 8, 2026
50ab9ab
Complete the rebase onto 56c0da17: roster unions and oracle counts
aallan Aug 8, 2026
6970c71
Pin the second alias rendering, and correct two stale descriptions
aallan Aug 8, 2026
1c94d03
Merge pull request #1254 from aallan/fix/c4-namespace
aallan Aug 8, 2026
cd32636
Sync main into release/v0.1.10: mutmut 3.6.0 -> 3.7.0 (#1264)
aallan Aug 10, 2026
a888fbf
Sync main into release/v0.1.10: the #1222 citation hotfix (#1267)
aallan Aug 10, 2026
c526e5b
Decide a concrete refined narrowing; name the E531/E504 causes (#1251)
aallan Aug 10, 2026
2d0dbbf
Sync main into release/v0.1.10: js-yaml 4.3.0 -> 4.3.1 (#1266)
aallan Aug 10, 2026
6a1a39b
Obligate throw's payload like every other narrowing site (#1268)
aallan Aug 10, 2026
e478097
Round-1 review: vacuous discharge, a structural op gate, honest enume…
aallan Aug 10, 2026
996c2de
Round-2: cover the undecided-reachability leg, name its question
aallan Aug 10, 2026
ef7c04c
Merge pull request #1270 from aallan/fix/c5-decidable-inits
aallan Aug 10, 2026
3718b81
Single-source the effect-op result table across discovery and rewrite…
aallan Aug 10, 2026
58dc60e
Rescan generic-under-generic helper clones for their own callees (#1223)
aallan Aug 10, 2026
32f02c1
Route an imported clone's body calls through its declaring module (#1…
aallan Aug 10, 2026
03adbe6
Check every module's bodies under its own import filter (#1244)
aallan Aug 10, 2026
b711e2e
Scope codegen's ADT membership to the owning namespace + its imports …
aallan Aug 10, 2026
cf741a8
Retire the six closed routing rows from KNOWN_ISSUES and ROADMAP
aallan Aug 10, 2026
f4c5070
Rebase resolution: oracle-derived counts, regenerated site assets
aallan Aug 10, 2026
4e31d5d
Review round 1: membership infrastructure, base-runnable #1253 test, …
aallan Aug 10, 2026
4e9b33d
Verify pass: soften the union claim, drop a baseline coupling, pin th…
aallan Aug 10, 2026
9d83df1
Merge pull request #1272 from aallan/fix/c1-routing
aallan Aug 10, 2026
c118863
Resolve declared types at three closure and effect boundaries
aallan Aug 10, 2026
db40f7c
Complete the one-derivation claim at the return-guard gates
aallan Aug 10, 2026
834d3e1
Trim the six-sites justification to its operative fact
aallan Aug 10, 2026
15a7121
Make the refinement-exclusion control able to go red
aallan Aug 10, 2026
9fec373
Reconcile the count-bearing prose with C1's merge
aallan Aug 10, 2026
2974d49
Merge pull request #1273 from aallan/fix/c7-widths
aallan Aug 10, 2026
710fa19
Give module generics one clone namespace, one instantiation rule
aallan Aug 12, 2026
800bd2d
Fold adversarial round 1: primitives, the module hop, one shared input
aallan Aug 12, 2026
6e29fcf
Complete the visibility predicate, and make two controls do their job
aallan Aug 12, 2026
e13b928
Scope the qualified-only sentence to what an importer can actually call
aallan Aug 12, 2026
3a7e928
Merge pull request #1280 from aallan/fix/c8-clone-namespace
aallan Aug 12, 2026
4249907
Reserve the prelude namespace in every declaration namespace
aallan Aug 12, 2026
3936c53
Keep tier hints in their own file, and name the Byte range
aallan Aug 12, 2026
3632122
One multi-module fixture builder, and ignore the litter where it lands
aallan Aug 12, 2026
20f00cc
Adversarial round 1: true rationales, real paths, no leaks
aallan Aug 12, 2026
0921a7d
Make uri_to_path total, and one range verdict per literal
aallan Aug 12, 2026
c8ed1d2
A path-less document is analysed alone, not against the CWD
aallan Aug 12, 2026
f30e353
Reconcile the count-bearing prose and rosters with C8's merge
aallan Aug 12, 2026
efb8f5f
Keep relative paths whole, publish the module-aware errors
aallan Aug 12, 2026
2d1ffaf
Close the handle before unlinking it, on every path
aallan Aug 12, 2026
402c40b
Merge pull request #1282 from aallan/fix/c6-hygiene
aallan Aug 12, 2026
e46fd81
Release v0.1.10
aallan Aug 12, 2026
2bf3cc7
Name the temp file the leak check is about
aallan Aug 12, 2026
bb9f25f
Close the release round's real findings and correct the stale prose
aallan Aug 12, 2026
619e4aa
Table the review round's four filed discoveries
aallan Aug 12, 2026
58555ed
Assert the deep-chain check is clean and refresh the measured counts
aallan Aug 12, 2026
0827b5b
Merge pull request #1283 from aallan/release/v0.1.10
aallan Aug 12, 2026
2cd72e0
fix(spec,tooling): align Chapter 10's EBNF rule names with the Lark g…
chethanuk Aug 11, 2026
abf5a50
Make the grammar gate's waiver premises able to fail
aallan Aug 13, 2026
74a0b4a
Reserve `resume` as a function name, as spec 1.4 already required
aallan Aug 13, 2026
acd9a8f
Finish the terminal audit this PR started on RESUME
aallan Aug 13, 2026
4c786c0
Stop a rejected `resume` accusing the handlers it shadowed
aallan Aug 13, 2026
ee6e5e9
Merge pull request #1279 from chethanuk/docs/issue-683-grammar-alignm…
aallan Aug 13, 2026
9b905e0
Put the in-scope slot table in the E130 error (#558, option (a))
chethanuk Aug 7, 2026
7fa6a0f
Show §6.2's live E130 output and read its two columns
aallan Aug 13, 2026
232119a
Cap the slot table, and pin what it leaves out
aallan Aug 13, 2026
7d80291
Pin the slot-table cap by equality, not by a floor
aallan Aug 13, 2026
64742de
Correct the FAQ slot ordering and the README code-registry scope
aallan Aug 13, 2026
cae2b96
Merge pull request #1262 from chethanuk/feat/issue-558-e130-slot-table
aallan Aug 13, 2026
2a55063
Bound vera/addEffect propagation at handlers (#725)
chethanuk Aug 8, 2026
f628d9f
Pin the two boundary facts, and restore the by-design row
aallan Aug 13, 2026
a96ce50
Merge pull request #1259 from chethanuk/fix/issue-725-lsp-handler-awa…
aallan Aug 13, 2026
649eabe
test: cover browser runtime Map/Set/Decimal/Json host imports (#349)
chethanuk Aug 7, 2026
92985f3
Pin the case the browser renderer destroys, and say what it really br…
aallan Aug 13, 2026
8c198b8
Table the two runtime divergences the coverage battery found
aallan Aug 13, 2026
109faf3
Bring the Bugs table current with the tracker
aallan Aug 13, 2026
ea030aa
Make two browser tests discriminate, and reconcile the parity prose
aallan Aug 13, 2026
e8dd51e
Merge pull request #1258 from chethanuk/test/issue-349-browser-runtim…
aallan Aug 13, 2026
47e52f3
ci: gate editor grammars against the effect registry
chethanuk Aug 7, 2026
7a9c145
Hold the grammar gate to the tree it is checking, and test what it gates
aallan Aug 13, 2026
d4c114f
Document the CI step this PR added to the lint job
aallan Aug 13, 2026
b230a68
Gate TESTING.md's CI lint row against the job it describes
aallan Aug 13, 2026
32897c3
Merge pull request #1257 from chethanuk/ci/issue-1156-editor-grammar-…
aallan Aug 13, 2026
4f3137c
feat(inference): add xAI Grok provider
chethanuk Aug 7, 2026
622e6fd
Default every provider to its vendor's flagship model
aallan Aug 13, 2026
f630346
Track #1263 on the CI, process, and tooling thread
aallan Aug 13, 2026
55cdab8
Reconcile the counts against main, and close two review findings
aallan Aug 13, 2026
c46551a
Close five review findings, four of them documentation
aallan Aug 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ jobs:
- name: Check spec code blocks parse correctly
run: python scripts/check_spec_examples.py

- name: Check spec EBNF and Lark grammar agree on rule names (#683)
run: python scripts/check_grammar_alignment.py

- name: Check README code blocks parse correctly
run: python scripts/check_readme_examples.py

Expand All @@ -159,6 +162,9 @@ jobs:
- name: Check FAQ code blocks parse correctly
run: python scripts/check_faq_examples.py

- name: Check DE_BRUIJN.md code blocks parse correctly
run: python scripts/check_debruijn_examples.py

- name: Check PYPI_README code blocks parse, check, and verify
run: python scripts/check_pypi_readme_examples.py

Expand All @@ -171,6 +177,9 @@ jobs:
- name: Check no unexpected [E602]/[E604] silent skips (Layer 1 of #626)
run: python scripts/check_e602_clean.py

- name: Check editor grammars and READMEs carry every built-in effect (#1156)
run: python scripts/check_editor_grammars.py

- name: Check every diagnostic carries rationale/fix/spec_ref (#682)
run: python scripts/check_diagnostic_fields.py

Expand Down
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,13 @@ node_modules/
# interrupted run can strand one in the repo root. Backstop only — the checkers
# now write to the system tempdir, not here.
/tmp*.vera

# Run artifacts from the example corpus. `examples/file_io.vera` writes the
# RELATIVE path `hello.txt`, and the host resolves it against the process CWD
# — so the documented invocation `vera run examples/file_io.vera` from the
# repository root drops it in the ROOT, and running it from inside `examples/`
# drops it there. Both are ignored; a `git add -A` has twice picked the root
# one up. It is output, not source. (`scripts/check_examples.py` only checks
# and verifies, so it produces neither; `pytest tests/` leaves the tree clean.)
/hello.txt
/examples/hello.txt
37 changes: 36 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ repos:
pass_filenames: false
files: '(examples/README\.md$|examples/.*\.vera$)'

# The six doc-block gates below read the inline vera:skip fence
# The seven doc-block gates below read the inline vera:skip fence
# annotations via scripts/doc_annotations.py (#538), so an edit to
# that shared module (or the gate script itself) re-runs the gate.
- id: readme-examples
Expand Down Expand Up @@ -108,6 +108,13 @@ repos:
pass_filenames: false
files: '(FAQ\.md$|vera/.*\.py$|vera/grammar\.lark$|scripts/(check_faq_examples|doc_annotations)\.py$)'

- id: debruijn-examples
name: de bruijn examples
entry: .venv/bin/python scripts/check_debruijn_examples.py
language: system
pass_filenames: false
files: '(DE_BRUIJN\.md$|vera/.*\.py$|vera/grammar\.lark$|scripts/(check_debruijn_examples|doc_annotations)\.py$)'

- id: pypi-readme-examples
name: pypi readme examples
entry: .venv/bin/python scripts/check_pypi_readme_examples.py
Expand All @@ -132,6 +139,34 @@ repos:
pass_filenames: false
files: '(\.md$|vera/environment\.py$|vera/prelude\.py$)'

# #683 — fails when a rule name exists in spec/10-grammar.md's EBNF but
# not in vera/grammar.lark, or the other way round. Chapter 10 is the
# published map of the parse tree and drifted from it: the spec still
# called the assertion forms assert_stmt/assume_stmt after they became
# expressions, and three Lark rules (pure_effect, effect_set,
# with_clause) appeared in no EBNF block at all. Rule names only — the
# bodies are not compared.
- id: grammar-alignment
name: grammar rule-name alignment
entry: .venv/bin/python scripts/check_grammar_alignment.py
language: system
pass_filenames: false
files: '(vera/grammar\.lark$|spec/10-grammar\.md$|scripts/check_grammar_alignment\.py$)'

# #1156 — fails when an editor grammar under editors/, or one of the two
# extension READMEs that repeat the list in prose, omits a built-in
# effect name. Both enumerate them by hand and drifted four effects
# behind the registry silently (an unknown capitalised name just falls
# through to the generic type rule), so nothing failed when adding an
# effect skipped them. Triggered by the effect registry as well as
# the grammars, since a new effect is what puts them out of date.
- id: editor-grammars
name: editor grammars
entry: .venv/bin/python scripts/check_editor_grammars.py
language: system
pass_filenames: false
files: '(editors/.*|vera/environment\.py$|vera/introspect\.py$|scripts/check_editor_grammars\.py$)'

# Layer 1 of #626 — fails when any compile of an example or
# conformance program emits [E602] (body unsupported) or
# [E604] (param unsupported) outside the explicit allowlist
Expand Down
14 changes: 8 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Read `SKILL.md` for the full language reference. It covers syntax, slot referenc

### Conformance programs as reference

The conformance suite in `tests/conformance/` contains 179 small, self-contained programs — often one per language feature — that serve as minimal working examples (most are fully self-contained; the cross-module programs of Chapters 7–9 import companion `_lib`/module fixtures). Each positive program must pass its declared verification level (see `manifest.json` for mappings: `parse`, `check`, `verify`, or `run`); the twenty-five negative fixtures (`ch02_generic_over_unit_rejected`, `ch02_map_unit_value_rejected`, `ch04_let_unit_rejected`, `ch05_apply_fn_arity`, `ch05_decreases_float_rejected`, `ch05_reserved_fn_name_rejected`, `ch05_reserved_keyword_fn_rejected`, `ch05_where_helper_outer_slot_rejected`, `ch07_handler_state_body_scope_rejected`, `ch07_old_outside_ensures_rejected`, `ch07_state_unit_op_param_read_rejected`, `ch08_circular_import`, `ch08_reserved_vera_prefix_rejected`, `ch08_visibility_private`, `ch09_builtin_effect_redefinition_rejected`, `ch09_builtin_redefinition`, `ch09_ord_adt_rejected`, `ch09_eq_non_derivable_rejected`, `ch09_sql_injection_rejected`, `ch09_sql_placeholder_mismatch_rejected`, `ch09_sql_placeholder_let_mismatch_rejected`, `ch09_sql_numbered_placeholder_rejected`, `ch07_bare_effect_op_rejected`, `ch06_quantifier_array_domain_rejected`, `ch07_handler_state_type_mismatch_rejected`) instead must *fail* `check` with the E-code in their `expected_error` field. When you need to see how a specific construct works (e.g. effect handlers, match expressions, closures), check the corresponding conformance program before reading the spec.
The conformance suite in `tests/conformance/` contains 214 small, self-contained programs — often one per language feature — that serve as minimal working examples (most are fully self-contained; the cross-module programs of Chapters 7–9 import companion `_lib`/module fixtures). Each positive program must pass its declared verification level (see `manifest.json` for mappings: `parse`, `check`, `verify`, or `run`); the thirty-two negative fixtures (`ch02_generic_over_unit_rejected`, `ch02_map_unit_value_rejected`, `ch04_let_unit_rejected`, `ch05_apply_fn_arity`, `ch05_decreases_float_rejected`, `ch05_reserved_fn_name_rejected`, `ch05_reserved_keyword_fn_rejected`, `ch05_reserved_resume_fn_rejected`, `ch05_where_helper_outer_slot_rejected`, `ch07_handler_state_body_scope_rejected`, `ch07_old_outside_ensures_rejected`, `ch07_state_unit_op_param_read_rejected`, `ch08_circular_import`, `ch08_reserved_vera_prefix_rejected`, `ch08_reserved_vera_prefix_reference_rejected`, `ch08_reserved_vera_prefix_binder_rejected`, `ch08_reserved_vera_prefix_effect_rejected`, `ch08_reserved_vera_prefix_ability_rejected`, `ch08_reserved_vera_prefix_constructor_rejected`, `ch08_visibility_private`, `ch09_builtin_effect_redefinition_rejected`, `ch09_builtin_redefinition`, `ch09_ord_adt_rejected`, `ch09_eq_non_derivable_rejected`, `ch09_sql_injection_rejected`, `ch09_sql_placeholder_mismatch_rejected`, `ch09_sql_placeholder_let_mismatch_rejected`, `ch09_sql_numbered_placeholder_rejected`, `ch07_bare_effect_op_rejected`, `ch06_quantifier_array_domain_rejected`, `ch07_handler_state_type_mismatch_rejected`, `ch02_alias_cycle_rejected`) instead must *fail* `check` with the E-code in their `expected_error` field. When you need to see how a specific construct works (e.g. effect handlers, match expressions, closures), check the corresponding conformance program before reading the spec.

### Workflow

Expand Down Expand Up @@ -52,7 +52,7 @@ vera version # Print the installed version (also --version,
vera lsp # Serve LSP over stdio (needs the [lsp] extra; see LSP_SERVER.md)
vera builtins [--json] # List the built-in function registry (no file needed)
vera effects [--json] # List the effect and ability registry (no file needed)
vera errors [--json] # List the diagnostic error-code registry E001–E702 (no file needed)
vera errors [--json] # List the diagnostic-code registry: E001–E702 + W001/W002 (no file needed)
```

See [TOOLCHAIN.md](TOOLCHAIN.md) for the CLI cookbook — driving the toolchain to write, verify, test, run, and debug Vera, including the `builtins`/`effects`/`errors` introspection commands.
Expand Down Expand Up @@ -134,13 +134,15 @@ The `verify --json` output includes a verification summary:
}
```

Alongside it, an `obligations` array carries one entry per reified proof obligation (`kind`, `status`, `description`, `location`). The summary is derived from that array by `status` — `verified` counts as `tier1_verified`, `tier3`/`timeout` as `tier3_runtime`, and `total` is their sum. Reproduce the counts by *filtering on `status`*, not by taking the array's length: a `violated` or `tier3_unguarded` obligation discharged to no tier, so it is counted nowhere and is surfaced as an error or warning diagnostic instead. On a program with one refuted contract, `total: 2` beside a three-entry array is the expected partition.

### Essential rules

1. Every function needs `requires()`, `ensures()`, and `effects()` between the signature and body
2. Use `@Type.index` to reference bindings (`@Int.0` = most recent Int, `@Int.1` = one before)
3. Declare all effects: `effects(pure)` for pure functions, `effects(<IO>)` for IO, `effects(<Http>)` for network, `effects(<Inference>)` for LLM calls
4. `Http.get(@String.0)` and `Http.post(@String.0, @String.1)` return `Result<String, String>`; match the result
5. `Inference.complete(@String.0)` returns `Result<String, String>`; requires `VERA_ANTHROPIC_API_KEY`, `VERA_OPENAI_API_KEY`, `VERA_MOONSHOT_API_KEY` (Kimi), or `VERA_MISTRAL_API_KEY` to run; provider auto-detected from whichever key is set. See [`ENVIRONMENT.md`](ENVIRONMENT.md) for the full env-var reference, including `VERA_INFERENCE_PROVIDER` / `VERA_INFERENCE_MODEL` overrides
5. `Inference.complete(@String.0)` returns `Result<String, String>`; requires `VERA_ANTHROPIC_API_KEY`, `VERA_OPENAI_API_KEY`, `VERA_MOONSHOT_API_KEY` (Kimi), `VERA_MISTRAL_API_KEY`, or `VERA_XAI_API_KEY` (Grok) to run; provider auto-detected from whichever key is set. See [`ENVIRONMENT.md`](ENVIRONMENT.md) for the full env-var reference, including `VERA_INFERENCE_PROVIDER` / `VERA_INFERENCE_MODEL` overrides
6. Recursive functions need a `decreases()` clause
7. Match expressions must be exhaustive
8. `DB.query` / `DB.execute` (effect `<DB>`) take a **literal** SQL string — a query assembled from a runtime value is a compile-time error (`E207`). Every runtime value goes through a `?` placeholder and the `Array<Option<String>>` params array (`DB.query("SELECT ... WHERE id = ?", [Some(@String.0)])`); a placeholder/params count mismatch with a literal params array is `E208`. The connection comes from `VERA_DB_URL` (default: in-memory SQLite) — see [`ENVIRONMENT.md`](ENVIRONMENT.md)
Expand Down Expand Up @@ -185,9 +187,9 @@ Each stage is a module with a single public API function (`parse_file`, `transfo
pytest tests/ -v # Run all tests (see TESTING.md)
pytest tests/test_conformance.py -v # Conformance suite only
mypy vera/ # Type-check the compiler
python scripts/check_conformance.py # All 179 conformance programs hold (positives pass; negatives fail with their E-code)
python scripts/check_conformance.py # All 214 conformance programs hold (positives pass; negatives fail with their E-code)
python scripts/check_examples.py # All 42 examples must pass
python scripts/check_corpus_canonical.py # All 227 corpus programs in canonical form
python scripts/check_corpus_canonical.py # All 262 corpus programs in canonical form
```

Test helpers follow a pattern: `_check_ok(source)` / `_check_err(source, match)` / `_verify_ok(source)` / `_verify_err(source, match)`. See existing tests for examples.
Expand All @@ -196,7 +198,7 @@ When implementing a new language feature, write the conformance program *first*

### Invariants

- All 179 conformance programs in `tests/conformance/` must hold at their declared level — positive entries pass, and the negative fixtures (`ch02_generic_over_unit_rejected`, `ch02_map_unit_value_rejected`, `ch04_let_unit_rejected`, `ch05_apply_fn_arity`, `ch05_decreases_float_rejected`, `ch05_reserved_fn_name_rejected`, `ch05_reserved_keyword_fn_rejected`, `ch05_where_helper_outer_slot_rejected`, `ch07_handler_state_body_scope_rejected`, `ch07_old_outside_ensures_rejected`, `ch07_state_unit_op_param_read_rejected`, `ch08_circular_import`, `ch08_reserved_vera_prefix_rejected`, `ch08_visibility_private`, `ch09_builtin_effect_redefinition_rejected`, `ch09_builtin_redefinition`, `ch09_ord_adt_rejected`, `ch09_eq_non_derivable_rejected`, `ch09_sql_injection_rejected`, `ch09_sql_placeholder_mismatch_rejected`, `ch09_sql_placeholder_let_mismatch_rejected`, `ch09_sql_numbered_placeholder_rejected`, `ch07_bare_effect_op_rejected`, `ch06_quantifier_array_domain_rejected`, `ch07_handler_state_type_mismatch_rejected`) must *fail* `check` with their `expected_error` E-code
- All 214 conformance programs in `tests/conformance/` must hold at their declared level — positive entries pass, and the negative fixtures (`ch02_generic_over_unit_rejected`, `ch02_map_unit_value_rejected`, `ch04_let_unit_rejected`, `ch05_apply_fn_arity`, `ch05_decreases_float_rejected`, `ch05_reserved_fn_name_rejected`, `ch05_reserved_keyword_fn_rejected`, `ch05_reserved_resume_fn_rejected`, `ch05_where_helper_outer_slot_rejected`, `ch07_handler_state_body_scope_rejected`, `ch07_old_outside_ensures_rejected`, `ch07_state_unit_op_param_read_rejected`, `ch08_circular_import`, `ch08_reserved_vera_prefix_rejected`, `ch08_reserved_vera_prefix_reference_rejected`, `ch08_reserved_vera_prefix_binder_rejected`, `ch08_reserved_vera_prefix_effect_rejected`, `ch08_reserved_vera_prefix_ability_rejected`, `ch08_reserved_vera_prefix_constructor_rejected`, `ch08_visibility_private`, `ch09_builtin_effect_redefinition_rejected`, `ch09_builtin_redefinition`, `ch09_ord_adt_rejected`, `ch09_eq_non_derivable_rejected`, `ch09_sql_injection_rejected`, `ch09_sql_placeholder_mismatch_rejected`, `ch09_sql_placeholder_let_mismatch_rejected`, `ch09_sql_numbered_placeholder_rejected`, `ch07_bare_effect_op_rejected`, `ch06_quantifier_array_domain_rejected`, `ch07_handler_state_type_mismatch_rejected`, `ch02_alias_cycle_rejected`) must *fail* `check` with their `expected_error` E-code
- All 42 examples in `examples/` must pass `vera check` and `vera verify`
- `mypy vera/` must be clean
- `pytest tests/ -v` must pass
Expand Down
Loading