Added DRR and WFQ golden fixtures and wire them into CI.#100
Merged
Conversation
The lean-fixtures CI job built drr_check and wfq_check but never ran them on golden fixtures — only AQM and CUBIC had fixture scripts, so DRR/WFQ were exercised solely by the accept-only conformance matrix. In particular WFQ's class_count_ge_2 coverpoint (the ported `seen` accumulator path from #99) was not golden-tested anywhere. Add fixtures/drr and fixtures/wfq mirroring the CUBIC/AQM layout: an accept trace (captured verbatim from the CI conformance run) plus reject cases per checker, and --coverage-out golden fixtures. A hand-verified 2-class WFQ trace (simulator-generated, accept-by-construction) golden-tests class_count_ge_2. All .expected/.coverage.expected files are snapshots of real checker runs, not hand-written. Add run-{drr,wfq}[-coverage]-fixtures.sh (clones of the cubic/aqm runners) and four CI steps. No Lean source changes; checker behavior is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Use `mktemp -p .` (repo-local temp file) instead of the default `mktemp`, which honors $TMPDIR and fails with "Operation not permitted" under sandboxes that deny writes to the system temp dir. Applied to all three coverage runners (aqm/drr/wfq) for consistency. Works on both BSD (macOS) and GNU (CI) mktemp; temp files are removed each iteration and never land in the repo tree. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Closes a CI coverage gap left after the TraceSpec port (#99): the
lean-fixturesjob buildsdrr_checkandwfq_checkbut never ran them on golden fixtures — only AQM and CUBIC had fixturescripts. DRR/WFQ were exercised solely by the
protocol-tracesconformance matrix, which assertsaccept: truebut not exact checker output or coverage. In particular, WFQ'sclass_count_ge_2coverpoint — the
seenaccumulator introduced when WFQ moved ontoTraceSpecin #99 — was notgolden-tested anywhere.
This PR gives DRR and WFQ the same fixture coverage CUBIC/AQM have, plus
--coverage-outgoldenfixtures, including a 2-class WFQ trace that directly locks down the
class_count_ge_2/seenpath. No Lean source changes; checker behavior is unchanged. Test infrastructure only.
What's added
lean/fixtures/drr/drr_single_class_accept— the real trace emitted by the DRR CI conformance run, used verbatim; plus a.coverage.expectedgolden.drr_deficit_conservation_reject— schedule rowdeficit_bytes500→501→REJECT: line 3: deficit_bytes mismatch: got 501, expected 500.drr_class_id_out_of_range_reject— enqueue rowclass_id0→1→REJECT: line 2: class_id out of range.lean/fixtures/wfq/wfq_single_class_accept— the real emitted WFQ CI trace, verbatim; plus a.coverage.expectedgolden.wfq_two_class_accept— a 2-class trace (two flows, distinctclass_id); its.coverage.expectedcontainsclass_count_ge_2, golden-testing the portedseenaccumulator.wfq_finish_time_reject— enqueue rowfinish_time_ns1000000→2000000→REJECT: line 2: finish_time_ns mismatch: got 2000000, expected 1000000.wfq_depart_timing_reject— depart rowdeparture_time_ns→2000000→REJECT: line 4: departure_time_ns must equal time_ns on depart.Runner scripts (
lean/scripts/):run-drr-fixtures.sh,run-wfq-fixtures.sh(clones ofrun-cubic-fixtures.sh), andrun-drr-coverage-fixtures.sh,run-wfq-coverage-fixtures.sh(clones ofrun-aqm-coverage-fixtures.sh) — only the build target / binary / fixture dir differ.CI (
.github/workflows/leanguard.yml): four steps in thelean-fixturesjob after the CUBIC step. The build step already buildsdrr_check/wfq_check, so no other change.How the fixtures were produced
drr_events.csv/wfq_events.csv— valid by construction.wfq_checkaccepts by construction), avoiding hand-computing float finish/virtual times..expected/.coverage.expectedis a snapshot of an actual checker run, not hand-written (golden-master).Verification
ok:).wfq_two_class_accept.coverage.expectedcontainsclass_count_ge_2, proving theseenpath is now golden-tested.Notes
**/*.csvignore rule also covers the existing cubic/aqm fixtures, which are likewise tracked).configs/testgen/if preferred.🤖 Generated with Claude Code