Skip to content

feat: Add callers/ virtual directory for cross-reference navigation#32

Merged
jamestexas merged 2 commits into
mainfrom
feat/callers-virtual-directory
Feb 16, 2026
Merged

feat: Add callers/ virtual directory for cross-reference navigation#32
jamestexas merged 2 commits into
mainfrom
feat/callers-virtual-directory

Conversation

@jamestexas
Copy link
Copy Markdown
Contributor

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.

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • Unit Tests
  • Manual verification (please describe)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment on lines +597 to +600
buf := make([]byte, 1024)
n, _ := f.Read(buf)
require.True(t, n > 0)
assert.Equal(t, "func Foo() { Bar() }", string(buf[:n]))
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment thread internal/nfsmount/graphfs.go
Comment thread internal/nfsmount/graphfs.go
Comment thread internal/fs/root.go
Comment thread internal/fs/root.go
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>
@jamestexas jamestexas merged commit cf7349c into main Feb 16, 2026
8 checks passed
@jamestexas jamestexas deleted the feat/callers-virtual-directory branch February 16, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants