Skip to content

deps path: caller errors print as a clean dev: line, not a backtrace - #191

Merged
JPDuchesne merged 1 commit into
mainfrom
jpd/deps-path-clean-errors
Sep 30, 2026
Merged

JPDuchesne merged 1 commit into
mainfrom
jpd/deps-path-clean-errors

Conversation

@JPDuchesne

Copy link
Copy Markdown
Contributor

What

dev deps path gh <not-in-lockfile> (and the other four Dev::Deps::Accessor failures) printed a raw Ruby backtrace: the errors were plain StandardErrors, so Runner#exit_for treated them as dev bugs and re-raised. They are the caller's problem and now descend from the two roots exit_for prints as dev: <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.rb rescues dev deps path failures 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 test on the deps/runner files, dev tc, dev style clean. 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

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

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@JPDuchesne
JPDuchesne merged commit 28a8cfb into main Sep 30, 2026
5 checks passed
@JPDuchesne
JPDuchesne deleted the jpd/deps-path-clean-errors branch September 30, 2026 05:30
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
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