Repository navigation
fix(lock): hash only the llms.txt and pages of a docs unit - #15
Merged
Merged
Conversation
The lock hashed every file in a docs folder. A package that points `docs` at its source folder, with pages next to the code, as UI Kit does with `docs: "../src"`, got a stale lock from every change to a source or test file, so `sync --check` failed on unrelated pull requests. A docs unit is its `llms.txt` and its `.md` and `.mdx` pages (spec 2.7), so its hash now covers only those. Spec 6.3 says so. A docs folder of only pages keeps its hash. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gr8S7GamurMRrRt4fBQ4Zy
…e-wz2ua2 # Conflicts: # harnesspm.lock.json
Contributor
📦 Snapshot releasePublished |
Merged
tenphi
pushed a commit
to cube-js/cube-ui-kit
that referenced
this pull request
Nov 16, 2026
harnesspm 0.4.2 hashes a docs unit by its llms.txt and its .md and .mdx pages only (tenphi/harnesspm#15). UI Kit's harness indexes `docs: "../src"`, so before, every change to a component or test file made the lock stale and failed `harnesspm sync --check` in CI. `harnesspm sync` rewrote the `uikit:docs` hash once, and harnesspm's own docs and skills hashes for the new version. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gr8S7GamurMRrRt4fBQ4Zy
5 tasks done
This branch was previously deployed
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.
What changed
The lock's hash of a docs unit now covers only the docs unit's content: its
llms.txtand its.mdand.mdxpages. Before, it covered every file in the docs folder.src/lock.ts:hashDirtakes a filter. Docs units passisDocsFile. Skills keep hashing every file, because a skill's supporting files are part of the skill.test/sync.test.ts, written first and failing onmain: a source or test file next to the pages leaves the lock as it is, while a page orllms.txtchanges it.Why
UI Kit (cube-js/cube-ui-kit#1643) keeps its pages next to its components and points
docsat../src, as spec 2.7 allows. Every change to a.tsxfile then changed theuikit:docshash, so:src/failed CI'sharnesspm sync --checkuntil it re-synced and committed the lock;It showed up when a test-only fix on that PR failed the lint job with
harnesspm.lock.json is out of date.Compatibility
llms.txtand pages keeps its hash, so most locks do not change.syncrewrites it, and thepnpm installthat brings this version runs thatsyncinprepare.syncevent'schangedlist. It now reports a docs unit as changed only when its pages do.Verification
npm run typecheck,npm test(85 tests) andnpm run checkpass.npm run syncupdated this repo's lock for the spec change.mainwith "a source or test file is not a docs page" (sync --checkexits 1) and passes with the fix.syncchanges one line of the lock (uikit:docs), and the Glaze and Tasty docs hashes stay the same. After that, a test-file edit passessync --check, while a.docs.mdxedit still fails it, as it should.Generated by Claude Code