Repository navigation
Conversation
#406's plan for the codex exec provider was two things: the provider itself, plus a way to judge summary quality. Only the provider shipped in v0.24.0. tests/test_summarizer_routing_460.py and tests/test_nested_summarizer.py pin routing and liveness with a mocked subprocess.run and never look at what a summary actually says, while prompts/*.prompt.txt were tuned against Claude and now also run under codex exec against a different model. Add tests/test_summary_quality_492.py: two recorded session fixtures under tests/fixtures/summary_quality/ with a short list of facts a correct save-session summary must preserve, run through the real build_save_prompt() + live call_haiku() and checked by substring. Skipped by default (RUN_LIVE_SUMMARY_JUDGE=1 opts in), matching CLAUDE.md's "runs locally on demand, never on push" and the same shape scripts/run-tests.sh already uses for its own live Haiku test. Chose fixture+substring over an LLM-judge call per the issue's own steer -- cheaper, deterministic, no separate judge calibration needed. Proven both ways against a real live call before committing: an injected fact absent from a fixture failed with a real diff, and the correct fact lists passed against two live calls. Co-Authored-By: Max <noreply>
…fact (#492) Three findings from the Explore self-review of 60d84a6, all applied: - The harness never forced REMEMBER_SUMMARIZER=codex, so on any ordinary dev shell or CI runner _choose_summarizer_provider()'s "auto" default resolved to the pre-existing claude route, not codex -- the harness silently never judged the one provider #492 is actually about. Now forced via monkeypatch, the same explicit-override convention tests/test_summarizer_routing_460.py already uses under mock. - _build_prompt_for()'s Lines: count used len(messages) (filtered) where production's extract_session() uses count_lines() (raw physical lines), contradicting the file's own "same shape production sends" claim. Now uses pipeline.extract.count_lines(), matching production. - The rate-limit-feature case's "100" fact was a bare, generic numeral that could pass on an unrelated appearance. Tightened to "100 req". Re-verified TDD red/green against the corrected, codex-forced shape with two more live calls: an injected impossible fact ("Kubernetes pod eviction") failed with a real diff under the codex route, and restoring the correct facts passed both cases green under the same route. Co-Authored-By: Max <noreply>
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.
Closes #492.
#406's plan for the
codex execsummarizer provider was two things, not one: the provider itself, plus a way to judge summary quality, because "a green contract suite passes while summaries quietly become useless." Only the provider shipped (v0.24.0).tests/test_summarizer_routing_460.pyandtests/test_nested_summarizer.pypin routing and liveness -- which provider a call resolves to, how an unavailable/empty/declined spawn is reported -- entirely with a mockedsubprocess.run. None of it looks at what a summary actually says, whileprompts/*.prompt.txtwere tuned against Claude and now also run undercodex execagainst a different model.What this adds
tests/test_summary_quality_492.py: two recorded session fixtures undertests/fixtures/summary_quality/(an auth CSRF bugfix, a rate-limiting feature with an explicit still-blocked-on-ops status) with a short list of facts a correctsave-sessionsummary must preserve -- specific filenames, an underlying cause, a numeric limit, a blocking status. Each test builds the realsave-sessionprompt viapipeline.prompts.build_save_prompt(), forces thecodexroute (REMEMBER_SUMMARIZER=codex, the same explicit-override conventiontests/test_summarizer_routing_460.pyalready uses under mock), sends it through the live, unmockedpipeline.haiku.call_haiku(), and asserts every fact survives into the summary as a case-insensitive substring.Why fixture+substring, not an LLM judge
The issue named two candidate shapes and left the choice open: a fixture set with substring/judge-call checks, or a differential run against both providers. Substring presence against a small, hand-picked fact list is the cheaper, deterministic option -- an LLM judging another LLM's prose needs its own calibration, which is a materially bigger scope than this issue asks for. A differential-diff engine was ruled out for the same reason: it is a bigger build than a bounded harness needs.
Why it is skipped by default
The issue is explicit that this needs to be "runnable on demand rather than in CI (it needs a live provider and costs a call)." The new file is gated behind
RUN_LIVE_SUMMARY_JUDGE=1(pytest.mark.skipif), matching CLAUDE.md's "suite runs locally on demand, never on push" and the same opt-in-costs-tokens shapescripts/run-tests.shalready uses for its own live Haiku test (section 8,--live). No workflow under.github/workflows/sets the env var, so it is unconditionally skipped in CI.TDD, proven against a real live call
With
RUN_LIVE_SUMMARY_JUDGE=1set and the codex route forced: an injected impossible fact ("Kubernetes pod eviction", absent from the auth-csrf-bugfix fixture) failed with a real assertion diff against a live codex-routed call; restoring the correct fact list passed both cases green against two more live calls. Re-run is not automatic on every edit after that -- each run is a real, billed API call, which is exactly the cost this file exists to keep out of CI and out of the default local suite.Self-review
Spawned
Exploreandoss:auditoragainst the committed diff. The auditor found nothing (0 findings across the absence/guard/untrusted-text/platform-band classes).Explorefound 3, all fixed in a follow-up commit:clauderoute -- exactly the gap the issue is about. Fixed:REMEMBER_SUMMARIZER=codexis now forced, and TDD red/green was re-verified against the corrected, codex-forced shape with two more live calls.Lines:count used the filtered message count where production uses the raw physical line count. Fixed: now usespipeline.extract.count_lines(), matching production."100") was a weak, generic substring. Tightened to"100 req".Scope note
The fourth prompt,
prompts/session-history-hint.txt, is a static string printed at session start -- it is never sent through a summarizer call, so it has no summary-quality question to test and is out of scope here.