SPEC-005: elephant vocabulary layer (vocab/define, near-miss advisory, provenance) #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the SPEC-005 vocabulary layer: a read-only projection over the
closure that names a theory's predicate families, their roles and
classification, their documentation, and a producer-side near-miss advisory —
plus the
vocabanddefineCLI verbs. Also carries the SPEC-002 0.1.3additive extension to the daemon append contract that ferries the advisory.
What's in it
core::vocab(pure core): family resolution (CON-402), the built-inregistry (REQ-404), documentation records (REQ-402/CON-401), the vocabulary
view (REQ-401/CON-403), redefinition provenance (REQ-407), and the near-miss
advisory computation (REQ-406). Everything is a projection over an
already-computed
Closure— it never influences admission or conclusions.elephant vocab(REQ-401 view surface) andelephant define(REQ-403 validating producer), plus the REQ-405 documentation join in
why-not/require.against a cached reference view before the append; the advisory rides the
amended SPEC-002 CON-101 contract as a query parameter (
?advice=false) sothe request body stays byte-identical against pre-extension daemons.
and
daemon statuscounters.Review hardening
Several adversarial and self-review rounds are folded in, each fixing verified
correctness gaps — e.g. bounding the witness-join to avoid an exponential
Cartesian blow-up (NFR-401), keeping the advisory-control query parse
infallible so a malformed value never fails the append (REQ-406), never
holding the reference-view lock across disk I/O, refreshing the reference view
after p2p sync, and making the sole-fact advisory gate count top-level forms.
CLI diagnostics fixes (this branch's tail)
Two user-visible CLI gaps found in an agent tour:
{error, detail}body is now surfaced instead of an opaque"status code 400" (ureq drops the body on its own);
statusno longer renders(not not X)(a double-negation the parserrejects), so a status line pastes cleanly into
explain.These pair with three companion fixes in
spindle-rust(
explain/what-if/why-notdiagnostics for variable-headed rules) alreadymerged there.
Verification
Full elephant suite: 199 passed, 2 ignored.
cargo clippy --all-targetsclean;
cargo fmt --checkclean. Property tests cover family resolution andmerge-order determinism; the daemon advisory path has live end-to-end tests.
🤖 Generated with Claude Code