Repository navigation
Map flattened ArtifactsError and enable enhanced_error_serialization - #1439
Conversation
Production still threw after #1438. Treat Error messages that start with ArtifactsError: Repository not found as NOT_FOUND so create runs. Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughNative Artifacts handling now extracts messages from multiple error shapes, recognizes prefixed repository-not-found messages, preserves original causes, and routes native repository operations through shared lookup logic. Worker configurations enable enhanced error serialization and test the flag. ChangesNative Artifacts error handling
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to The PR updates artifact error matching and related configuration so flattened repository errors can be handled correctly; no actionable merge-blocking risk remains beyond normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🔎 Preview deployed: https://kody-pr-1439.kody-a99.workers.dev Worker: Mocks:
|
Kody's compatibility_date is 2026-04-16; this flag is date-default on 2026-04-21. Opt in on the main worker (and aligned dynamic/mock copies) so the Artifacts binding can preserve name/code instead of flattening to Error + a prefixed message. Keep the structural matcher. Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Intent
community_forkis still broken on production after #1438 (53ae3918). The same probe threwArtifactsError: Repository not found: package-<new-uuid>. #1438 requiredname === 'ArtifactsError'for the message fallback. Withoutenhanced_error_serialization(date-default 2026-04-21; Kody is dated 2026-04-16), JSRPC can flatten that into a plainErrorwhose message isArtifactsError: Repository not found: …, sogetstill rethrew beforecreate.Summary
ArtifactsError:from the error message, then match the same known prefixes (Repository not found,Repository already exists,Import in progress).git: repository not foundstill does not map.repo()gets go through the same matcher.enhanced_error_serializationon the main worker (and aligned dynamic/mock copies). Do not advancecompatibility_date— 2026-04-21 also defaultsenable_python_external_sdk. Keep the structural matcher; the flag does not restore custom prototype identity.Testing
new Error('ArtifactsError: Repository not found: repo-native-prefixed')→not_found.{ name, code }and message-onlyArtifactsErrorcases still pass.enhanced_error_serialization./accountonkody-pr-1439.community_forkof@kody/personal-captureafter deploy.System changes
System recap — extends existing primitives (medium risk)
Mode: recap · Base:
main@53ae3918· Head:a7a405d2Classification: extends — Artifacts binding error matching plus consumer JSRPC serialization.
Primitives touched
artifacts-reposArtifactsError: Repository not foundand opt inenhanced_error_serializationrepo-sessionsSystem map
Native
getmiss must becomenot_foundwhether JSRPC preserves{ name, code }or flattens to a prefixedError.message. The compatibility flag asks the consumer runtime to keep structured fields; the matcher stays as defense.Legend: green = composes (wiring only) · amber = extended by this PR · red = new primitive · gray = context (unchanged, included only when an edge crosses it).
Summary by CodeRabbit
Bug Fixes
Tests