OPEN-SOURCE SPECIFICATION · ENGINE PARITY v4.0.0 (MIT OR APACHE-2.0)

7-mode lexical wire formats, VCSF-36 64-tree classifier, and C11 native ABI.

The C11/C++17, Python and JavaScript engines share the claim, model and verdict specifications. The CLI and WebCrypto implementations verify Ed25519 receipts.

01 · 7-MODE LEXICAL-MASKED AUTOMATON · MAGIC 0x56434e44

Byte-exact 7-mode lexical classification up to VERICULL_MAX_CLAIMS = 32.

Vericull classifies every UTF-8 byte across 7 lexical states: CODE, LINE_COMMENT (supporting backslash-newline splicing), BLOCK_COMMENT, DOUBLE_STRING, bounded SINGLE_CHAR (preserving Rust lifetime parameters like <'a, 'b> while masking '"' and '\\'), Rust r#*"..."#* raw strings, and C++11 R"delim(...)delim" raw strings.

vcnd-v4-claim-schema.json — SARIF 2.1.0 properties.claims
{
  "ruleId": "CWE-362",
  "level": "error",
  "locations": [{ "physicalLocation": { "artifactLocation": { "uri": "pkg/raft/lease_renew.go" } } }],
  "properties": {
    "has_static_invariant": 1,
    "claims": [
      { "needle": "lease := node.currentLeasePtr()", "span_start": 0, "span_end": 0, "must_be_absent": 0 },
      { "needle": "lease.expiryUnixNano = proposedDeadline", "span_start": 0, "span_end": 0, "must_be_absent": 0 },
      { "needle": "node.mu.TryLock()", "span_start": 96, "span_end": 310, "must_be_absent": 1 }
    ]
  }
}

02 · VCSF-36 64-TREE GBDT & VCPC 4-SCOPE CATALOG

36 features (18 from the submitted source and claims, 18 from submitter-reported evidence), fixture-grouped 5-fold CV, and fail-closed float32 math.

VCSF-36 uses four nine-feature groups covering lexical boundaries, claim spans, guards and catalog matches, and reported sanitizer outcomes. The grouped five-fold evaluation on 480 synthetic records from 48 fixture families yielded OOF AUROC 0.9946 and F1 0.9500.

03 · VC-R04 WILSON LOWER-BOUND GATE & VERICULL-VCVD-V4

Wilson quorum and the canonical receipt payload.

The dynamic evidence gate requires at least four reported attempts and a Wilson 95% lower bound of 0.50. This signed reference example uses a synthetic fixture.

VERICULL-VCVD-V4 — Canonical UTF-8 preimage signed by RFC 8032 Ed25519
VERICULL-VCVD-V4
{"action_code":"ACTION_CULL","best_pattern_id":"VCPC-01-HPACK-SHADOW","best_pattern_overlap":8,"case_id":"VC-2026-401","claims":[{"must_be_absent":0,"needle":"hdr_buf = kmalloc(cap_len, GFP_KERNEL);","span_end":0,"span_start":0},{"must_be_absent":0,"needle":"memcpy(hdr_buf + dst_off, wire_src, copy_len);","span_end":0,"span_start":0}],"claims_passed":1,"claims_total":2,"comment_shadow_offsets":[-1,288],"failed_claim_index":1,"file_path":"src/http2/hpack_decoder.c","has_static_invariant":0,"highest_stage":-1,"matched_offsets":[124,-1],"provenance_seal_hash":"0xaf945cb54ebb13e9","repro_attempts":5,"repro_passes":0,"repro_quorum_met":false,"router_action":0,"source_snippet":"int hpack_emit_literal(u8 *wire_src, size_t dst_off, size_t copy_len, size_t cap_len) {\n    char quote_delim = '\"';\n    u8 *hdr_buf = kmalloc(cap_len, GFP_KERNEL);\n    if (!hdr_buf || dst_off + copy_len > cap_len)\n        return -EINVAL;\n    /* legacy unsafe path removed in v3.9:\n       memcpy(hdr_buf + dst_off, wire_src, copy_len); */\n    return hpack_checked_copy(hdr_buf, cap_len, dst_off, wire_src, copy_len, quote_delim);\n}\n","stage_code":"NONE","stage_mask":0,"sweep_digest_hex":"0xdd916352cc9e4eb3","telemetry":{"analysis_text":"Scanner flagged unchecked memcpy in hpack_emit_literal header literal decoder.","confidence":0.94,"sanitizer_log":"","severity":"critical","witness_log":""},"top_pattern_score":5.9388,"tp_probability":0.0092,"verdict_code":"CULLED_UNANCHORED_CLAIM","verdict_state":0,"vuln_class":"CWE-787: Out-of-Bounds Write","wilson_ci95":[0,0.4345]}

04 · 14 EDGE REST ENDPOINTS

Core adjudication, SARIF gating, KV keys, and all 5 Vericull Suite services.

Method & Path Auth Contract
GET /api/v1/healthPublicReports v4.0.0 engine, 64-tree hash, 5 suite services & KV status
POST /api/v1/tokens/issuePublicIssues free 500-call vc_oss_... key (ci-gate, kernel-lab, suite-api)
GET /api/v1/tokens/inspectBearerVerifies VERICULL-TOKEN-V4 & live quota_remaining
POST /api/v1/adjudicateOptional BearerAdjudicates & signs 1 dossier under VERICULL-VCVD-V4
POST /api/v1/sarif-gateOptional BearerChecks up to 50 SARIF 2.1.0 findings. Unresolved findings require review before CI can pass.
POST /api/v1/suite/auditOptional BearerService 1: Mechanized Audit Gate (VERICULL-SUITE-V4)
POST /api/v1/suite/arenaOptional BearerChecks submitted approval traces for guard markers
POST /api/v1/suite/rtl-proveOptional BearerChecks Verilog/SV source and evaluates reported regression quorum
POST /api/v1/suite/route-budgetOptional BearerEstimates panel review costs from supplied token budgets and rates
POST /api/v1/suite/memory-promoteOptional BearerService 5: Post-Mortem Memory Promoter
POST /api/v1/verifyPublicVerifies signed dossiers, bundles, attestations and suite receipts with the configured reference key
GET /api/v1/receipts/:idIssuing Bearer for workspace receiptsFetches a stored receipt. Receipts issued without a token are accessible by ID.
POST /api/v1/attestationsPublicSigns a self-declared deployment profile under VERICULL-ATTEST-V4. The declared fields are not measured.
GET /api/v1/attestations/:idPublic IDFetches the signed VC-OSS-... registration, including the contact email

05 · C11 NATIVE ABI (VERICULL_ABI_VERSION = 401) & LINEAGE

Cross-platform include/vericull_core.h (.dylib & .so) under MIT OR Apache-2.0.

include/vericull_core.h — ABI v401 excerpt
#define VERICULL_ABI_VERSION    401u
/* ABI 402 adds trusted lexer-mode selection, per-stage S3/S4 evidence with presence flags
 * (issuance semantics "vericull.stage-evidence.v2"), buffer-level lexer ambiguity reporting,
 * status-returning pattern recall and documented length caps. `vericull_abi_version()` returns
 * this value. */
#define VERICULL_ABI_VERSION_402 402u
#define VERICULL_NEEDLE_MAGIC   0x56434E44u /* "VCND": Vericull Claim Needle Descriptor */
#define VERICULL_VERDICT_MAGIC  0x56435644u /* "VCVD": Vericull Cryptographic Verdict Digest */
#define VERICULL_MAX_CLAIMS     32
#define VERICULL_MAX_NODES      32
#define VERICULL_NUM_FEATURES   36

int32_t vericull_adjudicate(
    const uint8_t* haystack,
    uint32_t haystack_len,
    const VericullClaim* claims,
    uint32_t num_claims,
    const VericullGBDTTree* trees,
    uint32_t num_trees,
    float base_score_logit,
    const float* features,
    uint32_t num_features,
    const uint8_t* query_bytes,
    uint32_t query_len,
    uint32_t query_cwe_id,
    const VericullPatternItem* patterns,
    uint32_t num_patterns,
    uint32_t repro_passes,
    uint32_t repro_attempts,
    int32_t  has_static_invariant,
    int32_t  stage_mask,
    VericullReport* out_report
);