Repository navigation
feat(api): add file checksums to the directory tree - #2117
Conversation
File nodes in GET /v2/projects/{id}/directory/tree now carry the note's
content checksum, so a client can tell which cached notes were edited.
The tree's read-cache operation value changes so entries cached without
checksums are never served; other cached reads keep their keys.
Tracked as BMEM-122.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
DCO Remediation Commit for Drew Cain <groksrc@gmail.com> I, Drew Cain <groksrc@gmail.com>, hereby add my Signed-off-by to this commit: b609026 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Drew Cain <groksrc@gmail.com>
groksrc
left a comment
There was a problem hiding this comment.
Verdict: done — no findings at head 5136d6c.
I reviewed checksum propagation from Entity to file nodes, omission from directory and structure responses, and the cache-key retirement scoped to the directory tree. The implementation is direct and preserves every other read-cache operation key.
Verification: the pull request is mergeable and all current checks pass. I also ran the focused service, route, and cache tests on this head: 48 passed. The post-deployment browser check remains intentionally deferred and does not block this code review.
Adds
checksumto file nodes of the directory tree, so a client can detect which cached notes were edited without refetching them. Tracked as BMEM-122.Changes
DirectoryNode.checksum(optional), set fromEntity.checksumfor file nodes inDirectoryService.get_directory_tree. This is the same value the note's entity response returns aschecksum. Directory nodes and/directory/structureleave it unset (the route already omits nulls).directory_treeoperation's value todirectory_tree_v2, so entries cached before this change are never read. Every other operation's key is unchanged; the global prefix is untouched, so other reads stay warm. Cost: one cold tree read per project after deploy.Tests
/directory/structurehave none.tests/services/test_directory_service.py,tests/api/v2/test_directory_router.py,tests/test_read_cache_route_class.py(48 passed); ruff clean.🤖 Generated with Claude Code