Repository navigation
fix(publish): judge a feed by the version it declares - #111
Merged
Merged
Conversation
Closes #69. Broadcast was the last call site left on `validateFeed` — latest-only by design, the right API for documents this kit writes and the wrong one for a feed somebody else published and this tool merely reads. A valid 0.4 feed came back invalid over its `specVersion` alone, and because an invalid feed stops everything before any destination, Broadcast refused to publish a healthy feed outright. Being behind inside the support window is a notice, never a defect. `validateDocument` now picks the version. The notices it returns render above `#main` instead of in place of it, with their links as links rather than a bare URL mid-sentence — the feed still broadcasts, which is the entire point. The tracker predicted `runCli` would have to become async here as it did in the three exporters; it did not. `boot()` was already async, so the change is the call and the notice rendering. One consequence that was not predicted: `validateDocument` can reach any published version's validators, and `apps/publish` bundled to a single `outfile`, so esbuild inlined all of them and `main.js` went 464 KB → 1.3 MB. They sit behind a dynamic import precisely so a bundler can split them, which `apps/validator` already relies on. Same `splitting`/`outdir` config here takes `main.js` to 122 KB — smaller than before this change, since the latest version's validators are now a chunk too. Checked by hand, per CONTRIBUTING.md: a 0.4 feed broadcasts with the notice shown, and an invalid feed still shows its errors and no console. Co-Authored-By: Claude Opus 5 <[email protected]>
13 of 14 tasks
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.
Closes #69. Last call site in the repo still on
validateFeed.Broadcast reads a feed somebody else published, so it has to be judged against the version it declares.
validateFeedis latest-only by design — right for documents this kit writes, wrong here. A valid 0.4 feed came back invalid over itsspecVersionalone, and because an invalid feed stops everything before any destination, Broadcast refused to publish a healthy feed outright.Now on
validateDocument. Being behind inside the support window is a notice, never a defect: the notices render above#mainrather than in place of it, with their links as links, and the feed still broadcasts.Two things that differed from the plan on #101
runClidid not need to become async. That note was written for the three exporters in 555ba2a;boot()here was already async, so the change is the call plus the notice rendering.The bundle went 464 KB → 1.3 MB, which was not predicted.
validateDocumentcan reach any published version's compiled validators, andapps/publishbundled to a singleoutfile, so esbuild inlined all of them. They sit behind a dynamicimport()precisely so a bundler can split them —apps/validatoralready relies on this. The samesplitting/outdirconfig takesmain.jsto 122 KB, smaller than before this change, since the latest version's validators are now a chunk too.deploy-tools.ymlcopiesdist/.recursively, so the chunks ship; publish has no CSP meta, so nothing to widen.Spec version
No spec-version change. The repo stays on OTE Spec 0.6.0.
Testing
pnpm lint,build,typecheckandtestgreen across the workspace (71 publish tests).src/main.tsis boot wiring with no unit coverage — per CONTRIBUTING.md the UI is checked by hand — so this was driven in a browser against a served build:favicon.icofrom the throwaway static server.apps/publish/CLAUDE.mdnamedvalidateFeeddirectly and now describes thevalidateDocumentrule, so the doc does not lie about the one thing it is there to protect.🤖 Generated with Claude Code