fix(dogfood): the deepest probe in the sweep had never run once - #2578
fix(dogfood): the deepest probe in the sweep had never run once#2578noahgift wants to merge 1 commit into
Conversation
Harvested from fix/guard-batch (f031b7c), the one commit of that branch whose content is not already in main. The other 11 commits landed via #2527 and relatives; this one did not, so both gaps below are live on main today. `scripts/dogfood_surfaces.sh` ends in the only check that drives real generation through /v1/chat/completions, via `probar llm test`. Two independent gaps meant it never executed a single time, and neither was visible from its output -- it printed a tidy `skip` or a confident `FAIL` either way. 1. It built aprender-test-cli WITHOUT `--features llm`. crates/aprender-test-cli/src/commands.rs:117 declares `Llm(LlmArgs)` with no `#[cfg]`, so clap advertises `llm` and renders its `--help` in every build; only the HANDLER is gated, at main.rs:74-79. A featureless binary therefore PARSES `llm test` and then returns Error: LLM features not enabled. Rebuild with --features llm which the sweep reported as `FAIL probar llm test FAILED` -- blaming the server for a gap in the harness, the very thing the comment three lines below warns against for the config case. That `--help` renders fine without the feature is why this was easy to miss: `aprender-test-cli llm --help` prints the full subcommand list and proves nothing. 2. It skipped whenever DOGFOOD_PROBAR_CONFIG was unset, on the stated grounds that no committed config existed. One does: tests/fixtures/probar-llm-endpoint.yaml, 3416 bytes, in main. Now defaults to it when the file is there; an explicit env var still wins; a genuinely absent file is still a skip-with-reason, never a FAIL. FALSIFIER: scripts/check_dogfood_llm_probe_armed.sh, wired into ci.yml next to the other guards, plus a `--self-test` case table beside it. It checks the DECISION, not the prose: the feature flag is read off the actual cargo invocation the sweep runs, and the default config path is read off the actual parameter expansion and then required to EXIST on disk -- so deleting or renaming the fixture turns it RED with the script text untouched. Mutation-verified in BOTH directions, and the mutation is proven to engage: against main's dogfood_surfaces.sh, unmodified -> rc=1, BOTH gaps named against this tree -> rc=0 --self-test case table -> 4/4 A unmutated tree is GREEN PASS B `--features llm` deleted turns RED PASS C defaulted fixture absent turns RED PASS D committed default removed turns RED PASS check_guards_are_wired.sh was RED before the ci.yml wiring (`unwired guards grew 1 -> 2, NEW: check_dogfood_llm_probe_armed.sh`) and PASS after, so the wiring is proven, not assumed. bashrs lint on the new guard alone: 0 errors. check_shell_lint_ratchet.sh PASS (97 error lines against baseline 876; the new script adds none). The baseline is deliberately NOT re-recorded here -- that improvement is pre-existing drift and does not belong in this PR. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CbMTnT8Upx6Ym18i5H11iR
|
Duplicate-work note, and a retraction of the concern I raised on #2579 (now closed in favour of this PR). I independently harvested the same commit (f031b7c on With the feature the handler runs, parses the committed fixture, and executes all three cases, failing only because nothing listens on port 1. That is a probe. Without it there is nothing to fail. It also confirms the fixture is well-formed and yields exactly 3 cases. Retraction. On #2579 I flagged that a text-scanning feature check can be blind — my own first version grepped the file it lived in, so the grep's own pattern string matched and deleting One difference worth keeping in mind for a follow-up: your guard requires the sweep to spell |
|
Superseded by #2613, the 0.64.0 integration batch. This PR's commits are merged into Why batched rather than landed individually: one Batching also found four defects that were invisible to every individual PR — most Closing now, deliberately: an open PR that merges first moves #2613's base and forces |
Pull request was closed
Harvested from
fix/guard-batch— the one commit of that branch (f031b7c) whose content is not already in main. The branch's other 11 commits landed via #2527 and relatives, so both gaps below are live onmaintoday.scripts/dogfood_surfaces.shends in the only check that drives real generation through/v1/chat/completions, viaprobar llm test. Two independent gaps meant it never executed a single time — and neither was visible from its output, which printed a tidyskipor a confidentFAILeither way.1. The probe binary was built without
--features llmcrates/aprender-test-cli/src/commands.rs:117declaresLlm(LlmArgs)with no#[cfg], so clap advertisesllmand renders its--helpin every build. Only the handler is gated (main.rs:74-79). A featureless binary therefore parsesllm testand then returns:…which the sweep reported as
FAIL probar llm test FAILED— blaming the server for a gap in the harness, the very thing the comment three lines below warns against for the config case.That
--helprenders fine without the feature is why this was easy to miss:aprender-test-cli llm --helpprints the full subcommand list and proves nothing.2. It skipped unless an operator exported a config that was already committed
It skipped whenever
DOGFOOD_PROBAR_CONFIGwas unset, on the stated grounds that no committed config existed. One does —tests/fixtures/probar-llm-endpoint.yaml, 3416 bytes, in main. Now defaults to it when present; an explicit env var still wins; a genuinely absent file is still a skip-with-reason, never a FAIL.Falsifier
scripts/check_dogfood_llm_probe_armed.sh, wired intoci.ymlbeside the other guards, with a--self-testcase table.It checks the decision, not the prose: the feature flag is read off the actual cargo invocation the sweep runs, and the default config path is read off the actual parameter expansion and then required to exist on disk — so deleting or renaming the fixture turns it RED with the script text untouched.
Mutation verification — both directions, mutation proven to engage
dogfood_surfaces.sh, unmodifiedrc=1, both gaps namedrc=0--self-testcase tablecheck_guards_are_wired.shwas RED before the ci.yml wiring (unwired guards grew 1 -> 2, NEW: check_dogfood_llm_probe_armed.sh) and PASS after — the wiring is proven, not assumed.bashrs linton the new guard alone: 0 errors.check_shell_lint_ratchet.shPASS (97 error lines vs baseline 876; the new script adds none). The baseline is deliberately not re-recorded here — that improvement is pre-existing drift and does not belong in this PR.Scope
3 files: the sweep (+17/-5), the new guard, the ci.yml wiring. No Rust touched. The CI edit is purely additive ("add a gate").
🤖 Generated with Claude Code
https://claude.ai/code/session_01CbMTnT8Upx6Ym18i5H11iR