Old publish-site.sh publishes from a working clone and reverts humanizer passes
hermes · confidence high · status active
tags: publish-site knowledgelayer ai-hub cron humanizer regression
Now
Two different publish-site.sh files exist, and the crontab runs the wrong one.
- Runs in prod:
~/Projects/knowledgelayer/tools/publish-site.sh(2650 bytes, mtime 2026-07-10). It publishes from the live working clone~/Projects/ai-huband refuses to touch a dirty tree. - Never installed:
~/.hermes/knowledgelayer/tools/publish-site.sh(3743 bytes, mtime 2026-07-17). It clones into~/.cache/publish-site/ai-hub, hard-resets toorigin/main, and setsgit config credential.helper '!gh auth git-credential'.
The crontab line is 40 */6 * * * $HOME/Projects/knowledgelayer/tools/publish-site.sh >> $HOME/.hermes/logs/publish-site.log 2>&1.
Consequences, observed 2026-09-19:
- The job has never succeeded. Of 278 log lines, 204 are
fatal: could not read Username for 'https://github.com'and 74 areBLOCKED: ai-hub working tree dirty. There is no success marker. Push auth fails because the working clone'scredential.helperisosxkeychain, which has no GitHub credential in a cron context, and the old script never sets one. - The public mirror froze.
kl/index.mdstill readsSnapshot generated 2026-08-13T02:00:38+10:00 · 26 entries(live site, fetched 2026-09-19T19:22+10:00), while the canonical brain at~/.hermes/knowledgelayeris 145 commits ahead (HEAD e0400f0, 2026-09-19). - Running the old script by hand is destructive. A manual run at 2026-09-19 19:13:54 published an
Aug-24 snapshot (commit ca8cca1, 22 files) and reverted the 2026-08-29 humanizer pass across
20
kl/*.mdfiles: bold-header bullets such as**entity**came back, andkl/index.md's snapshot label moved backwards from the humanized copy to the 2026-08-24 generator output.
The generator itself is the source of the formatting regression. scripts/sync-knowledgelayer.mjs
line 238 hardcodes Entries are typed (**entity**, **decision**, **playbook**, **lesson**) in its
index.md template, so every publish re-introduces that tell regardless of humanizer edits. Any fix
must change the template, not just the published file.
Rollback used: git revert ca8cca1 → 23ca0bb, pushed 2026-09-19. Verified restored with
git diff --stat ff9fff9 HEAD -- kl static/knowledgelayer (empty) and a live fetch showing the
2026-08-13 / 26-entry snapshot with no <strong> tell.
Log
- 2026-09-19: recorded after a control-room status brief. Do not run
~/Projects/knowledgelayer/tools/publish-site.shon this host until the crontab points at the canonical script; it mutates and pushes to the public site repo., hermes.
Sources:
~/.hermes/logs/publish-site.log (278 lines · 2026-07-10 to 2026-09-16) · crontab -l on macbook-pro-3 · read 2026-09-19T19:10+10:00 · ~/Projects/ai-hub git log · diff of ~/Projects/knowledgelayer/tools/publish-site.sh vs ~/.hermes/knowledgelayer/tools/publish-site.sh