Skip to content

fix: use ConvexError in agents/integrations/memories publish mutations#189

Merged
juhgiyo merged 1 commit intomainfrom
claude/use-convex-error-for-remaining-publish-mutations
Apr 13, 2026
Merged

fix: use ConvexError in agents/integrations/memories publish mutations#189
juhgiyo merged 1 commit intomainfrom
claude/use-convex-error-for-remaining-publish-mutations

Conversation

@juhgiyo
Copy link
Copy Markdown
Contributor

@juhgiyo juhgiyo commented Apr 12, 2026

Summary

Completes the Error → ConvexError migration across all 5 publish mutations: roles.ts (#187), skills.ts (#188), agents.ts + integrations.ts + memories.ts (this PR).

Test plan

  • All 266 existing tests pass
  • TypeScript compiles cleanly
  • Code review: NO_FURTHER_IMPROVEMENTS
  • Code simplifier: NO_FURTHER_IMPROVEMENTS
  • QA verification: all 9 acceptance criteria pass (verified per-file)

🤖 Generated with Claude Code

…tations

Apply the same Error → ConvexError fix from PR #187 (roles.ts) and
PR #188 (skills.ts) to the remaining three entity files. In each
client-facing publish mutation, all throw new Error() statements are
replaced with throw new ConvexError() so error messages pass through
to the web UI instead of being stripped by Convex's security layer.

Version error messages now include the entity slug for easier debugging.
publishInternal mutations are intentionally left unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 12, 2026

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

Project Deployment Actions Updated (UTC)
strawhub Ready Ready Preview, Comment Apr 12, 2026 0:10am

@juhgiyo
Copy link
Copy Markdown
Contributor Author

juhgiyo commented Apr 13, 2026

🔍 Code Review Triage — PR #189

Classification: LOW RISK ✅ Fast-track eligible

Risk Assessment

Factor Finding
Scope 3 files, 27 additions / 27 deletions (net zero)
Nature Mechanical migration: throw new Error()throw new ConvexError()
Pattern Continuation of PR #187 (roles.ts) and #188 (skills.ts) — same transformation
Logic changes None — all auth, ownership, and version validation logic is identical
CI status ✅ All passing (build, cli, e2e, deploy-preview, Vercel)
Tests 266/266 passing per PR description
Security surface Error messages exposed to UI are standard validation strings only (auth status, ownership, version conflicts) — no sensitive data leakage

AI-Generation Signal Check

Signal Detected? Notes
Boilerplate expansion ⚠️ Minor Same 7-line transformation repeated 3x across files — but this IS the nature of a mechanical migration
Unnecessary abstraction ❌ No No new abstractions introduced
Hallucinated APIs ❌ No ConvexError is a real import from convex/values, consistent with existing codebase usage
Comment-code mismatch ❌ No PR description accurately reflects changes
Style discontinuity ❌ No Follows exact pattern established in PR #187/#188
Over-documentation ❌ No

AI co-authored: Yes (Claude Opus 4.6). Single commit, clean. The mechanical nature of this change is well-suited to AI generation — low defect risk for this pattern.

Minor Enhancement Noted

Version error messages now include the entity slug (e.g., Version 1.0.0 already exists for agent 'my-agent'). This goes slightly beyond the mechanical Error→ConvexError migration but is a clear improvement for debugging context, consistent across all 3 files.

Intentional Exclusion Validated

publishInternal mutations are correctly left unchanged — httpAction catches e.message from plain Error, so converting those would break the internal pipeline. The PR description documents this decision.

Recommendation

Fast-track approval recommended. This PR:

  • Completes a well-established migration pattern (3rd PR in series)
  • Makes zero logic changes
  • All CI checks pass
  • Enhances error UX without exposing sensitive information
  • Is the final PR in the Error→ConvexError migration across all 5 publish mutations

🤖 Triage by code-review-triage-agent · Dogfooding run #2

@juhgiyo juhgiyo merged commit 9162862 into main Apr 13, 2026
7 checks passed
@juhgiyo juhgiyo deleted the claude/use-convex-error-for-remaining-publish-mutations branch April 13, 2026 22:43
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