Skip to content

Harden corpus scraper + first pair-hunting run - #20

Merged
stackedsax merged 1 commit into
mainfrom
fix/corpus-scraper-hardening
Jul 18, 2026
Merged

Harden corpus scraper + first pair-hunting run#20
stackedsax merged 1 commit into
mainfrom
fix/corpus-scraper-hardening

Conversation

@stackedsax

Copy link
Copy Markdown
Contributor

What

Ran the pairs scrape end-to-end (build-plan stage 2), which exposed and fixed
several scraper bugs, and produced the first real cross-scheduler pair candidates.

Scraper fixes

  • Quote directive phrases. GitHub tightened code-search query parsing: a bare
    --array / -l / -W leads with a dash and is now parsed as a NOT operator,
    so every slurm and pbs query returned 422 — the corpus scraper was silently
    broken for both HPC schedulers. Quoting the phrases ("#SBATCH --array") fixes it.
  • Survive GitHub's throttling transport failures instead of crashing:
    • honor Retry-After on 403/429 secondary (abuse) rate limits;
    • retry on dropped connections (RemoteDisconnected) and on 408/5xx from the
      search backend;
    • guard each phase-1 query so a single failure can't abort the whole sweep.
  • Clear the pairs output dir on start so stale repo dirs from a prior run
    can't misrepresent the current results.

First pairs run

3 candidate pair-repos, all volcano↔kueue (manifest committed; specs stay
gitignored per corpus policy):

Repo Formats Notes
NVIDIA/knavigator volcano, kueue Genuine equivalent pair — the same benchmark job ({{._NAME_}}, N replicas, ubuntu, 8 GPUs, identical kwok annotations) rendered once per scheduler. Usable as conversion ground truth now.
Project-HAMi/website volcano, kueue Co-located tutorial examples; needs review for equivalence.
lasyard/docs volcano, kueue Co-located k8s examples; needs review.

Finding

Repo-level co-location surfaces candidates cheaply, but does not prove
equivalence
. A false positive from an earlier run (converged-computing/ fractale-experiments, slurm+pbs) turned out to be unrelated jobs a repo merely
collects. The gold seam is benchmarking/harness repos like knavigator that
deliberately express one workload across schedulers. HPC↔HPC and HPC↔K8s real-world
co-located pairs remain scarce, matching the earlier corpus cross-reference.

Testing

  • Scrape completed exit 0; --list unchanged; python ast.parse clean.
  • On-disk candidate tree reconciled to the committed manifest (3 repos).

🤖 Generated with Claude Code

Running the pairs scrape surfaced that GitHub tightened code-search query
parsing: a bare "--array" / "-l" / "-W" now leads with a dash and is read
as a NOT operator, so every slurm and pbs query returned 422 (the corpus
scraper was silently broken for both). Quote the directive phrases to fix.

Also make get_with_retry survive the transport failures GitHub throws under
its abuse-detection throttling, instead of crashing the run:
- honor Retry-After on 403/429 secondary rate limits;
- retry on dropped connections and on 408/5xx from the search backend;
- guard each phase-1 query so one failure can't abort the sweep.

And clear the pairs output dir on start so stale repo dirs from a prior run
can't misrepresent the current results.

First pairs run (committed manifest): 3 candidate pair-repos, all
volcano<->kueue. NVIDIA/knavigator is a genuine equivalent pair (the same
benchmark job rendered per scheduler) and is usable as conversion ground
truth; the others co-locate volcano+kueue examples that still need review.
Repo-level co-location finds candidates cheaply but does not prove
equivalence — a verification pass is still required.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PnTz6Zxqa4jHocK8kCbyx
@stackedsax
stackedsax merged commit 09ab214 into main Jul 18, 2026
5 checks passed
@stackedsax
stackedsax deleted the fix/corpus-scraper-hardening branch July 18, 2026 20:01
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