Repository navigation
feat(conformance): cost_bodies suite with self-relative scan-cost ceilings - #77
Merged
Merged
Conversation
rennf93
force-pushed
the
feat/cost-parity-corpus
branch
3 times, most recently
from
October 5, 2026 10:52
ee84873 to
40ac14a
Compare
rennf93
force-pushed
the
feat/cost-parity-corpus
branch
5 times, most recently
from
October 5, 2026 12:16
431a436 to
7026424
Compare
…lings Adds the 9-case cost_bodies corpus suite (large-body verdict parity across the truncation cap, reference-generated expectations) and a cost-budget runner enforcing self-relative scan-cost ceilings: each run anchors on its own best-of-N at the 8 KiB workload and every other workload must stay under 5x its linear projection + 250 ms, so gross superlinearity fails CI on any host while fixed overhead and host speed stay tolerated. The corpus was grafted onto the shipped 4.3.0-generation index (the upstream corpus generator currently emits 4.2.0-generation files; the suite header here is bumped to match the shipped generation). Measured on this host: 3.4 ms at 8 KiB, 36.3 ms at 256 KiB, 105.7 ms at 1 MiB - all far under ceiling. Also includes a guard-core-benchmark example reproducing the numbers. Note: the conformance lib tests require the pattern-probe child binary; build it for the active profile first (cargo build -p guard-core-engine --bins).
rennf93
force-pushed
the
feat/cost-parity-corpus
branch
from
October 5, 2026 12:16
7026424 to
002ec41
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the cross-engine cost-parity program: the same 9-case cost_bodies corpus suite now runs in all five engines (Python reference, Go, TS, PHP, Rust), enforcing two invariants per push:
Measured here: 3.4 ms @ 8 KiB, 36.3 ms @ 256 KiB, 105.7 ms @ 1 MiB.
Reviewer notes:
cargo build -p guard-core-engine --binsbeforecargo test -p guard-core-conformance --lib. CI builds all bins already.Local gates: cargo test -p guard-core-conformance --lib 78/78 green (with probe built), cost runner green, clippy/fmt untouched files only.