Fail fast with an actionable error when a local registry, dependency, template, or policy path does not exist#1598
Open
ANcpLua wants to merge 1 commit into
Conversation
A relative dependency registry_path in a registry manifest resolves against the process working directory. Running weaver from any other directory failed late with a bare "IO error … No such file or directory" that named neither the base directory used nor the file that declared the path. VirtualDirectory now rejects a nonexistent LocalFolder eagerly: the error names the path as written, the absolute path it resolved to against the current working directory, and explains the resolution semantics. Absolute paths get a plain "does not exist". No behavior change for existing paths.
ANcpLua
force-pushed
the
fix/vdir-not-found-diagnostics
branch
from
July 17, 2026 07:08
f4698eb to
1eb4ba1
Compare
ANcpLua
marked this pull request as ready for review
July 17, 2026 07:12
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1598 +/- ##
=====================================
Coverage 81.2% 81.2%
=====================================
Files 130 130
Lines 11463 11476 +13
=====================================
+ Hits 9308 9319 +11
- Misses 2155 2157 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A relative
registry_pathin a registry manifest dependency resolves against the process working directory. Running weaver from any other directory fails late in resolution with a bare— no mention of which base directory the path was resolved against, or that the CWD is what matters. Hit in practice consuming
semantic-conventions-genai(multi-registry manifest withregistry_path: ./.build/sc-upstream-filtered) from an external codegen pipeline: the main registry resolves fine via-r, then the dependency dies with the message above.Change
VirtualDirectorynow rejects a nonexistentLocalFoldereagerly. The error names the path as written, the absolute path it resolved to against the current working directory, and explains the resolution semantics:Absolute paths get a plain "local path does not exist". No behavior change for existing paths. Because the check lives in the shared
VirtualDirectorylayer, it also covers the main-rregistry path, template and policy paths, and the case where a mistyped URL parses as aLocalFolder.Non-goal
This does not change resolution semantics. Whether a dependency
registry_pathshould (also) resolve relative to the manifest location is a separate design discussion — happy to open an issue laying out the options (resolution fallback order, opt-in field, breaking switch) if there is interest.Testing
./dep-modeldependency fails with the new message from the wrong CWD and resolves unchanged from the correct one.