Skip to content

report-embeds: drop the registry, scan MDX for embeds#2953

Merged
johndmulhausen merged 7 commits into
mainfrom
claude/report-embeds-drop-registry
Jul 22, 2026
Merged

report-embeds: drop the registry, scan MDX for embeds#2953
johndmulhausen merged 7 commits into
mainfrom
claude/report-embeds-drop-registry

Conversation

@johndmulhausen

Copy link
Copy Markdown
Contributor

Description

Follow-up to #2948. The scripts/report-embeds/registry.yaml file was a redundant maintenance surface: check_embeds.py already discovers every <WandbReport> by scanning the .mdx sources, so the registry was a second place to hand-maintain the same list of embeds. This removes it.

Changes

  • Delete scripts/report-embeds/registry.yaml.
  • check_embeds.py now discovers embeds by scanning the English .mdx sources. It keeps the static checks that don't need a registry — sibling prose link required for each embed, per-page cap, and "no embeds in shared snippets" — plus URL liveness on the discovered URLs. All registry loading/schema logic is gone. No more PyYAML dependency (standard library only).
  • .github/workflows/report-embeds.yml reduced: static (prose-link) check on PRs, liveness weekly that files an issue on failure. Dropped the registry-change gating and the pip install pyyaml step.
  • Tests, README, and the AGENTS.md rule updated to match (the "register the report" step is gone; the prose-link requirement stays and is still CI-enforced).

Net effect: adding an embed is now just "add <WandbReport> + a prose link on the page." Nothing else to keep in sync.

Testing

  • python3 -m unittest discover -s scripts/report-embeds/tests (12 tests)
  • python3 scripts/report-embeds/check_embeds.py --mode static — finds the 2 existing embeds with their prose links, passes
  • python3 scripts/report-embeds/check_embeds.py --mode all — static + anonymous liveness on both URLs, passes
  • No remaining references to the deleted registry.yaml anywhere in the repo

Note

The prose-link check is kept intentionally (it's registry-free — it works purely by scanning MDX), since it's the agent-legibility rule from the original design. If you'd rather this be liveness-only, that's a small follow-up.

check_embeds.py already discovers every <WandbReport> by scanning the
.mdx sources, so registry.yaml was a redundant second place to maintain
the same list. Remove it and the registry-validation logic.

- Delete scripts/report-embeds/registry.yaml.
- check_embeds.py: discover embeds by scanning MDX; keep the sibling
  prose-link, per-page-cap, and snippet checks (static) plus URL liveness
  on the discovered URLs. Drop all registry loading/schema logic. No more
  PyYAML dependency (standard library only).
- report-embeds.yml: static (prose link) on PRs; liveness weekly, filing
  an issue on failure. No registry-change gating, no pip install.
- Update tests, README, and the AGENTS.md rule accordingly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@johndmulhausen
johndmulhausen requested a review from a team as a code owner July 22, 2026 16:58
@mintlify

mintlify Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
wandb 🟢 Ready View Preview Jul 22, 2026, 5:02 PM

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

📚 Mintlify Preview Links

🔗 View Full Preview

📝 Changed (3 total)

⚙️ Other (3)
File
AGENTS.md
scripts/report-embeds/README.md
snippets/WandbReport.jsx

🤖 Generated automatically when Mintlify deployment succeeds
📍 Deployment: b2b5640 at 2026-07-22 17:23:31 UTC

johndmulhausen and others added 2 commits July 22, 2026 13:05
Remove the unrequested TOO_MANY_EMBEDS cap (and its test). With no
warning-level findings left, drop the warning/`--strict` machinery and
the Finding.level field, and slim the output paths. Also drop the
locale-ignored test (locale skipping stays; it's just untested here).

check_embeds.py 377->245 lines, tests 201->88.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The report URL is just `src`, so the component can render the link
itself instead of asking authors to add one.

- WandbReport.jsx: replace the caption text link with a right-justified
  "View Report" button styled like the in-content button-links
  (.colab-link / .try-product-link), inline so the component stays
  self-contained. It links to the plain report URL (no ?jupyter=true).
- check_embeds.py: drop the MISSING_PROSE_LINK check and the now-unused
  strip_embeds(). Static mode now just checks placement + a recognizable
  report URL; liveness unchanged.
- Drop the prose-link tests; update README and the AGENTS.md rule.

The `src` URL stays in the MDX source, so agents and the llms.txt export
still see the report URL.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
johndmulhausen and others added 2 commits July 22, 2026 13:17
check_embeds.py no longer takes --mode; every run does the static checks
and the liveness check. The workflow collapses to a single job that
blocks on PRs and files an issue on the weekly run.

Also trim README.md and the AGENTS.md embed rules to match what's left
after removing the registry, the prose-link requirement, and modes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
One file, not two. The tests move into a `Tests` class in check_embeds.py
and call the functions directly, dropping the import-by-path scaffolding.
Run them with:
  python3 -m unittest discover -s scripts/report-embeds -p 'check_embeds.py'

Reroute the two references (the workflow's unit-test step and the README)
to the new command and delete scripts/report-embeds/tests/.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
johndmulhausen and others added 2 commits July 22, 2026 13:26
wandb.ai rate-limits crawlers, so liveness results are too flaky to gate
merges on. Drop the pull_request trigger (and with it the unit-test step,
--github annotations, paths filter, and concurrency group); the workflow
is now just the weekly liveness check that files an issue on failure.

Update the README and AGENTS.md notes to match (no PR gating).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Remove the now-dead --github flag and emit_github_annotations() (the
  cron workflow only uses --output-md), and the unused Iterable import.
- Fold _line_of and _blank into their one caller; tighten scan(),
  render_markdown, and the docstring; collapse the section banners.

No behavior change; retry/backoff logic and tests are untouched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@johndmulhausen
johndmulhausen merged commit 234a9fd into main Jul 22, 2026
7 checks passed
@johndmulhausen
johndmulhausen deleted the claude/report-embeds-drop-registry branch July 22, 2026 17:36
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