Skip to content

Stop importing hub-client root just for makeErrorEnvelope - #567

Closed
TheGreatAxios wants to merge 1 commit into
mainfrom
cl-7299-stop-importing-hub-client-root-just-for-makeerrorenvelope
Closed

TheGreatAxios wants to merge 1 commit into
mainfrom
cl-7299-stop-importing-hub-client-root-just-for-makeerrorenvelope

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

Move makeErrorEnvelope and related error-envelope utilities from @workbench/hub-client into @corbits/error-sink (which already owns generateRefId and the error-envelope structural check). This breaks the hub-client ↔ inference-catalog strongly-connected component created by CL-7285.

What Changed

  • New file: packages/error-sink/src/error-envelope.ts — canonical home for makeErrorEnvelope, ErrorEnvelopeShape, ErrorEnvelope, parseErrorEnvelope
  • Backward compat: hub-client/src/error-envelope.ts re-exports from @corbits/error-sink so existing hub-client consumers are unbroken
  • 20+ route packages now import makeErrorEnvelope from @corbits/error-sink instead of @workbench/hub-client root, and their package.json deps reflect the change
  • Structural check updated to validate against the new import pattern
  • tsconfig references regenerated — packages are back on the project-references graph

Verification

  • bun run check — typecheck, lint, structural checks all pass
  • Pre-existing failure in scripts/db-setup.test.ts (Postgres auth) is unrelated
  • No remaining makeErrorEnvelope imports from @workbench/hub-client

Related

  • CL-7285 (added the reverse edge)
  • CL-7249 (older six-package cycle, not a duplicate)

Move makeErrorEnvelope, ErrorEnvelopeShape, ErrorEnvelope, and
parseErrorEnvelope into @corbits/error-sink (which already owns
generateRefId and the error-envelope check). hub-client/src/error-envelope
now re-exports from error-sink for backward compatibility only.

Route packages that imported hub-client root solely for makeErrorEnvelope
now depend on @corbits/error-sink instead, breaking the
hub-client ↔ inference-catalog strongly-connected component and
restoring those packages to the project-references graph.

Updated packages: access-policy, agent-directory, agent-workflow-authoring,
artifacts-hub, bench, chat, commands, evals, inference-catalog, insights,
memory-hub, onboarding, preferences, presence, routines, run-key-history,
run-scope, sidecar-placement, skills, webhook-triggers, workflow-catalog.

Also updated the error-envelope structural check to validate against the
new import pattern, and regenerated tsconfig references.

CL-7299

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This PR is obsolete. Since it was opened, main deleted packages/hub-client entirely and moved makeErrorEnvelope/parseErrorEnvelope/ErrorEnvelopeShape into @corbits/error-sink (#582–#585, merged at bac3074) — the exact end state this PR was trying to reach.

git merge-tree between the merge-base, main, and this branch produces 35 conflict markers, and the branch diff still references @workbench/hub-client (package.json deps, tsconfig references, route imports) which no longer exists on main. It won't apply cleanly as-is.

Recommend closing this PR rather than rebasing — the goal is already achieved on main, and rebasing here would mean re-deriving the same changes against a package that's gone.

@TheGreatAxios

Copy link
Copy Markdown
Contributor Author

Superseded: @workbench/hub-client was deleted and makeErrorEnvelope/parseErrorEnvelope now live in @corbits/error-sink (#582–#585, merged at bac3074). Nothing here remains to land.

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