fix: restore site_url.ts and the imports manifest.ts never got - #21
Merged
Conversation
This repo has not compiled since 2026-02-05. Commit 029e519 "WIP: json-ld checkpoint" added 202 lines to manifest.ts and deleted site_url.ts in the same change, and it is on main. The result was a hard type error, so the whole test suite refused to run. Three fixes, all recovered rather than invented: 1. site_url.ts restored verbatim from 1628c51, its last living commit. Not rewritten — `git show` of the deleted blob, 18 lines, normalizeSiteUrl and its two helpers. 2. `import type { VaultNode }` added. The type already existed and was exported from inputs/jsonld/types.ts; the WIP commit used it without importing it. 3. `import { loadVault }` added, likewise already exported from inputs/jsonld/loader.ts. One function had to be written, and its shape is dictated by the surrounding code rather than chosen: manifest.ts calls requireSiteUrl(value, fallback), but the only definition was a private zero-argument one in site_build_config.ts. Its two siblings in manifest.ts — requireSiteDir and requireVaultPath — fix the signature and style, and `defaultSiteUrl` sat defined-but-unused in the same file, which is what it was written for. Hence: prefer the explicit option, then the WebSite node's url, else defaultSiteUrl(). Unlike its siblings it does not throw, because defaultSiteUrl already yields a normalized value. deno check src/unfold/site/manifest.ts: passes deno test: 101 passed, 12 failed (previously: could not compile, 0 ran) THE 12 REMAINING FAILURES ARE NOT ADDRESSED AND ARE NOT FROM THIS CHANGE. They share one root cause: the tests read a `vault/` directory of JSON-LD, and while `vault/` exists it holds no .jsonld files at all — the repo's 39 .jsonld files live under hash-named top-level directories such as 2bcdd7ffb6ed9b59/web_site/site.jsonld. That is an unfinished move from the same WIP era. Fixing it means deciding where vault content is supposed to live, which is a product question, not a build fix, so it is left alone and reported. Worth noting one of those failures does exercise the new requireSiteUrl: with no WebSite node present it correctly falls back to defaultSiteUrl(), and the test wants the node's url. That test needs the fixture, not different logic. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LF9Cu8u4dkCEM8MXC1QeDL
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.
This repo has not compiled since 2026-02-05.
Commit
029e519"WIP: json-ld checkpoint" added 202 lines tomanifest.tsand deletedsite_url.tsin the same change — and it's onmain. The result was a hard type error, so the entire test suite refused to run.Three fixes, recovered rather than invented
site_url.tsrestored verbatim from1628c51, its last living commit —git showof the deleted blob, 18 lines. Not rewritten.import type { VaultNode }— the type already existed and was exported frominputs/jsonld/types.ts; the WIP commit used it without importing it.import { loadVault }— likewise already exported frominputs/jsonld/loader.ts.One function had to be written
manifest.tscallsrequireSiteUrl(value, fallback), but the only definition was a private zero-argument one insite_build_config.ts. Its shape is dictated by surrounding code rather than chosen:requireSiteDirandrequireVaultPath— fix the signature and styledefaultSiteUrlsat defined-but-unused in that file, which is exactly what it was written forSo: prefer the explicit option, then the WebSite node's
url, elsedefaultSiteUrl(). Unlike its siblings it doesn't throw, becausedefaultSiteUrlalready yields a normalized value.Result
The 12 remaining failures are not addressed, and are not from this change
They share one root cause: the tests read a
vault/directory of JSON-LD, and whilevault/exists it holds no.jsonldfiles at all. The repo's 39.jsonldfiles live under hash-named top-level directories like2bcdd7ffb6ed9b59/web_site/site.jsonld— an unfinished move from the same WIP era.Fixing that means deciding where vault content is supposed to live. That's a product question, not a build fix, so I've left it alone and reported it.
One of those failures does exercise the new
requireSiteUrl: with no WebSite node present it correctly falls back todefaultSiteUrl(), while the test wants the node's url. That test needs the fixture, not different logic.Relationship to #20
Independent — that PR is the osv-scan lane and dependency fixes. This one is why its
deno testevidence was unavailable.Generated by Claude Code