Skip to content

feat(api): add file checksums to the directory tree - #2117

Merged
groksrc merged 2 commits into
mainfrom
shipright/BMEM-122
Nov 14, 2026
Merged

groksrc merged 2 commits into
mainfrom
shipright/BMEM-122

Conversation

@groksrc

@groksrc groksrc commented Nov 14, 2026

Copy link
Copy Markdown
Member

Adds checksum to 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 from Entity.checksum for file nodes in DirectoryService.get_directory_tree. This is the same value the note's entity response returns as checksum. Directory nodes and /directory/structure leave it unset (the route already omits nulls).
  • Read-cache retirement: the tree route is cached for 7 days, and its key had no response-shape marker. I changed only the directory_tree operation's value to directory_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

  • Service test and route test compare each file node's checksum with the entity's, and check directory nodes and /directory/structure have none.
  • A test asserts the tree operation value changed and all others are unchanged.
  • Ran locally: 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

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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T16:30:24.837637Z b609026 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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 groksrc left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@groksrc groksrc added the review:done Automated review found no blocking issues label Nov 14, 2026
@groksrc
groksrc merged commit fb4f4c8 into main Nov 14, 2026
43 checks passed
@groksrc
groksrc deleted the shipright/BMEM-122 branch November 14, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:done Automated review found no blocking issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant