Skip to content

Add frozen DS4 W2 quality and context harness - #7

Open
OmarB97 wants to merge 1 commit into
kacper-daftcode:mainfrom
OmarB97:work/ds4-w2-3-eval-harness
Open

Add frozen DS4 W2 quality and context harness#7
OmarB97 wants to merge 1 commit into
kacper-daftcode:mainfrom
OmarB97:work/ds4-w2-3-eval-harness

Conversation

@OmarB97

@OmarB97 OmarB97 commented Jul 12, 2026

Copy link
Copy Markdown

Why

W2 quality claims need a frozen scorer, deterministic prompt set, explicit warmup/pool gates, and exact context-token admission. Ad hoc transcripts cannot distinguish a real sink from formatting-only mismatches or calibration attempts.

What changed

  • Adds the 40-item seeded quality harness and robust sink/semantic rescoring.
  • Adds exact prompt-token calibration and needle-context receipts.
  • Adds pool-gate and server-provenance schemas.
  • Adds committed unit fixtures for the known 32K behavior boundaries.

How to review

Read tools/ds4_eval/harness.py for frozen scoring and admission rules, then context_probe.py for tokenizer-only calibration versus inference. Review the tests alongside each module and confirm rejected calibration candidates cannot count as chat attempts.

Evidence

The harness produced the recorded comprehensive 120/120 semantic, zero-sink three-seed result and 3/3 exact 120K context series. The frozen-head supplement produced 80/80 semantic, zero sinks, 20/20 retry-free prewarms, four passing pool gates, and one exact deepest 120K request.

Verification

  • python3 -m pytest tools/ds4_eval/tests/test_context_probe.py tools/ds4_eval/tests/test_harness.py -q — 33 passed, 17 subtests passed
  • ruff check tools/ds4_eval
  • ruff format --check tools/ds4_eval
  • python3 -m py_compile tools/ds4_eval/*.py tools/ds4_eval/tests/test_context_probe.py tools/ds4_eval/tests/test_harness.py
  • git diff --check

Risks / gaps

The 40-item set is a frozen regression instrument, not a general benchmark. Live controller guard tests remain private because they embed deployment topology; the public watchdog contract is covered in the separate safety-probes PR.

Collaborators

  • Omar Baradei — operator and acceptance policy.
  • Codex — harness implementation, scoring review, and PR preparation.

9prodhi added a commit to 9prodhi/vLLM-Moet that referenced this pull request Jul 13, 2026
…sized-resume truncate, chmod fsync, no monitor/fd leak

Re-review wave 2 (5 items on tools/plane_file.py, tools/build_plane_file.py,
tools/test_plane_file.py):

- [kacper-daftcode#7] CLI verify/build catch ALL exceptions at the boundary (KeyError/
  TypeError from malformed-but-checksum-valid metadata, OSError) and exit
  non-zero with a one-line clean error; tracebacks behind a new --debug flag.
- [kacper-daftcode#8] RSS budget is a HARD gate: _enforce_budget() aborts the build BEFORE
  finalization when the sampled monitor observes the budget exceeded; the .tmp
  is kept for resume and no finalized artifact is produced.
- [kacper-daftcode#10] finalize() fsyncs the file inode after os.chmod(0o444) so the mode
  change is durable, not just the rename.
- [new Important] resume normalizes an OVERSIZED .tmp: ftruncate back to the
  exact layout length (was: grow-only), never finalize a file verify rejects.
- [new Minor] mon.start() + PlaneFileWriter construction moved inside the
  try/finally, monitor thread named + stop() guarded, and the writer ctor
  closes its fd if post-open validation raises: a resume-validation failure
  leaks neither the monitor thread nor an fd.

TDD (failing test first) for kacper-daftcode#7, kacper-daftcode#8, and the oversized-resume item; regression
tests for the leak item. Full suite: 73 passed, 0 failed (golden on CUDA).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant