feat: Add callers/ virtual directory for cross-reference navigation#32
Conversation
Expose GetCallers through the filesystem as a callers/ subdirectory on both NFS and FUSE backends. For any directory node, callers/ lists the graph nodes that reference that token (function/method name). - NFS: entries are graphFiles returning actual caller source content - FUSE: entries are symlinks pointing back into the graph - Self-gating: callers/ only appears when GetCallers returns results Also updates all stale documentation (ARCHITECTURE, README, CLAUDE, ROADMAP) to reflect current architecture including both NFS and FUSE backends, callers/, and all features landed since last doc update. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds cross-reference navigation to the filesystem by exposing GetCallers(token) as a self-gating callers/ virtual directory across both mount backends (NFS GraphFS and FUSE MacheFS), and refreshes project docs to reflect the current multi-backend architecture and feature set.
Changes:
- Implement
callers/virtual directory behavior in NFS (GraphFS) and FUSE (MacheFS) backends. - Add unit tests covering
callers/stat/readdir/open behavior for NFS and getattr/opendir/readlink behavior for FUSE. - Update ROADMAP/ARCHITECTURE/README/CLAUDE to reflect NFS+FUSE backends, write pipeline, and virtual directories (including
callers/).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/nfsmount/graphfs.go | Adds callers/ virtual dir support (listing + entry open + lstat + parent dir self-gating). |
| internal/nfsmount/graphfs_test.go | Adds NFS backend tests for callers/ virtual directory semantics. |
| internal/fs/root.go | Adds FUSE backend callers/ support (getattr/opendir/readlink + parent dir self-gating). |
| internal/fs/root_test.go | Adds FUSE backend tests for callers/ behavior and symlink targets. |
| docs/ROADMAP.md | Updates “landed” features and near-term plans to reflect current architecture/features. |
| docs/ARCHITECTURE.md | Updates architecture diagram and documentation for NFS+FUSE backends and virtual directories including callers/. |
| README.md | Adds documentation section describing callers/ call-chain navigation. |
| CLAUDE.md | Updates contributor/architecture notes to match current backends and feature set. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| buf := make([]byte, 1024) | ||
| n, _ := f.Read(buf) | ||
| require.True(t, n > 0) | ||
| assert.Equal(t, "func Foo() { Bar() }", string(buf[:n])) |
There was a problem hiding this comment.
This test ignores the error returned from Read; if the implementation changes to return (n, io.EOF) on a full read, this could mask failures. Capture and assert the Read error (allowing io.EOF as appropriate) to make the test more robust.
Address Copilot review: validate parentDir exists (and isn't root) in OpenFile, ReadDir, Opendir, and Readlink — matching the checks already present in Lstat/Getattr. Skip unresolvable caller nodes in ReadDir instead of listing them with size 0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Expose GetCallers through the filesystem as a callers/ subdirectory on both NFS and FUSE backends. For any directory node, callers/ lists the graph nodes that reference that token (function/method name).
Also updates all stale documentation (ARCHITECTURE, README, CLAUDE, ROADMAP) to reflect current architecture including both NFS and FUSE backends, callers/, and all features landed since last doc update.
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
Fixes # (issue)
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: