Repository navigation
docs(docs): record eager file hashes in adr 0007 - #221
Merged
Merged
Conversation
Tchips46
approved these changes
Nov 5, 2026
Tchips46
previously approved these changes
Nov 5, 2026
Exeloo
force-pushed
the
docs/adr-eager-file-hashes
branch
from
November 5, 2026 15:12
650f428 to
8377145
Compare
Tchips46
approved these changes
Nov 5, 2026
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 does this PR do?
Stacked on #220 (
feat/handle-online). No linked issue: it records a decision made in the review of #214 (cache system with OPFS).Adds
docs/adr/0007-eager-file-hashes.md. The server hashes every file when a project is listed (eager), rather than when a file is read (lazy). Opening a project takes one longer load, and after that every cached file opens from OPFS with no request to the server.The ADR also covers:
knownHashgoes toreadManyand the cost is one round trip per first read; and hashing in the background, which needs a push channel.FileHashes._loaddrops the olderfile-hashes.jsonformat. Only pre-review builds of feat: add cache system with OPFS #214 wrote it, so converting it is optional.Docs only, no code change.
Merge danger
Low. Docs only, and a two-way door. It merges with the rest of the stack.
Follow-up issues
None filed. Candidate: the comment at
packages/server-core/src/fs/file-hashes.ts:120says older saved files are dropped, but that format never shipped onmain. It can be fixed in #214's own review loop.Quality gate
reviewer: no blocking findings. 1 important and 1 minor finding, both fixed (framing of the older format, skip list); 1 question fixed (git checkout re-hashes only the files git rewrites)prettier --checkpassesHow do you test this PR?
Read
docs/adr/0007-eager-file-hashes.md, and check its claims againstpackages/server-core/src/fs/fs-service.ts(list,_readOne),packages/server-core/src/fs/file-hashes.ts,packages/server-core/src/project/project-registry.tsandpackages/project/src/fs/project-fs.ts(refresh,_fetch). Checked at the head offeat/handle-online.pnpm exec prettier --check docs/adr/0007-eager-file-hashes.md