Skip to content

Commit 7301294

Browse files
avrabeclaude
andcommitted
feat: vendor real eclipse-score rust_kvs + verify gate that runs bazel tests
Replaces the toy 80-line in-memory KVS with the actual eclipse-score rust_kvs sources (Apache-2.0, vendored verbatim at vendor/rust_kvs/) plus a tiny no-op shim for score_log/baselibs_rust at vendor/score_log_shim/. The vendored crate compiles natively under bazel rust_library and runs all 244 of its upstream unit tests via bazel rust_test. tools/verify.py is no longer a stub. It reads each comp-req artifact's new `verified-by:` list (`<bazel-target>:<test-fn-name>` entries), discovers tests via the bazel target binary's --list, then invokes `bazel test --test_arg=--exact --test_arg=<name>` per entry. PASSED / FAILED / MISSING reflects real bazel-test outcomes. Adds tests/surface/surface_tests.rs — one #[test] per comp-req that asserts the upstream's verbatim RST text against the vendored impl. Honest finding (clean-room-verified across both Rust and C++ sources): comp_req__kvs__key_naming (alphabet [A-Za-z0-9_-]) and comp_req__kvs__key_length (32-byte cap) are documented but unenforced and untested. The gate goes red on those two comp-reqs; that's the LS-N demonstration vs. coverage-wedge reporting. CI collapses into a single job that installs bazelisk, runs rivet validate, bazel build, and make verify. Final gate output: 4 PASSED, 2 FAILED, 0 MISSING. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1b12c12 commit 7301294

32 files changed

Lines changed: 6727 additions & 205 deletions

.cargo-shim/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Empty stub so cargo doesn't try to compile src/lib.rs (which depends
2+
// on Bazel-generated `kvs_component_bindings` and cannot be built by
3+
// plain cargo). The cargo-shim crate only exists for crate_universe's
4+
// external-dep resolution; see /Cargo.toml header.

.github/workflows/validate.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
# example-kvs CI — runs the two gates that work without spar/sigil
2-
# installed: rivet validate (typed-artifact graph check) and the
3-
# artifact-driven verification gate (tools/verify.py).
1+
# example-kvs CI — single job that runs the three gates:
2+
# 1. `rivet validate` typed-artifact graph check
3+
# 2. `bazel build //...` AADL → WIT → wit-bindgen → WASM component
4+
# 3. `python tools/verify.py` artifact-driven verification gate
5+
# (drives bazel test per comp-req's verified-by entries)
46
#
5-
# No untrusted input is used in any run: block; all commands are
6-
# static make targets / pinned installs.
7+
# Note: CI may go RED on purpose. The verify gate runs surface tests
8+
# against the vendored eclipse-score rust_kvs sources. Some of those
9+
# tests assert spec compliance the upstream impl does not enforce;
10+
# when that's the case, the test FAILs and the gate FIREs. That is
11+
# the LS-N demonstration vs. "green-CI-by-default" coverage-wedge
12+
# reporting. See README.md "What this gate measures" for details.
713

814
name: validate
915

@@ -18,8 +24,8 @@ permissions:
1824
contents: read
1925

2026
jobs:
21-
validate-pinned:
22-
name: rivet validate + artifact-driven verification gate
27+
validate:
28+
name: rivet + bazel + verify
2329
runs-on: ubuntu-latest
2430
steps:
2531
- uses: actions/checkout@v4
@@ -34,25 +40,19 @@ jobs:
3440
- name: Install PyYAML for verify.py
3541
run: pip install pyyaml
3642

37-
- name: rivet validate (typed-artifact graph check)
38-
run: make validate
39-
40-
- name: artifact-driven verification gate
41-
run: make verify
42-
43-
bazel-wasm-component:
44-
name: bazel build (AADL → WIT → wasm component)
45-
runs-on: ubuntu-latest
46-
steps:
47-
- uses: actions/checkout@v4
48-
4943
- name: Set up bazelisk
5044
uses: bazel-contrib/setup-bazel@0.9.1
5145
with:
5246
bazelisk-version: "1.x"
5347

54-
- name: bazel build //... (WIT → wit-bindgen → rust_component → .wasm)
48+
- name: rivet validate (typed-artifact graph check)
49+
run: make validate
50+
51+
- name: bazel build (AADL → WIT → wit-bindgen → wasm component)
5552
run: bazel build //...
5653

57-
- name: bazel test //... (rust_wasm_component_test)
58-
run: bazel test //... --test_output=errors
54+
- name: artifact-driven verification gate (real bazel test per artifact)
55+
# verify.py shells out to `bazel test --test_arg=--exact …` per
56+
# entry in each comp-req's verified-by list. Honest signal: red
57+
# iff any comp-req has FAILED or MISSING evidence.
58+
run: make verify

0 commit comments

Comments
 (0)