Skip to content

Adopt coherence v0.4.1; drop the docs-portability workaround - #8

Merged
daniloc merged 1 commit into
mainfrom
adopt-coherence-0.4.1
Jun 22, 2026
Merged

Adopt coherence v0.4.1; drop the docs-portability workaround#8
daniloc merged 1 commit into
mainfrom
adopt-coherence-0.4.1

Conversation

@daniloc

@daniloc daniloc commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Follow-up to the CI-green work (#6, #7): the docs-freshness failure was a coherence-tool bug — docs --check normalized the generatedAt timestamp but not absRoot (the absolute checkout path baked into graph.json/_graph.html), so the committed artifacts only matched the machine that generated them.

Fixed upstream in coherence v0.4.1 (docs --check now normalizes absRoot too), so the mnemion-side shim is no longer needed:

  • re-pin coherence-harnessgithub:daniloc/coherence#v0.4.1
  • coherence:docs / coherence:docs:check → back to the plain tool commands
  • delete scripts/coherence-normalize.mjs (the stop-gap from CI: make coherence docs portable (green the freshness gate) #7)
  • regenerate the committed docs with the fixed tool (natural output, real absRoot)

Verified cross-env: with the fixed tool wired, tampering the committed absRoot to a foreign /home/runner/… path still reports docs current. Full set green locally: conventions / injection-lint / atlas / coherence:docs / coherence:verify / typecheck / 725 tests.

🤖 Generated with Claude Code

coherence v0.4.1 fixes the docs-freshness gate upstream: `docs --check` now
normalizes absRoot (the absolute checkout path) as well as the timestamp, so the
gate compares only the derived graph, not where it was generated. That makes the
local normalize shim redundant.

- re-pin coherence-harness → github:daniloc/coherence#v0.4.1
- coherence:docs / coherence:docs:check → back to the plain tool commands
- delete scripts/coherence-normalize.mjs (the stop-gap)
- regenerate the committed docs with the fixed tool (natural output)

Verified cross-env: with the fixed tool wired, tampering graph.json/_graph.html's
absRoot to a foreign /home/runner/... path still reports "docs current". Full set
green locally: conventions / injection-lint / atlas / coherence:docs / coherence:
verify / typecheck / 725 tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
mnemion 2432f93 Jun 22 2026, 06:09 PM

@daniloc
daniloc merged commit bfa35e4 into main Jun 22, 2026
5 checks passed
@daniloc
daniloc deleted the adopt-coherence-0.4.1 branch June 22, 2026 18:11
daniloc added a commit that referenced this pull request Jun 23, 2026
)

Two-layer prevention for the class where a source edit drifts the committed
coherence graph and CI fails late on coherence:docs:check:

1. Tool fix — bump coherence v0.5.0 → v0.5.1, whose freshness gate now
   normalizes out line numbers. A comment/line-shift edit no longer drifts
   graph.json/_graph.html, so the common false positive is gone and committed
   graph diffs show only real structural change. (This is the deeper fix for
   the cross-env gate finickiness #7/#8 worked around.)

2. Shift-left — a pre-push hook (scripts/git-hooks/pre-push, auto-installed
   via the `prepare` script setting core.hooksPath) runs coherence:docs:check
   before a push. With v0.5.1 it fires ONLY on genuine structural drift
   committed without a regenerate — blocking it on your machine instead of in
   CI, with the exact fix command. Bypass with `git push --no-verify`.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant