-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathJustfile
More file actions
123 lines (93 loc) · 4.78 KB
/
Copy pathJustfile
File metadata and controls
123 lines (93 loc) · 4.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# hologram-ai task runner — the docs-as-code / BDD / V&V gate set.
# `just` with no args lists everything. `just vv` is the full local gate;
# CI mirrors it job-for-job (.github/workflows/ci.yml).
set dotenv-load := true
default:
@just --list
# Install the pre-push hook: the full V&V gate runs before every push.
install-hooks:
@printf '#!/bin/bash\nset -e\necho "pre-push: running the V&V gate (just vv)"\njust vv\n' > .git/hooks/pre-push
@chmod +x .git/hooks/pre-push
@echo "pre-push hook installed"
# ── Quality gates (each is also a CI gate) ──────────────────────────────────
# Format check (CI uses --check; locally `just fmt-fix` rewrites).
fmt:
cargo fmt --all --check
fmt-fix:
cargo fmt --all
# Clippy across all targets. Warnings are errors.
lint:
cargo clippy --workspace --all-targets -- -D warnings
# Unit + integration tests (includes the honesty meta-gate and the
# κ-materialization e2e witness).
test:
cargo test --workspace
# Rustdoc must build clean (docs-as-code).
doc:
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps
# ── BDD / conceptual model / oracles ────────────────────────────────────────
# The Rust Gherkin suites, default lane (pure/local/network witnesses).
# The runner is model-driven and fails on any skipped or undefined step.
bdd:
HOLOGRAM_AI_BDD_LANE=default cargo test -p hologram-ai-conformance --test bdd
# The ORT lane (needs ORT_DYLIB_PATH → ONNX Runtime v1.18.1).
bdd-ort:
HOLOGRAM_AI_BDD_LANE=ort cargo test -p hologram-ai-conformance --features conformance --test bdd
# The model lane (needs the pinned real model on disk; see architectures.yml).
bdd-model:
HOLOGRAM_AI_BDD_LANE=model cargo test -p hologram-ai-conformance --features conformance --test bdd
# The measured probes for `open` rows (non-gating; reported).
bdd-target:
HOLOGRAM_AI_BDD_LANE=target cargo test -p hologram-ai-conformance --test bdd
# The honesty meta-gate: model ⇄ features ⇄ witnesses coverage + status discipline.
honesty:
cargo test -p hologram-ai-conformance --test honesty -- --nocapture
# Every committed oracle artifact matches its recorded sha256 (offline).
oracles:
cargo run -q -p xtask -- oracle-verify
# Every pinned upstream (git revs, HF revisions, release tags) is live (online).
pin-check:
cargo run -q -p xtask -- pin-check
# Emit the conformance ledger.
report:
cargo run -q -p xtask -- report
# ── Structural / conformance / portability axes ─────────────────────────────
# The substrate-contract witnesses: ZA, ZM, CE, CF, LW, IM (isolated binaries).
structural:
cargo test --release -p hologram-ai-conformance --features=structural \
--test structural_ce --test structural_za --test structural_zm \
--test structural_cf --test structural_lw --test structural_im
# External-authority execution parity (needs ORT_DYLIB_PATH).
conformance-ort:
cargo test --release -p hologram-ai-conformance --features=conformance
# The runtime core builds no_std on wasm + embedded; the browser binding
# builds with wasm-pack.
portability:
cargo build --target wasm32-unknown-unknown -p hologram-ai-quant
cargo build --target wasm32-unknown-unknown -p hologram-ai-tokenizer --no-default-features
cargo build --target thumbv7em-none-eabi -p hologram-ai-quant
cargo build --target thumbv7em-none-eabi -p hologram-ai-tokenizer --no-default-features
cargo check --target wasm32-unknown-unknown -p hologram-ai-wasm
# No canonical-instance constant leaks into generic code.
anti-hardcode:
./scripts/anti-hardcode.sh
# ── The browser journey (S4) ────────────────────────────────────────────────
# Build the wasm binding into the web app.
wasm:
cd apps/web && pnpm wasm
# Install web deps.
web-install:
cd apps/web && pnpm install --frozen-lockfile
# Web unit tests (vitest).
web-unit:
cd apps/web && pnpm test
# The hermetic browser journey: download → compile → materialize → run →
# three-message handshake, in real Chromium against the fixture server.
journey:
cd apps/web && pnpm bdd
# The live journey against the pinned SmolLM2 (network + weights; scheduled lane).
journey-live:
cd apps/web && pnpm bdd:live
# ── The full local gate ─────────────────────────────────────────────────────
vv: fmt lint doc test bdd honesty oracles report anti-hardcode structural portability web-install web-unit wasm journey pin-check
@echo "V&V: all gates green."