Files
peltier.io/targets/tokei/target.toml
Claude 014e3b11d1 phase3: generalize trust layer for C/C++; wire cJSON target
Trust-layer generalization (zero-regression verified on tokei):
- TargetSpec [build] uses an explicit {out} isolation-dir placeholder
  instead of injected CARGO_TARGET_DIR, plus optional sanitizer/
  sanitizer_binary templates. Nothing assumes cargo anymore.
- verdict rebuild_pristine_baseline, sanitizer_check, and harnessd
  run_verdict candidate build all use {out} substitution. A target with
  no sanitizer build caps accepts at needs-human-review.
- tokei/comrak target.toml migrated to the {out} form (CARGO_TARGET_DIR=
  {out} + nightly ASan sanitizer command).

cJSON C target (v1.7.19, MIT):
- harness.c bench/golden driver (trust-layer; agent can patch workspace
  cJSON.c but not the rig), compiled with clang against the patched tree.
- 5.6 MB deterministic corpus (gen-corpus.sh) + MANIFEST/GOLDEN pins.
- gates = hermetic Unity/CTest suite (19 tests pass); sanitizer =
  ASan+UBSan; scripts/diff-fuzz-cjson.py for differential fuzzing.

coz causal profiler integration (SPEC §12):
- harness.c optional -DHOTPATH_COZ throughput progress point.
- scripts/install-coz.sh, coz-profile.sh, coz-summary.py; just coz/install-coz.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EcKPWQ3MQD4NdEHwar96u2
2026-07-11 18:17:26 +00:00

31 lines
1.4 KiB
TOML

# tokei — source-code statistics tool (Rust)
# Selection vs SPEC §6: CPU-bound line/language analysis (83% user time,
# single-threaded mode); upstream test suite; scriptable deterministic
# workload; MIT OR Apache-2.0; active, no dedicated perf team.
[source]
repo = "https://github.com/XAMPPRocky/tokei.git"
commit = "fa44e5194060305576514d59b850353643afbfc8" # v14.0.0
license = "MIT OR Apache-2.0"
[build]
baseline = "CARGO_TARGET_DIR={out} cargo build --release --manifest-path targets/tokei/workspace/Cargo.toml"
binary = "{out}/release/tokei"
sanitizer = "CARGO_TARGET_DIR={out} RUSTFLAGS='-Zsanitizer=address' cargo +nightly build --target x86_64-unknown-linux-gnu --manifest-path targets/tokei/workspace/Cargo.toml"
sanitizer_binary = "{out}/x86_64-unknown-linux-gnu/debug/tokei"
[bench]
# Single rayon thread: measurement first (SPEC conventions); the
# multi-thread mode is a playbook class-7 concern, not the baseline.
command = "RAYON_NUM_THREADS=1 {binary} --sort code corpora/tokei/input > /dev/null"
workload = "8 replicas of pinned progit + comrak/src trees, 221 MB, 4360 files, single rayon thread"
[gates]
tests = "cargo test --release --manifest-path targets/tokei/workspace/Cargo.toml"
golden = "RAYON_NUM_THREADS=1 {binary} --sort code corpora/tokei/input"
[corpus]
manifest = "corpora/tokei/MANIFEST.sha256"
root = "corpora/tokei/input/copy1"
golden_sha256 = "corpora/tokei/GOLDEN.sha256"