Skip to content

feat: expose location virtual file for source-origin orientation#87

Merged
jamestexas merged 1 commit intomainfrom
feat/location-virtual-file
Mar 13, 2026
Merged

feat: expose location virtual file for source-origin orientation#87
jamestexas merged 1 commit intomainfrom
feat/location-virtual-file

Conversation

@jamestexas
Copy link
Copy Markdown
Contributor

Summary

  • Adds a location virtual file to construct directories that bridges mache's construct-based paths back to original source file coordinates
  • Reading cat go/methods/processNode/location returns internal/ingest/engine.go:142:298
  • Closes the orientation gap: agents can now translate between mache paths and file:line coordinates (for stack traces, error messages, git diffs)
  • Wired into all three presentation layers: NFS, FUSE, and MCP server (list_directory + read_file)

Test plan

  • TestLocationHandler — Match, Stat, ReadContent for nodes with/without location
  • TestLocationHandler_DirExtras — virtual file appears in directory listings
  • Full test suite passes (task test)
  • task lint clean
  • Manual: mache --agent -d .cat go/methods/processNode/location shows file:line:line

🤖 Generated with Claude Code

Adds a `location` virtual file to construct directories that have a
source origin. Reading it returns `relative/path.go:startLine:endLine`,
bridging the gap between mache's construct-based paths and original
source file coordinates.

Surfaces in all three presentation layers:
- NFS mount (via vfs.LocationHandler)
- FUSE mount (via vfs.LocationHandler)
- MCP server (list_directory + read_file)
@jamestexas jamestexas merged commit 196f0e2 into main Mar 13, 2026
12 checks passed
@jamestexas jamestexas deleted the feat/location-virtual-file branch March 13, 2026 01:01
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.

1 participant