Skip to content

[codex] Structure catalog dependency resolution failures#3298

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/catalog-resolution-error
Jun 20, 2026
Merged

[codex] Structure catalog dependency resolution failures#3298
juliusmarminge merged 1 commit into
mainfrom
codex/catalog-resolution-error

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jun 20, 2026

Copy link
Copy Markdown
Member

Summary

  • replace the generic missing-catalog throw with a schema-backed CatalogDependencyResolutionError
  • retain the workspace package, dependency name, catalog spec, and resolved lookup key as structured context
  • preserve existing wrapping behavior so build-script errors keep the catalog error as their cause
  • add focused coverage for the structured failure

Validation

  • vp test run scripts/lib/resolve-catalog.test.ts scripts/build-desktop-artifact.test.ts (20 tests)
  • vp check
  • vp run typecheck

Note

Low Risk
Localized change to build-script error typing and messaging; behavior on failure stays the same aside from error class and structured fields.

Overview
Catalog resolution failures in resolveCatalogDependencies now throw CatalogDependencyResolutionError (Effect Schema.TaggedErrorClass) instead of a plain Error, with fields for workspace package, dependency name, catalog spec, and catalog lookup key. The third argument is renamed from label to workspacePackage; the human-readable message matches the previous string.

Adds resolve-catalog.test.ts to assert the error type, structured fields, and message when a catalog: spec cannot be resolved.

Reviewed by Cursor Bugbot for commit 4a661d2. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Replace generic Error with structured CatalogDependencyResolutionError in catalog resolution

Introduces CatalogDependencyResolutionError, a tagged error class (via effect/Schema) with structured fields: workspacePackage, dependencyName, catalogSpec, and catalogKey. When resolveCatalogDependencies fails to find a catalog key, it now throws this typed error instead of a plain Error, making failures easier to catch and inspect programmatically.

Macroscope summarized 4a661d2.

Co-authored-by: codex <codex@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 699aa47f-eea2-4141-987f-8dc6fe002da6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/catalog-resolution-error

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jun 20, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

This PR replaces a generic Error with a structured, typed error class for catalog dependency resolution failures. The runtime behavior is unchanged - errors are thrown in the same scenarios with the same message, just with additional typed fields for better debugging.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge
juliusmarminge merged commit 40d1464 into main Jun 20, 2026
15 checks passed
@juliusmarminge
juliusmarminge deleted the codex/catalog-resolution-error branch June 20, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant