Repository navigation
fix(core): report every unrecognised route entry in one run - #705
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
blove
temporarily deployed
to
vercel-preview
September 17, 2026 17:46 — with
GitHub Actions
Inactive
blove
enabled auto-merge (squash)
September 17, 2026 18:13
Route discovery threw B4_E1007 from inside the recursive walk, so an app with several miswired route entries surfaced them one per run: fix one, re-run, meet the next. The walk now records each unrecognised entry and throws once at the end, listing every offending file with its own explanation — the same batching `b4 check`'s edge-capability gate and the marker-file limits already use. The code and the per-file message are unchanged; a single offending entry still produces exactly the message it did before. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
blove
force-pushed
the
blove/zen-roentgen-ff0492
branch
from
September 17, 2026 19:59
7b9c810 to
f968e3a
Compare
blove
had a problem deploying
to
vercel-preview
September 17, 2026 20:00 — with
GitHub Actions
Failure
blove
temporarily deployed
to
vercel-preview
September 17, 2026 20:18 — with
GitHub Actions
Inactive
blove
added a commit
that referenced
this pull request
Sep 17, 2026
Only the generated SEO lastmod manifest conflicted with #705; regenerated rather than hand-merged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
blove
added a commit
that referenced
this pull request
Sep 17, 2026
Neither change affects this page. #705 batches route-discovery errors, and #708 is the edge page's own local-run recipe switching from /healthz to /readyz for the same reason this guide already did. #691 was closed unmerged, so the emitted function directory is still index.func and this page's shadowing argument stands unchanged. Only the lastmod manifest conflicted; regenerated. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch was successfully deployed
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.
Follow-up to #701.
Problem
#701 added
B4_E1007for a routeindex.tsthat exports nothing B4.run recognises, but the throw happens inside the recursivewalkRouteTree. An app with several miswired route entries surfaces them one per run: the user fixes one, re-runs, meets the next.That is inconsistent with this repo's own convention for
b4 checkdiagnostics, which deliberately batch — the edge-capability gate inpackages/cli/src/commands/check.tsreports every offending config key and file at once asB4_E1005, andmarker-files.tsnames every oversized marker file across all routes in one failed build.Change
packages/core/src/discovery/discover-routes.ts:readRouteEntryno longer throws. It returns aRouteEntryScan—{ route },{ unrecognised }, or neither — mirroring thescanRouteMarkerFilesshape that collects findings without throwing so a caller can aggregate them.walkRouteTreethreads anunrecognised[]accumulator alongsidediscovered[].collectRouteDefinitionsthrows once at the end, before the collision check.explainUnrecognisedRouteEntriesbuilds the message. One entry returns its existing message byte-for-byte, so the single-file UX and every current assertion are untouched; several are bulleted with their per-entry explanations indented underneath. Order is walk order, which is stable becausereaddiris already sorted.The
B4_E1007code and the per-file message fromexplainUnrecognisedRouteExportsare unchanged.Rendered from the built CLI path:
Tests
New case in
packages/core/test/discover-routes.test.tswith two bad route entries, asserting both paths and both export names appear in oneB4AppErrorcarryingB4_E1007.Docs and #701's changeset get a sentence each — the batching is part of the same unreleased behaviour, so it does not warrant a second changeset.
Verification
@b4run/coretestsdiscover-routes.test.ts18/18)@b4run/clitestscheck-command.test.ts12/12 with the built-CLI subprocess test@b4run/sdktests@b4run/webtestspnpm lint/pnpm typecheckEditing
cli.mdxstaledlastmod.generated.json; regenerated with--as-of 2026-09-17.🤖 Generated with Claude Code