Skip to content

feat(cli): load official catalog registry per command - #282

Merged
lloydrichards merged 1 commit into
codex/catalog-publicationfrom
codex/catalog-cli
Sep 28, 2026
Merged

lloydrichards merged 1 commit into
codex/catalog-publicationfrom
codex/catalog-cli

Conversation

@lloydrichards

@lloydrichards lloydrichards commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Goals/Scope

Move catalog-dependent CLI commands to the official HTTP source for #273. Review the load-before-write boundary and user-cache behavior.

Description

Each command loads one validated catalog after parsing and keeps it through generation. The user cache replaces complete entries atomically; stale warnings go to stderr so JSON stdout stays parseable. Help and version remain offline. New configs include the hosted $schema URL without a catalog payload or pin, formatted consistently with Recipe Builder output.

For example, stack-effect add --target package/db:package-db-sqlite checks current definitions before planning. The stack-effect minor changeset records this user-facing change.

Comments

Tracks #273. Pullfrog correctly found that fresh users cannot run catalog commands while the production URL returns 404. Publish and verify #272 before this CLI version ships or #273 closes.

@changeset-bot

changeset-bot Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a6dc65b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
stack-effect Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
stack-effect-docs Ready Ready Preview Sep 27, 2026 9:12pm UTC

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

The configured production registry currently returns HTTP 404, so catalog-dependent commands fail on a fresh installation. Publish and verify the registry asset before shipping this CLI cutover.

Reviewed changes The command-scoped catalog loading, CLI composition, cache persistence, config metadata, and controlled test harness were reviewed against the stacked publication and loader implementations.

  • Command lifecycle: Loads the official HTTP catalog after parsing and shares it across command services while keeping help and version offline.
  • Cache and configuration: Adds a user-level atomic catalog cache, stderr warnings, distinct configuration errors, and $schema for newly created configs.
  • Verification: Uses injected HTTP fixtures in unit and E2E paths; scoped CLI tests pass, but a real graph --format mermaid invocation fails against the current endpoint.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏

import { Console, Context, DateTime, Effect, Layer } from "effect";

export const OFFICIAL_CATALOG_URL =
"https://stack-effect.lloydrichards.dev/registry/v1/catalog.json";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This endpoint currently returns HTTP 404, and bun run --cwd apps/cli start -- graph --format mermaid exits with Catalog server returned HTTP 404; a fresh user has no cache, so init, create, add, plan, graph, and schema cannot run. Please publish and verify the production asset before releasing the CLI cutover; the controlled test fixture does not exercise this dependency.

Technical details
# Production catalog unavailable

## Affected sites
- `apps/cli/src/service/CatalogProvider.ts:6` — points all production catalog loads to the currently missing asset.
- `apps/cli/src/command.ts:40-65` — requires a successful load for the catalog-dependent commands.
- `apps/docs/scripts/catalog-registry-assets.ts:5,25` — defines the asset expected to be published by the docs deployment.

## Required outcome
- Deploy the docs registry asset and confirm an unauthenticated GET of `https://stack-effect.lloydrichards.dev/registry/v1/catalog.json` returns a valid catalog with HTTP 200 before this CLI version can ship. A new installation has no stale cache to fall back to, and HTTP 404 is not a transient fallback condition in `CatalogLoader`.

@lloydrichards
lloydrichards merged commit 0b3946a into main Sep 28, 2026
12 checks passed
@lloydrichards
lloydrichards deleted the codex/catalog-cli branch September 28, 2026 05:29

This branch was successfully deployed

1 active deployment
Preview — a6dc65b4 Deployed Sep 27, 2026 by vercel[bot]
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