Skip to content

fix: restore site_url.ts and the imports manifest.ts never got - #21

Merged
bdelanghe merged 1 commit into
mainfrom
claude/fix-broken-build
Jul 31, 2026
Merged

fix: restore site_url.ts and the imports manifest.ts never got#21
bdelanghe merged 1 commit into
mainfrom
claude/fix-broken-build

Conversation

@bdelanghe

Copy link
Copy Markdown
Collaborator

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's on main. The result was a hard type error, so the entire test suite refused to run.

Three fixes, recovered rather than invented

  1. site_url.ts restored verbatim from 1628c51, its last living commit — git show of the deleted blob, 18 lines. Not rewritten.
  2. import type { VaultNode } — the type already existed and was exported from inputs/jsonld/types.ts; the WIP commit used it without importing it.
  3. import { loadVault } — likewise already exported from inputs/jsonld/loader.ts.

One function had to be written

manifest.ts calls requireSiteUrl(value, fallback), but the only definition was a private zero-argument one in site_build_config.ts. Its shape is dictated by surrounding code rather than chosen:

  • its two siblings in the same file — requireSiteDir and requireVaultPath — fix the signature and style
  • defaultSiteUrl sat defined-but-unused in that file, which is exactly what it was written for

So: prefer the explicit option, then the WebSite node's url, else defaultSiteUrl(). Unlike its siblings it doesn't throw, because defaultSiteUrl already yields a normalized value.

Result

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 like 2bcdd7ffb6ed9b59/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 to defaultSiteUrl(), 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 test evidence was unavailable.


Generated by Claude Code

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
@bdelanghe
bdelanghe marked this pull request as ready for review July 31, 2026 03:26
@bdelanghe
bdelanghe merged commit 71007f0 into main Jul 31, 2026
4 checks passed
@bounded-systems-front-desk bounded-systems-front-desk Bot moved this from Todo to Done in Front Desk Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants