deps path: caller errors print as a clean dev: line, not a backtrace - #191
Merged
Merged
Conversation
Dev::Deps::Accessor's five errors were plain StandardErrors, so a `dev deps path gh <not-in-lockfile>` fell through Runner#exit_for's unmapped arm and re-raised with a backtrace — downstream scripts (cellbound-3d's editor_host.rb) rescued the first backtrace line as the message. They are the caller's problem: UsageError (RuntimeError, like the sibling accessors), NotLockedError/PlatformNotLockedError (operand the lockfile does not know: ArgumentError), NotCachedError/ NotInstalledError (locked, not provisioned — run dev up: RuntimeError). Test asserts each parent. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
JPDuchesne
added a commit
that referenced
this pull request
Sep 30, 2026
28a8cfb Merge pull request #191 from d3mlabs/jpd/deps-path-clean-errors 6bdd27b deps path: caller errors print as a clean dev: line, not a backtrace 9fb2abb Merge pull request #190 from d3mlabs/jpd/188-command-tree a0118f5 Docs: every command may have children; dev is the root node fa98c38 dev itself is a node: the root group, one usage view, help everywhere fece2a6 Children is a property of every Command; CommandGroup is the no-body node 6b36cfd Cover the leaves' default accessor factories cb36d73 Docs: completion + global groups in README, dispatch skill, builtins header 3352022 Tab completion descends the command tree d45055b plan becomes a group: one leaf per verb over public Plan::Accessor verbs 24a06fc learnings becomes a group: sync/status/invariants/init leaves over public Accessor verbs 9b07ea9 cred becomes a group: a get leaf over the public CredentialAccessor#get 0c5d9e2 config becomes a group: list/get/set leaves over public ConfigAccessor verbs 5a995c6 GlobalDispatch resolves a GlobalCatalog through the command tree c3afc2f Extract WorkspaceRoot: cwd-anchored workspace/project roots for global commands e7eec54 Cover the repository's unoverridable-own wiring guard a17c53f Keep the command-dispatch skill within the detail-skill line cap c070f48 Document the command tree: dev.yml nested commands, resolution rule, dispatch skill a5beaf9 Type-check the tree: Command includes Kernel; resolve keeps its node typed across the loop 640191c runner is a builtin group: RunnerRegisterCommand and RunnerStatusCommand are its leaves 3f9f5cf cache is a builtin group: CacheGcCommand is its gc leaf 41bdc2a deps is a builtin group: DepsPathCommand is its path leaf 18f4c37 dev help <path> renders the usage of the node at that path ce50621 Resolve argv down the command tree in CommandService; GroupExecutor prints a pure group's usage 4cf984e CommandRepository assembles and resolves the command tree 9e82ca8 Carry the parsed command tree through ProjectManifest 3172e25 Parse nested dev.yml commands into ProjectCommandGroup 4cad969 Add CommandGroup: the command tree node as a fourth sealed Command variant 614c244 Merge pull request #183 from d3mlabs/jpd/readme-builtin-commands-overview 2fa4738 README: Usage directly after Installation 8fb4fe3 README: top-level Built-in commands view under Usage e7597ce Merge pull request #182 from d3mlabs/jpd/readme-minimal-installation c13a284 README: minimal, complete Installation section
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.
What
dev deps path gh <not-in-lockfile>(and the other fourDev::Deps::Accessorfailures) printed a raw Ruby backtrace: the errors were plainStandardErrors, soRunner#exit_fortreated them as dev bugs and re-raised. They are the caller's problem and now descend from the two rootsexit_forprints asdev: <message>+ exit 1:UsageError→RuntimeError(the convention of the cd/clone/plan/learnings accessors)NotLockedError,PlatformNotLockedError→ArgumentError(an operand the lockfile does not know)NotCachedError,NotInstalledError→RuntimeError(locked, not provisioned — "run dev up")Messages are unchanged and already remediate. Downstream, cellbound-3d's
editor_host.rbrescuesdev deps pathfailures and shows the first line — that line is now the message instead of a backtrace frame.Verification
Test-first: a Where table asserting each class's parent (5 failures before, green after).
dev teston the deps/runner files,dev tc,dev styleclean. Smoke from cellbound-3d:dev deps path gh nope→dev: nope (gh) is not in the lockfile — run dev update-deps, exit 1.Made with Cursor