Skip to content

feat(data-repo): runlog-index GitHub Action keeps runlogs/<folder>/index.json current - #187

Merged
mbreiser merged 2 commits into
mainfrom
feat/runlog-index-action
Sep 7, 2026
Merged

feat(data-repo): runlog-index GitHub Action keeps runlogs/<folder>/index.json current#187
mbreiser merged 2 commits into
mainfrom
feat/runlog-index-action

Conversation

@mbreiser

@mbreiser mbreiser commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Option 1 from today's review: the data repo keeps its own catalog index. A workflow template, scripts/data-repo-workflows/runlog-index.yml, runs on every push under runlogs/, rebuilds only the touched folders' index.json with scripts/build-runlog-index.py --github (64 KB head + 4 KB tail per file, never a full log), and commits them with GITHUB_TOKEN.

  • Loop guard: the paths filter excludes runlogs/**/index.json, so the bot's own commits don't retrigger.
  • Concurrency group: simultaneous pushes from two rigs queue instead of racing; the script also retries a stale-sha 409/422 on PUT.
  • workflow_dispatch rebuilds every folder by hand.
  • Sparse checkout of .github only — the workflow never downloads the multi-GB logs.
  • --folder is now repeatable.

Arena Studio does not write the index (option 2 dropped): one writer, no change to the run-log commit path while experiments are running, and hand-pushed large logs, migrations and deletions are all covered because each folder is rebuilt from what is present.

Installed into reiserlab/cshl-2026-course today (.github/workflows/runlog-index.yml + .github/scripts/build-runlog-index.py) and verified with a throwaway push (see PR comment). The seed-script install step and the setup-doc section go into #178 (those files live only on that branch).

🤖 Generated with Claude Code

mbreiser and others added 2 commits September 6, 2026 18:18
…<folder>/index.json

Option 1 from the review: the data repo itself keeps the catalog index current.
scripts/data-repo-workflows/runlog-index.yml (template installed into each data
repo) runs on every push under runlogs/ (ignoring its own index.json commits),
serializes concurrent runs, sparse-checks-out only .github, computes the touched
folders from the push payload (added/modified/removed), and rebuilds just those
via build-runlog-index.py --github with GITHUB_TOKEN. workflow_dispatch rebuilds
all folders. Arena Studio does NOT write the index (option 2 dropped: one writer,
no commit-path change on running rigs, covers hand pushes/migrations/deletions).

build-runlog-index.py: --folder is repeatable; index PUT retries on a stale-sha
409/422. Comments/README updated to name the Action as the writer.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ange reads; skip unchanged index.json

First live run rebuilt ALL folders (push-payload parse found no paths) and hit
a transient connection reset on one of ~340 range reads. Detection now uses
GET /compare/{before}...{sha} (paginated); raw range reads retry 4x; an index
that is byte-identical is not re-committed (no no-op bot commits).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mbreiser

mbreiser commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Live verification on reiserlab/cshl-2026-course (2026-09-06)

Installed .github/workflows/runlog-index.yml + .github/scripts/build-runlog-index.py (byte-identical to this branch), then pushed and deleted a 6-line throwaway log under runlogs/bench00/:

event run detection rebuilt bot commits
add throwaway success changed files: 1 → folders: bench00 bench00 only (4 runs) 1
delete throwaway success changed files: 1 → folders: bench00 bench00 only (3 runs) 1
  • Index after add contained idxtest3 with duration_s 123.456 / complete: true; after delete it is back to the 3 real bench00 runs. No re-trigger from the bot's own index commits (loop guard works).
  • Earlier iteration (before the compare-API change) fell back to rebuilding all 12 folders and hit one transient ConnectionResetError on ~340 range reads — hence the read retries and the unchanged-index skip in this PR.
  • Follow-ups on the feat(studio): data-repo registry — lab repo picker, "Rig id", no default repo (v0.72) #178 branch (files live only there): scripts/seed-data-repo.sh installs both files into new data repos; docs/development/data-repo-setup.md gets the index section. Arena Studio does not write the index.

@mbreiser
mbreiser merged commit 10c49c5 into main Sep 7, 2026
@mbreiser
mbreiser deleted the feat/runlog-index-action branch September 7, 2026 22:19
mbreiser added a commit that referenced this pull request Sep 7, 2026
…ex.json

isRunlogName accepted bare .json, and #188 applies it to directory listings
(data-repo browse, URL index) and the corpus parity script. Since #187 every
runlogs/<folder>/ carries an index.json catalog, so the dashboard would list
each folder's index as a run and the corpus gate failed on all 12 of them
(174/174 logs themselves pass). Narrow the shared filter to .jsonl|.ndjson
(+ .gz); the drop handler keeps accepting a user-dropped .json to match the
file input's accept list. Vendored copy synced; test updated.

Corpus gates on this branch (course clone @ 37d003e, 174 logs):
  scripts/runlog-v2-corpus.py             174/174 ok
  dashboard/data-browser/tests/corpus-v2-parity.js  174/174 ok (was 174 ok + 12 index.json FAIL)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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