fix: cron commits trigger Pages; tighten diff-guard; scrollable card comments#149
Merged
Merged
Conversation
…on card comments
User reported 5 issues, all root-caused and fixed:
1. **Personality cron isn't updating the website** (and other crons too).
Root cause: GitHub deliberately suppresses workflow triggers from
GITHUB_TOKEN-authored pushes (anti-loop policy). Every cron correctly
regenerated web/data/projects.json and committed, but pages.yml's
`push` trigger silently no-opped — bot commits never fired Pages
deploys.
Fix: each of the 10 cron workflows now ends with an explicit
'Trigger Pages deploy' step that runs `gh workflow run pages.yml`
when the previous commit step set pushed=true. workflow_dispatch
invoked from another workflow DOES fire regardless of token
provenance. All YAML re-validated.
2. **Comments don't appear on cards (and aren't scrollable).**
Root cause: the JS rendering was correct (45 comments across 19
projects already feed into the inline .comments-block) but had no
max-height + overflow-y; +N more would push the card layout instead
of scrolling.
Fix: web/css/site.css adds `.card .comments-block.expanded` with
max-height 320px + overflow-y:auto + scroll-behavior:smooth. The
existing JS already toggles .expanded on +N more click.
3. **Markdown rendering shows literal '--- a/path' / '@@ -N,N' diff
markers.** Root cause: the speckit diff-guard at tasks_cmd.py:161
only caught `@@`-prefixed leads; missed `--- a/<path>` headers
AND the escalate-branch wrote patches verbatim without guarding.
7 production .md files were polluted (PROJ-001 spec/plan/tasks,
PROJ-007 spec, PROJ-008 spec, PROJ-023 spec/plan).
Fix:
- New module src/llmxive/speckit/_diff_guard.py with 4-way detection
(hunk-only lead, --- a/ lead, +++ b/ lead, 2+ markers anywhere,
context-diff format). Single source of truth (Constitution I).
- Wired into tasks_cmd.py (main path + escalate-branch),
specify_cmd.py, plan_cmd.py — refusing diff-shaped writes
across all three speckit writers.
- 12 unit tests for the guard, including the exact PROJ-001
pollution shape + MUST-NOT-misclassify cases (markdown HR rules,
em-dashes, well-formed spec content).
- 7 polluted files purged from disk; 3 affected projects rolled
back to flesh_out_complete via the same _walk_back_to_real_stage
used by spec 010's speckit prune. Stage rollbacks recorded in
history.jsonl + state/run-log/.
4. **Missing artifacts / dead links.** Root cause: the user was
actually seeing the diff-polluted markdown (links inside
'--- a/spec.md' are non-clickable text). The artifact-link code
in dialog.js already correctly suppresses null relpaths.
Resolution: subsumed by fix 3.
5. **No cron triggers a Pages rebuild after touching dashboard files.**
Resolution: subsumed by fix 1 (every cron now triggers Pages
deploy after a successful commit).
Test sweep:
- 12 new diff-guard tests pass.
- 78/78 spec-010 + librarian-gate tests pass.
- web/data/projects.json regenerated after cleanup.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Five user-reported issues, all root-caused and fixed in a single bundle.
Issues
Personality cron (and all crons) aren't updating the website.
Root cause: GitHub deliberately suppresses workflow triggers from
GITHUB_TOKEN-authored pushes. Every cron correctly regenerated
web/data/projects.jsonand committed, butpages.yml'spushtrigger silently no-opped — bot commits never fired Pages deploys.
Comments don't appear in cards / aren't scrollable.
Root cause: JS rendering was correct (45 comments across 19 projects
already feed the inline
.comments-block) but had no max-height +overflow-y; "+N more" pushed card layout instead of scrolling.
Markdown renders literal '--- a/path' / '@@ -N,N' diff markers.
Root cause: speckit diff-guard at
tasks_cmd.py:161only caught@@-prefixed leads; missed--- a/<path>headers AND theescalate-branch wrote patches verbatim without guarding.
7 production .md files polluted (PROJ-001 spec/plan/tasks,
PROJ-007 spec, PROJ-008 spec, PROJ-023 spec/plan).
Missing artifacts / dead links. Root cause: subsumed by issue 3
— the user was seeing diff-polluted markdown bodies (links inside
--- a/spec.mdtext are non-clickable). The artifact-link code indialog.jsalready correctly suppresses null relpaths.No cron triggers a Pages rebuild after touching dashboard files.
Subsumed by fix 1.
Fixes
Fix 1: pages-deploy dispatch from every cron (10 workflows)
Each cron's commit step now sets
pushed=true|falsein$GITHUB_OUTPUT,and a follow-up step runs
gh workflow run pages.yml --ref mainwhenpushed == 'true'.workflow_dispatchinvoked from a workflow DOESfire regardless of token provenance — unlike
push.Workflows touched:
pipeline-{personality,brainstorm,flesh-out,implement,paper-speckit,paper-write,research-speckit,review}.yml,submission-intake.yml,paper-compile.yml. All YAML re-validated.Fix 2: tighten + share diff-guard
src/llmxive/speckit/_diff_guard.py(single source oftruth, Constitution I) catches:
@@ -N,N +N,N @@hunk-only leads (original case)--- a/<path>lead (NEW — the case that polluted PROJ-001)+++ b/<path>lead*** old\n--- new)tasks_cmd.py(main +escalate-branch patches),
specify_cmd.py,plan_cmd.py.flesh_out_completevia the same_walk_back_to_real_stageused byspec 010's speckit prune. Rollbacks recorded in
state/projects/<id>.history.jsonl+state/run-log/.Fix 3: scrollable comments block
web/css/site.cssadds:The existing JS toggle (
+N more→.expandedclass) already works;this just constrains the height when expanded so the user scrolls instead
of pushing the card layout.
Tests
_diff_guard: hunk-only leads,--- a/leads,+++ b/leads, 2+-marker detection, context-diff format. Critically,also tests that markdown HR rules (
---) and em-dashes don't false-fire.web/data/projects.jsonregenerated after cleanup.🤖 Generated with Claude Code