Skip to content

chore(hub-client): guardrail for changelog.md qmd parse breakage (bd-q5o7ekzn)#382

Merged
cscheid merged 1 commit into
mainfrom
chore/bd-q5o7ekzn-changelog-guardrail
Jul 7, 2026
Merged

chore(hub-client): guardrail for changelog.md qmd parse breakage (bd-q5o7ekzn)#382
cscheid merged 1 commit into
mainfrom
chore/bd-q5o7ekzn-changelog-guardrail

Conversation

@cscheid

@cscheid cscheid commented Jul 7, 2026

Copy link
Copy Markdown
Member

What & why

Follow-up (Phase 4) to the broken-main incident (#381). Editing
hub-client/changelog.md is effectively a code change — the file is
rendered through the qmd pipeline in the About tab, and
changelogRender.wasm.test.ts gates it in CI. A stray qmd delimiter
(~ _ ^ $) fails the parse (e.g. [Q-2-17] Unclosed Subscript) and turns
the whole TS Test Suite red — which is exactly how a lone ~37MB broke 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

  • Active — PostToolUse hook. .claude/hooks/changelog-reminder.sh fires
    on Edit/Write of hub-client/changelog.md and injects a reminder
    (visible to the agent) with the exact command and the delimiter warning.
    Registered in .claude/settings.json next to format-rust.sh.
    Non-blocking, ~0 latency; does not run the test itself (that would add
    latency and needs a built WASM).
  • Passive — header note. A cautionary note in changelog.md's HTML
    comment header, at the point of edit, for human contributors and as a
    backstop.
  • Plan doc updated (claude-notes/plans/2026-07-07-…) with the chosen design.

Verification

  • Hook fires on hub-client/changelog.md (absolute + relative paths), stays
    silent for .rs files and docs/changelog.md; output is valid
    additionalContext JSON.
  • The hook fired live on the edit that added the header note (dogfooded).
  • cd hub-client && npm run test:wasm129/129 pass with the header
    note in place (delimiters inside the <!-- --> comment are not parsed).

Strand: bd-q5o7ekzn.

🤖 Generated with Claude Code

…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>
@posit-snyk-bot

posit-snyk-bot commented Jul 7, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cscheid cscheid merged commit 3cf352b into main Jul 7, 2026
8 checks passed
@cscheid cscheid deleted the chore/bd-q5o7ekzn-changelog-guardrail branch July 7, 2026 19:57
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.

2 participants