From fbb6b90296f2064d7c3a3b75732a8cfdb91e0232 Mon Sep 17 00:00:00 2001 From: Michael B Reiser Date: Fri, 4 Sep 2026 12:19:16 -0400 Subject: [PATCH 1/2] fix(studio): restore metadata pick-lists, unblock repo vocab reads, correct token docs (v0.70) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three live defects in the data-repo pipeline plus the docs that described the course token wrongly. - configs/metadata/people.yaml: a GitHub-UI edit (2026-08-27) left a one-space indent on the shubhamTR entry; the vendored YAML parser threw, loadVocab() swallowed it, and every Studio not signed into a course repo showed an EMPTY Experimenter dropdown (which blocks recorded runs). Re-indented, and the five configs/metadata/*.yaml files are now parsed in tests/test-metadata-yaml.js, wired into `pixi run test` and the protocol-roundtrip CI workflow. - js/studio-github.js: READABLE_EXACT gains ages.yaml / sexes.yaml / fly_numbers.yaml (refreshCourseMeta read them but the allowlist refused, so the course override silently fell back to the site list); WRITABLE_PREFIXES gains pattern-sets/ (the opt-in post-run SD snapshot could never commit). Header comment documents the "keep both lists in sync" rule; tests added. - arena_studio.html: sign-in prompt / lock title / help text now say which token to use — fine-grained (org members, one repo, Contents RW) vs CLASSIC for the shared course guest account (an outside collaborator cannot own a fine-grained token for an org repo; public_repo suffices now that the course repo is public) — and what an expired token looks like. Footer v0.70. - New docs/development/data-repo-token-runbook.md (renew the course token; lab member recipe; org-owner checklist). cshl-pipeline-test-plan §P1c/1d rewritten for a classic token; dashboard README/prompt, course docs and CLAUDE.md updated (repo is public since 2026-08; READABLE_EXACT rule). - tests/test-arena-studio-alt.js: Classic footer assertion matches the line's shape instead of a pinned version literal. Co-Authored-By: Claude Fable 5.1 --- .../workflows/validate-protocol-roundtrip.yml | 5 + CLAUDE.md | 14 ++- arena_studio.html | 24 +++-- configs/metadata/people.yaml | 2 +- course/cshl-2026/docs/arena-studio.md | 5 +- course/cshl-2026/docs/github-overview.md | 7 +- dashboard/data-browser/README.md | 14 +-- dashboard/data-browser/github-repo.js | 2 +- .../development/arena-studio-release-notes.md | 19 ++++ docs/development/cshl-pipeline-test-plan.md | 53 +++++++---- docs/development/data-repo-token-runbook.md | 81 ++++++++++++++++ js/studio-github.js | 44 ++++++--- pixi.toml | 2 +- tests/test-arena-studio-alt.js | 4 +- tests/test-metadata-yaml.js | 92 +++++++++++++++++++ tests/test-studio-github.js | 17 ++++ 16 files changed, 326 insertions(+), 59 deletions(-) create mode 100644 docs/development/data-repo-token-runbook.md create mode 100644 tests/test-metadata-yaml.js diff --git a/.github/workflows/validate-protocol-roundtrip.yml b/.github/workflows/validate-protocol-roundtrip.yml index 74ea091..9c0df9a 100644 --- a/.github/workflows/validate-protocol-roundtrip.yml +++ b/.github/workflows/validate-protocol-roundtrip.yml @@ -73,6 +73,11 @@ jobs: - name: Run G6 wire encoder tests run: node tests/test-arena-wire-g6.js + - name: Validate configs/metadata controlled-vocab YAML + # These pick-lists are edited in the GitHub UI; a bad indent silently + # empties the Arena Studio experimenter dropdown (2026-08-27). + run: node tests/test-metadata-yaml.js + - name: Run G6 sequence runner tests run: node tests/test-arena-runner-g6.js diff --git a/CLAUDE.md b/CLAUDE.md index 45dfad6..f00ce17 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -226,9 +226,17 @@ fix flows to every page automatically; two hand-written HTML pages never will. `fetchCourseGenotypes` / the generic `fetchCourseVocab(file, key, srcId, apply)`. **Any NEW controlled vocab MUST follow this course-first, site-fallback pattern:** add a site YAML under `configs/metadata/`, load it in `populateMetaDatalists`, AND - add a `fetchCourseVocab(...)` call in `refreshCourseMeta` + seed the file into the - course repo root. The course repo (`reiserlab/cshl-2026-course`) is PRIVATE, so - the course override needs a token; the site files are same-origin (always work). + add a `fetchCourseVocab(...)` call in `refreshCourseMeta`, ADD THE FILENAME TO + `READABLE_EXACT` in `js/studio-github.js` (the read allowlist — a miss throws inside + the loader's try/catch and the override silently falls back; that is exactly how + ages/sexes/fly_numbers were broken until v0.70), + seed the file into the repo root. + The course override runs only when a token is stored (token + repo = "course-repo + mode") even though `reiserlab/cshl-2026-course` has been PUBLIC since 2026-08; the + site files are same-origin (always work). `configs/metadata/*.yaml` are parsed by + `tests/test-metadata-yaml.js` (pixi + CI) because they get edited in the GitHub UI. + Token types: org members use a fine-grained PAT scoped to the one repo; the shared + course guest account (`cshl-2026`, an outside collaborator) can only use a CLASSIC + token — see `docs/development/data-repo-token-runbook.md`. - **Session rig (#135, v0.4):** `Studio.currentRig` (`{name, arenaConfig, explicit}`) is THE bench rig for all three views — one top-bar selector, locked by default. Always change it via the module block's diff --git a/arena_studio.html b/arena_studio.html index 4cd933d..9a14e24 100644 --- a/arena_studio.html +++ b/arena_studio.html @@ -2917,7 +2917,7 @@

Import error