Prove the semver and solver kernel instead of testing it
Rolling Release / build (push) Successful in 1m39s
Rolling Release / publish (push) Successful in 8s

Move number parsing, version ordering and constraints, version sorting and
solver literals into src/kernel, with contracts checked by moon prove under
overflow-checked integers. Replace the semver behaviour tests with those
proofs, keep tests for string parsing, and run the proofs in CI.

Version numbers are now 64-bit: the old parser silently wrapped at 2^31.
Drop pick_tag, which only tests called.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Opus 5.5 committed 2026-11-30 16:56:21 -08:00
1 parent 2d815bbb75
commit 83e694c6c4
16 files changed
+874 -330

No files matched your search

+7 -2
View File
@@ -172,7 +172,8 @@ linked-in functions instead.
```sh
moon build --target native --release
moon test --target native # semver / manifest unit tests
moon test --target native # unit and mock-registry tests
just prove # proofs of src/kernel (needs an SMT solver: z3, cvc5 or alt-ergo)
# the binary is _build/native/release/build/main/main.exe
```
@@ -213,6 +214,10 @@ orbit upgrade orbit
## Layout
`src/kernel/` holds the code whose behaviour is proved rather than tested: number
parsing, version ordering and constraints, sorting, and solver literals. See its
[README](src/kernel/README.md).
```
src/main/
stub.c C glue: time, termios echo toggle, getenv, symlink, stderr, exit
@@ -220,7 +225,7 @@ src/main/
sha256.mbt streaming FIPS 180-4 SHA-256 (+ tests)
auth.mbt credentials store (~/.orbit/auth.json + Docker config fallback)
oci.mbt OCI Distribution v2 HTTP transport, Bearer/Basic auth, redirects
semver.mbt versions, relational/compound constraints, tag selection (+ tests)
semver.mbt versions, relational/compound constraints, parsing over src/kernel (+ tests)
model.mbt orbit.json / state.json / config.json (+ tests)
registry.mbt OCI registry ops: tags, resolve, cached manifests, fetch, publish, login
solver.mbt lazy Resolvo-style CDCL SAT solver & UNSAT explainer (+ tests)