chore(hub-client): guardrail for changelog.md qmd parse breakage (bd-q5o7ekzn)#382
Merged
Merged
Conversation
…e (bd-q5o7ekzn) Phase 4 of the broken-main incident: editing hub-client/changelog.md is a rendered-artifact (code) change, not a docs change — a stray qmd delimiter (~ _ ^ $) fails changelogRender.wasm.test.ts and turns the TS Test Suite red, which is exactly how a lone "~37MB" broke main. Two lightweight guardrails: - Active: a PostToolUse hook (.claude/hooks/changelog-reminder.sh, registered in .claude/settings.json alongside format-rust.sh) that fires on Edit/Write of hub-client/changelog.md and injects a reminder with the exact command (`cd hub-client && npm run test:wasm`) and the delimiter warning. Non- blocking, ~0 latency, does not run the test itself. - Passive: a cautionary note in changelog.md's HTML-comment header, at the point of edit, for human contributors and as a backstop. Verified: the hook fires on hub-client/changelog.md (absolute + relative paths), stays silent for .rs and docs/changelog.md; 129/129 hub-client WASM tests still pass with the header note in place. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Follow-up (Phase 4) to the broken-
mainincident (#381). Editinghub-client/changelog.mdis effectively a code change — the file isrendered through the qmd pipeline in the About tab, and
changelogRender.wasm.test.tsgates it in CI. A stray qmd delimiter(
~ _ ^ $) fails the parse (e.g.[Q-2-17] Unclosed Subscript) and turnsthe whole TS Test Suite red — which is exactly how a lone
~37MBbroke main.This adds two lightweight guardrails so that edit-and-push-without-testing
is caught early. Deliberately not auto-running the test or gating pushes:
the changelog is edited rarely and the fix is one fast command, so a reminder
is enough.
Changes
.claude/hooks/changelog-reminder.shfireson
Edit/Writeofhub-client/changelog.mdand injects a reminder(visible to the agent) with the exact command and the delimiter warning.
Registered in
.claude/settings.jsonnext toformat-rust.sh.Non-blocking, ~0 latency; does not run the test itself (that would add
latency and needs a built WASM).
changelog.md's HTMLcomment header, at the point of edit, for human contributors and as a
backstop.
claude-notes/plans/2026-07-07-…) with the chosen design.Verification
hub-client/changelog.md(absolute + relative paths), stayssilent for
.rsfiles anddocs/changelog.md; output is validadditionalContextJSON.cd hub-client && npm run test:wasm→ 129/129 pass with the headernote in place (delimiters inside the
<!-- -->comment are not parsed).Strand:
bd-q5o7ekzn.🤖 Generated with Claude Code