feat(bench): 3 QA cascade scenarios (#104)#127
Merged
Conversation
PR-C of the cascade expansion: three verdict-graded QA cascades. The agent
reasons about a HIDDEN dependency from its doc and ends with a VERDICT line;
graded deterministically by rubric (no code execution). Each drift is
detectable by surf (structural/literal, not an identifier swap).
- cascade-idempotency-window-qa (T2, payments) — IdempotencyStore.is_duplicate
body `key in self._processed` -> `return False` (dedup guard removed; a
retried payment can double-charge).
- cascade-ratelimit-burst-qa (T2, rate-limiting) — RatePolicy.admission_mode
"fixed_window" -> "token_bucket" (idle clients can now burst above the rate).
- cascade-session-expiry-tz-qa (T2, dates/tz) — is_expired threshold `> 7200`
(2h, local+grace) -> `> 3600` (1h, UTC); a 90-min session flips valid->expired.
Each: author.py seals a genuine "changed" divergence, the rubric encodes the
T1 truth as [correct] and the stale claim as [misled], and validate_scenario
proves polarity via .author/solution_{correct,stale}.txt.
Note: all three are single-anchor. A genuine T3 "multi-claim" scenario needs
author.py to seal more than the first anchor's hash (it currently seals only
the first) — deferred as a small tooling follow-up.
Verified offline: author.py seals all three, validate_scenario green, a mock
run is error-free, uv run pytest passes (38).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 14, 2026
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
PR-C of the cascade-family expansion: 3 verdict-graded QA cascades. The agent reasons about a hidden dependency from its doc and ends with a
VERDICT:line, graded deterministically by rubric (no code execution). Branches offmain, independent of the TS PR (#126) — no stacking.cascade-idempotency-window-qais_duplicatebodykey in set→return False(dedup guard removed)cascade-ratelimit-burst-qaadmission_mode"fixed_window"→"token_bucket"(bursts now possible)cascade-session-expiry-tz-qais_expiredthreshold> 7200→> 3600(grace removed; 90-min session flips valid→expired)Each:
author.pyseals a genuine"changed"divergence, the rubric encodes the T1 truth as[correct]and the stale claim as[misled], andvalidate_scenarioproves polarity via.author/solution_{correct,stale}.txt.Verification (offline)
python tools/validate_scenario.py— all three green (rubric polarity).uv run pytest— 38 passed;cargo fmt --all --checkclean.Note: no T3 yet
All three are single-anchor (T2). A genuine T3 "multi-claim" scenario (a hub with several anchored claims, one drifted) needs
author.pyto seal every anchor's hash — it currently seals only the first. I deferred that as a small tooling follow-up rather than block this PR.Scope / phase-7 status
PR-C of Connorrmcd6/surface-bench#12. With #126 (TS) and this merged, the cascade family is 4 → 14 (10 py, 4 ts; 11 code, 3 qa). That frozen set unblocks the phase-8 pre-registration.
🤖 Generated with Claude Code