-
Notifications
You must be signed in to change notification settings - Fork 0
feat(deploy): display math preflight + pre-commit validation #368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Data-Wise
pushed a commit
that referenced
this pull request
Feb 10, 2026
…etection Address all 5 issues from PR #368 code review: - Replace inline Python with native ZSH state machine (_check_math_blanks) - Fix path resolution using git rev-parse --show-toplevel - Add ci_mode handling (return 1 to block deploy) - Remove reference to nonexistent scripts/fix-math-blanks.sh - Add unclosed $$ block detection (return code 2) - Add 13-case unit test suite (test-math-blanks-unit.zsh) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pure ZSH state machine that detects blank lines and unclosed $$ blocks in .qmd files during deploy preflight. Replaces inline Python dependency. - _check_math_blanks: returns 0 (clean), 1 (blank line), 2 (unclosed) - Path resolution via git rev-parse --show-toplevel - CI mode blocks deploy on math issues; interactive mode warns only - Actionable fix messages (no reference to nonexistent scripts) - 41 tests: 13 unit, 13 E2E (sandboxed git repos), 15 dogfood (demo course) - Docs: deploy guide, refcard, API reference updated Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
607c013 to
ee4b2a1
Compare
- Declare _line and _stripped as local in _check_math_blanks - Move _abs_path and _qmd_file declarations before loop body - Print "[ok] Display math blocks valid" even when no .qmd files changed Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire _check_math_blanks into the pre-commit hook so display-math issues (blank lines in $$ blocks, unclosed $$ blocks) are caught at commit time, not just deploy time. - scripts/check-math.zsh: standalone wrapper for lint-staged - package.json: add *.qmd lint-staged entry - docs/guides/QUALITY-GATES.md: comprehensive validation layer docs - mkdocs.yml: add Quality Gates nav entry - TEACH-DEPLOY-GUIDE.md: cross-reference to pre-commit gate Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test file count 137 → 143 - Add scripts/ dir and check-math.zsh to project structure - Add deploy preflight mention to teaching subcommands - Update last-updated date Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Data-Wise
added a commit
that referenced
this pull request
Feb 10, 2026
* chore: update .STATUS for v6.6.0 release session Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(deploy): display math preflight + pre-commit validation (#368) * feat(deploy): add display math preflight validation Pure ZSH state machine that detects blank lines and unclosed $$ blocks in .qmd files during deploy preflight. Replaces inline Python dependency. - _check_math_blanks: returns 0 (clean), 1 (blank line), 2 (unclosed) - Path resolution via git rev-parse --show-toplevel - CI mode blocks deploy on math issues; interactive mode warns only - Actionable fix messages (no reference to nonexistent scripts) - 41 tests: 13 unit, 13 E2E (sandboxed git repos), 15 dogfood (demo course) - Docs: deploy guide, refcard, API reference updated Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(deploy): declare loop vars local, add status line for no-qmd case - Declare _line and _stripped as local in _check_math_blanks - Move _abs_path and _qmd_file declarations before loop body - Print "[ok] Display math blocks valid" even when no .qmd files changed Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(preflight): add pre-commit math validation via lint-staged Wire _check_math_blanks into the pre-commit hook so display-math issues (blank lines in $$ blocks, unclosed $$ blocks) are caught at commit time, not just deploy time. - scripts/check-math.zsh: standalone wrapper for lint-staged - package.json: add *.qmd lint-staged entry - docs/guides/QUALITY-GATES.md: comprehensive validation layer docs - mkdocs.yml: add Quality Gates nav entry - TEACH-DEPLOY-GUIDE.md: cross-reference to pre-commit gate Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: update CLAUDE.md for math preflight feature - Test file count 137 → 143 - Add scripts/ dir and check-math.zsh to project structure - Add deploy preflight mention to teaching subcommands - Update last-updated date Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Test User <test@example.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * chore: release v6.7.0 — Math Preflight + Quality Gates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Test User <test@example.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Data-Wise
added a commit
that referenced
this pull request
Feb 10, 2026
* chore: update .STATUS for v6.6.0 release session Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(deploy): display math preflight + pre-commit validation (#368) * feat(deploy): add display math preflight validation Pure ZSH state machine that detects blank lines and unclosed $$ blocks in .qmd files during deploy preflight. Replaces inline Python dependency. - _check_math_blanks: returns 0 (clean), 1 (blank line), 2 (unclosed) - Path resolution via git rev-parse --show-toplevel - CI mode blocks deploy on math issues; interactive mode warns only - Actionable fix messages (no reference to nonexistent scripts) - 41 tests: 13 unit, 13 E2E (sandboxed git repos), 15 dogfood (demo course) - Docs: deploy guide, refcard, API reference updated Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(deploy): declare loop vars local, add status line for no-qmd case - Declare _line and _stripped as local in _check_math_blanks - Move _abs_path and _qmd_file declarations before loop body - Print "[ok] Display math blocks valid" even when no .qmd files changed Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(preflight): add pre-commit math validation via lint-staged Wire _check_math_blanks into the pre-commit hook so display-math issues (blank lines in $$ blocks, unclosed $$ blocks) are caught at commit time, not just deploy time. - scripts/check-math.zsh: standalone wrapper for lint-staged - package.json: add *.qmd lint-staged entry - docs/guides/QUALITY-GATES.md: comprehensive validation layer docs - mkdocs.yml: add Quality Gates nav entry - TEACH-DEPLOY-GUIDE.md: cross-reference to pre-commit gate Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: update CLAUDE.md for math preflight feature - Test file count 137 → 143 - Add scripts/ dir and check-math.zsh to project structure - Add deploy preflight mention to teaching subcommands - Update last-updated date Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Test User <test@example.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * chore: release v6.7.0 — Math Preflight + Quality Gates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: update What's New callout for v6.7.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Test User <test@example.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
_check_math_blanks) for display math validation$$blocks (breaks Quarto PDF rendering)$$blocks (breaks all rendering).qmdmath issues at commit timeChanges
Core
lib/dispatchers/teach-deploy-enhanced.zsh—_check_math_blanks()function + deploy preflight integrationscripts/check-math.zsh— standalone wrapper for lint-staged pre-commit hookpackage.json—*.qmdlint-staged entryDocumentation
docs/guides/QUALITY-GATES.md— new comprehensive quality gates referencedocs/guides/TEACH-DEPLOY-GUIDE.md— pre-commit cross-reference admonitiondocs/reference/REFCARD-DEPLOY-V2.md— deploy refcard updatesdocs/reference/MASTER-API-REFERENCE.md— API reference updatesmkdocs.yml— Quality Gates nav entryCLAUDE.md— test count 137→143, scripts/ dir, deploy preflight mentionTests
Test plan
$$).qmdblocked by lint-staged, clean files passmkdocs build --strict— no new warnings🤖 Generated with Claude Code