Skip to content

merge after #63: AWI-ISSUE-60 snippet-rerun workflow (Exa highlights + Tavily control, 43 items, artifact only) - #64

Merged
fredhazelton merged 2 commits into
mainfrom
awi-issue-60-snippet-rerun
Nov 23, 2026
Merged

fredhazelton merged 2 commits into
mainfrom
awi-issue-60-snippet-rerun

Conversation

@fredhazelton

Copy link
Copy Markdown
Contributor

Merge after #63. This branch is stacked on awi-issue-60 (#63 @ 6169445d), so until #63 merges the diff vs main includes #63's changes. This PR's own commit is 0a91d3bf. Refs #60. Ticket AWI-ISSUE-60. Chief OK'd option 1 at 2:44 PM ET, Nov 23, 2026, under Fred's 2:03 PM approval to "have GM fix and rescore". It runs at $0 on free credit.

This PR adds a manual-only workflow to fill in the one number the offline rescore can't produce: Exa snippet_contains with highlights on. It runs the 43 snippet_contains items of search_evergreen against Exa (highlights) and Tavily (same-day control). It has not been dispatched.

Changes (own commit only)

  • .github/workflows/snippet-rerun.yml is the new workflow:
    • It triggers on workflow_dispatch only, with permissions: contents: read at the top level and the job level. persist-credentials: false, and MONTHLY_CAP_USD: "0".

    • It shares the benchmark concurrency group, so it can never overlap the benchmark workflow.

    • Only EXA_API_KEY and TAVILY_API_KEY are referenced, and only in the run step's env. The run step uses set -euo pipefail, with no set -x and no env echo.

    • It runs python collectors/benchmark.py --mode full --only-providers exa,tavily --only-sets search_evergreen --only-check-types snippet_contains.

    • The stop check (bench/tools/snippet_rerun_check.py, no secrets in env) fails the job on any of these:

      • a provider status other than ran, including any stale_*, stopped_* or skipped_* status, or one mentioning quota, cap, paid usage, budget, rate limit or free tier
      • any HTTP 402 or 429 line
      • a log that doesn't have exactly 43 lines

      The runner's own guards already stop a provider before the call on its free quota or the $0 cap, and on its first 401/402/403.

    • Logs are uploaded as artifact snippet-rerun-logs (if: always(), 14 days).

    • There is no push, no publish job and no write token. I'll commit the logs to AWI-ISSUE-60: Exa snippets + URL equivalence for every provider, offline rescore (#60) #63's branch by hand after reviewing them.

  • collectors/benchmark.py gets a --only-check-types TYPES flag:
    • It needs --only-sets and is refused (exit 2) together with --reprobe-offset or --rebuild-only.
    • It filters rows before runner.run, so the Tavily full_limits trim at 45 can't cut any of the 43. The kept rows carry sample_of: 100.
    • With the flag absent, behaviour is unchanged.
  • The flag and workflow are documented in bench/README.md and the module docstring. run_tests.sh now runs tests/test_snippet_rerun.py.

Checks

  • tests/test_bench.py, test_issue60.py and test_snippet_rerun.py give 605 passed and 4 failed. The 4 are the known ones from AWI-ISSUE-60: Exa snippets + URL equivalence for every provider, offline rescore (#60) #63: Run1Published grader label, TavilyPhase0, TinyFish latest.json, and NewsfetchFix001 ac5. secrets_scan is OK.
  • actionlint 1.7.7 is clean on the workflow. The YAML is also asserted in tests: the only trigger, permissions, which secrets appear, no push, no set -x.
  • I did a mocked dry run with runner.run stubbed, so no call was made and nothing was written. It printed only-check-types: search_evergreen n=43 of 100 (snippet_contains), the runner received 43 rows, all snippet_contains, with sample_of 100, and after the Tavily trim it still had 43.

Free credit

The ledger data/spend/2026-11-quota.json shows Exa 44 of 1,428 units used and Tavily 88 of 1,000. The run adds 43 Exa searches; per exa.ai/pricing, /search includes up to 10 results and highlights aren't billed extra. It adds 86 Tavily credits. No card spend.

…control, 43 snippet_contains items, artifact only) + --only-check-types flag
@fredhazelton

Copy link
Copy Markdown
Contributor Author

Quality Gate r1: HOLD at 0a91d3b. Content and test-run READY are good, but #63 has merged and this branch's base is stale (main 6457e7e != base d862007; mergeable unknown). Fix list: (1) merge current main into the branch, (2) fresh test-run READY at the new head, (3) explain why MONTHLY_CAP_USD "0" won't trip skipped_cap on dispatch, (4) record #64 in the AWI-ISSUE-60 meta cycle docs, (5) mark ready. Merge method once green: merge commit.

@fredhazelton
fredhazelton marked this pull request as ready for review November 23, 2026 20:09
@fredhazelton

Copy link
Copy Markdown
Contributor Author

Quality Gate r2 (final): SHIP at 03cf6d7, merge commit. Base is current main 6457e7e, the own diff is identical to r1 (same six paths and blobs), test-run READY at this head (605 pass, same 4 inherited), and a $0 cap stays within free quota (Exa 43/1384, Tavily 86/912 left). Dispatch once after merge, on main only.

@fredhazelton
fredhazelton merged commit 6da6a7e into main Nov 23, 2026
2 checks passed
@fredhazelton

Copy link
Copy Markdown
Contributor Author

Quality Gate post-merge: PASS. Merge 6da6a7e has parents 6457e7e + 03cf6d7 (gated head), tree be88b9c5 equals the head tree, and it is the main tip.

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