Repository navigation
fix(patchy): publish names the import the build can't resolve - #686
Merged
Merged
Conversation
Owner
Author
|
GPT 6.1 Sol review (codex, xhigh), two passes:
Second pass on the fix commit: all three fixed, nothing new. |
A page importing a file that no longer exists, such as a logo a later company look dropped, failed publish with a generic Vite message. The builder child now names each unresolved import and its importer from Rolldown's diagnostics, at most three plus a count; other tool output stays out of the envelope. ADR-0004 and the CLI README state the exception. Closes #596 Co-Authored-By: Claude Opus 5.5 <[email protected]>
… imports Strip the repo's own path from an unresolved import's line, so an absolute specifier never prints it, and read Vite's aggregate only from an Error. Both vite.config.ts suppression rows now assert the generic message, beside a new non-Error row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
allisonmahmood
force-pushed
the
fix/596-publish-names-unresolved-import
branch
from
October 15, 2026 19:16
b124517 to
5d78cde
Compare
allisonmahmood
added a commit
that referenced
this pull request
Oct 16, 2026
…u when they fail (#720) Release 13's What's new entry, written from `c9b8fc4`, ahead of deploying it. `patchy` and `CURRENT_RELEASE` move to `0.13.0`, so CLIs and patch repos installed before this deploy are told to upgrade. | Change | PRs | | --- | --- | | New: Home puts the patches you use first | #713, #716, #719 | | New: Every patch in one list | #715 | | Improved: Each patch's page leads with Open | #717 | | New: See when your tools are failing | #718 | | Fixed: Everyone has a name | #687 | | Improved: Your company's look is easier to get right | #697, #696, #703, #688 | | Improved: Forms follow your look's error states | #691, #692 | | Improved: Clearer answers when a publish goes wrong | #686, #685, #689 | | Fixed: Your agent's Patchy commands are steadier | #695, #704, #680, #681 | | Behind the scenes: stricter checks on static pages and tools' database requests; malformed requests are logged | #682, #693, #683 | | Behind the scenes: usage numbers count every publish, sharing change and restore | #698, #699, #700, #690 | | Test and tooling only, no line | #705, #702, #701, #694, #684, #607 | Made by Claude Opus 5.5 in Claude Code, running in T3 Code. Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A page that imports a file the build can't find, most often
patchy/_generated/logo.svgafter a company look revision drops its logo, passestscand then failspatchy publishwith only "Vite build failed". Nothing says which import or which file, so the agent has to rerun Vite by hand to find out.The builder child now reads Vite 8's aggregate build error. For each
UNRESOLVED_IMPORTdiagnostic it takes the first line ([UNRESOLVED_IMPORT] Could not resolve '<import>' in <file>), strips ANSI and the repo's own path, and names up to three, then counts the rest. Thepnpm exec vite buildhint stays. Everything else keeps today's generic message: plugin errors, config throws, non-Error throws andtscoutput. Patchy's own refusals (import_refused,toolchain_unsupported,invalid_manifest) are unchanged. The child's reply keeps its{ ok: false, error, code? }shape, and tier 2's server build goes through the same path.Tested by hand
On this worktree's
brightlineenvironment, through its installed CLI. An admin published a look with a logo. Kudos (tier 1) imported../patchy/_generated/logo.svginsrc/App.tsxand published fine. Then the admin published a revision with no logo, and Kudos refreshed.Before:
After:
Tier 2 server graph: New Business's
server/deals.tsimports a missing../helpers/stage-rules.js. Before, it got the same generic line. After:An absolute import of a missing
<repo>/src/brand/logo.svgnames it repo-relative, with no machine path:A plugin whose
transformthrowsprivate-diagnostic-markerstill gets only the generic message, and the marker never reaches stderr. The "after" outputs are from the final commit.Surfaces
--jsonprint the same message.packages/patchy/README.md(repo publish) and ADR-0004 (its sentence on compiler/build failures) now state the exception.patchyskill andpatchy-lookstill read correctly, so neither changed.Tests
These sit beside the existing "keeps … failure diagnostics out of the public envelope" cases in
cliRepoRecovery.test.ts:--jsonand text, with no/api/publishrequest.transformhook, and a non-Error throw shaped like Vite's aggregate. Bothvite.config.tsrows now assert the exact generic message.Closes #596
Made by Claude Opus 5.5 in Claude Code, running in T3 Code.