Skip to content

fix: resolve relative source paths against vault basePath (#40) - #43

Merged
jflowers merged 1 commit into
mainfrom
opsx/fix-relative-source-paths
Apr 11, 2026
Merged

jflowers merged 1 commit into
mainfrom
opsx/fix-relative-source-paths

Conversation

@jflowers

Copy link
Copy Markdown
Contributor

Summary

  • Fix relative path resolution in createDiskSource() and createCodeSource() in source/manager.go
  • Replace if path == "." { path = basePath } with if !filepath.IsAbs(path) { path = filepath.Join(basePath, path) } — all relative paths (e.g., ../gaze, ../website) now resolve against the vault root regardless of dewey's CWD
  • Add DEBUG logging with raw and resolved paths for diagnostics
  • 4 new tests: relative path, absolute passthrough, dot path, code source relative
  • Also includes /uf-init customizations: Dewey context queries and 3-tier degradation in OpenSpec skill/command files

Closes #40

- Replace path == "." check with !filepath.IsAbs() in both
  createDiskSource and createCodeSource — all relative paths
  (../gaze, ../website) now resolve against the vault root
- Add DEBUG logging with raw and resolved paths for diagnostics
- 4 new tests: relative path, absolute passthrough, dot path,
  code source relative
- Apply /uf-init Dewey context and 3-tier degradation to
  OpenSpec skills and commands
@github-actions

Copy link
Copy Markdown

✅⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ GO golangci-lint yes yes no no 44.31s
⚠️ MARKDOWN markdownlint 3 0 3 0 0.82s
✅ REPOSITORY gitleaks yes no no 1.91s
✅ REPOSITORY git_diff yes no no 0.32s
✅ YAML yamllint 1 0 0 0.83s

Detailed Issues

⚠️ MARKDOWN / markdownlint - 3 errors
openspec/changes/fix-relative-source-paths/design.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Context"]
openspec/changes/fix-relative-source-paths/proposal.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Why"]
openspec/changes/fix-relative-source-paths/tasks.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## 1. Fix Path Resolution"]

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@jflowers
jflowers merged commit c53dc08 into main Apr 11, 2026
3 checks passed
@jflowers
jflowers deleted the opsx/fix-relative-source-paths branch April 11, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

bug: disk source relative paths not resolved against vault basePath — sibling repos show 0 pages

1 participant