ci: wire typecheck/test/astro-check/gh-pages-build into CI#1
Merged
Conversation
…ct tests ViewerRoute is a discriminated union — accessing objectId/noteId requires narrowing on view === "exhibit" first. The W3CAnnotation → Record cast needs an unknown intermediate since the extension key isn't part of the nominal type.
…erLike and OSD Viewer @types/openseadragon declares OverlayOptions.element as HTMLElement-only and location as Point|Rect, but frame-overlay.ts deliberately keeps FrameViewerLike duck-typed and decoupled from OSD's concrete types (so it stays test-mockable without importing OSD). Narrow the element type to match OSD's real contract, cast the SVG element at its one call site (SVG works fine at runtime, OSD's types just don't say so), and assert Viewer satisfies FrameViewerLike once at the mount.ts wiring boundary instead of coupling the interface back to OSD.
…tyTypes test errors Array/NodeList indexing and open-handler lookups return T|undefined under noUncheckedIndexedAccess; assert non-null with ! at the known-populated indices (same idiom as existing render-core tests). The innerHTML spy's PropertyDescriptor.get needs a conditional spread instead of `get: desc?.get` since exactOptionalPropertyTypes rejects an explicit undefined on an optional property. render-mount typecheck (`pnpm --filter @render/mount exec tsc --noEmit`) is now fully green; all 116 tests still pass.
… interfaces store.ts already re-exported these as type aliases of @render/core's WorkingObjectMeta/WorkingExhibitMeta/WorkingLibraryMeta (the Q-3 archie-persistence migration), but the old local interface declarations were never deleted — same field lists, same shapes, just stale. TS reported them as conflicting exported declarations, and their remaining RightsFields/MediaType/Section/Reading references as unresolvable (those imports were dropped when the migration landed). Re-import the Working* types under local aliases so both the file's own usages and the re-export contract for external importers (library-meta.svelte.ts, library-meta-reducers.ts, publish-flows.svelte.ts, LibraryHome.svelte) keep working.
…ull union geoBasemap, AddMapModal's tileSource, and addMapObject's parameter were all annotated TileSourceDescriptor (the XyzTileSource | DziTileSource union) even though a Map is always the xyz variant — the annotation widened the literal and erased that. geo-notes.ts's geoLabelOf/geoForTarget then failed calling core's pixelToLngLat/lngLatToPixel, which need Extentish (tileSize+maxZoom, meaningless for a DZI pyramid). Narrow all four to XyzTileSource: fixes the typecheck errors and, as a side effect, makes it a type error to ever feed a DZI descriptor into the geo/Web-Mercator math, which was always nonsensical.
Ledger ledgers/ARTIFACTS.md row 1.
…publish-flows, save-queue) - binding.ts: FileSystemWritableFileStream.write's chunk type excludes SharedArrayBuffer-backed views; fflate's zip stream never produces one, so assert Uint8Array<ArrayBuffer> instead of the wrong-generic ArrayBufferView cast. - collab.test.ts: used AnnotationSession's private `log` where every other line in the file already used the public `entries` getter for the same value. - publish-flows.svelte.ts: LogLookup's real signature takes a plain string exhibitId; annotating the three lambdas' parameter as the branded LogicalId narrowed it below what the callback type allows (contravariance violation). - save-queue.svelte.ts: non-null assert the last-message index, already guarded by the preceding length check (existing codebase idiom for noUncheckedIndexedAccess). `pnpm --filter @archie/studio exec tsc --noEmit` is now fully green; all 148 tests still pass.
No generator script for this report exists anywhere in the repo, so a committed copy can only drift the moment code changes. Ledger ledgers/ARTIFACTS.md row 2.
addPendingNotes's dedup key (`${p.objectId}\0${p.comment}`) needs a
separator guaranteed absent from real data. It was written as a raw
0x00 byte pasted into the source text instead of the JS escape
sequence — identical at runtime, but it made grep, ripgrep, git grep,
and the fff tools treat the whole 2147-line file as binary and
silently report zero matches on every search.
Ledger ledgers/ARTIFACTS.md row: NUL byte. Verified: file(1) now
reports text, git grep matches inside the file, studio suite green
(148/148).
The tsconfig.json + all the error fixes landed in prior commits, but the actual "typecheck": "tsc --noEmit" script was never added to package.json — pnpm -r typecheck silently skipped studio the whole time (it only runs the script in packages that declare it). Root `pnpm typecheck` now covers all 6 packages.
Root dist/ hand-mirrors packages/archie-viewer/dist/ so jsDelivr's /gh/ root-relative serving resolves the @v1 embed URL (a656cda). No build step enforced the two trees stay identical. Adds `pnpm sync-dist` (resync) and `pnpm sync-dist:check` (verify, exit 1 on drift), and documents the release rule in ADR-0019 + the README embed recipe. Ledger ledgers/ARTIFACTS.md row: dist/.
Ledger ledgers/ARTIFACTS.md: all four rows done, zero accident rows remain. ISSUES.md Issue 3 -> done 2026-07-05.
Runs on every push and on PRs targeting main. Four independent jobs so each check's pass/fail is visible separately in the PR UI: pnpm typecheck (all 6 packages), pnpm test (per-package vitest via --no-bail), astro check for apps/viewer, and a gh-pages-build verification (separate from deploy.yml's actual deploy build — catches build breaks on PRs, where deploy.yml never runs). Same Node 24 / pnpm 10 / LFS checkout as deploy.yml; deploy.yml itself untouched.
Created during the Issue 1 typecheck repair but never actually staged — the "typecheck" script added to package.json would have had nothing to run against on a fresh checkout/CI runner.
…heckout apps/viewer/tsconfig.json includes .astro/types.d.ts for the astro/client triple-slash reference that gives import.meta.env its type — but .astro/ is gitignored (generated) and only existed in local working dirs that had already run `astro dev`/`build`/`check` at least once. A fresh clone (any CI runner) had nothing to generate it, so `tsc --noEmit` failed on published.ts's import.meta.env access with "Property 'env' does not exist on type 'ImportMeta'" — caught by cloning into /tmp and re-running typecheck there rather than trusting the dirty working copy. Added a `pretypecheck` script (matching the existing predev/prebuild convention in this package) that runs `astro sync` first.
…checks.yml catches it)
micahchoo
added a commit
that referenced
this pull request
Jul 7, 2026
qa/hooks/install.sh points core.hooksPath at qa/hooks, but the four git-lfs hooks (post-checkout/post-commit/post-merge/pre-push) living there were untracked. A fresh clone already gets working LFS hooks auto-installed into .git/hooks by git-lfs itself during checkout -- running install.sh then SILENTLY switches the effective hooksPath away from that working directory to one missing them, with zero warning. Tracking these (stock, repo-agnostic git-lfs boilerplate, confirmed byte-identical to what git-lfs generates) closes the regression: once core.hooksPath points at qa/hooks, the LFS hooks are there too. Ledger: ledgers/COLDSTART.md fix #1.
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.
Summary
Implements ISSUES.md Issue 1 — CI was deploy-only and root typecheck was red on main.
fixes; render-mount: an
addOverlaytype mismatch plus ~20 strict-mode test errors; studio: a deadduplicate-interface block, an
XyzTileSourcenarrowing cluster, and a handful of one-off fixes —see
ledgers/GATE.mdfor the full per-check inventory and commit trail).apps/studio/tsconfig.json+ a"typecheck"script (studio had none)..github/workflows/checks.yml: four independent jobs (typecheck, test, astro-check,gh-pages-build) on every push + PRs targeting main.
deploy.ymlis untouched./tmpand re-running everything there ratherthan trusting the dirty working copy:
apps/viewer's typecheck depends on a gitignored,astro-generated
.astro/types.d.tsthat only existed locally because dev/build had been run herebefore. Added a
pretypecheck: astro syncstep (matching the existing predev/prebuild convention).Note: this branch also carries several commits from a concurrent session working ISSUES.md Issue 3
(tracked-artifact cleanup — NUL byte,
--output,anti-pattern-report.txt, rootdist/sync) andone Issue 4 inventory commit, all made to local
mainwhile this CI work was in progress. Both wereverified together (full typecheck + test sweep re-run at current HEAD).
Test plan
pnpm typecheckgreen on a genuinely fresh clone (not just the working copy)pnpm testgreen on a fresh clone (688+116+7+98+63+148 = 1120 tests)pnpm --filter @archie/viewer run check(astro check) greenbash scripts/build-gh-pages.shsucceedschecks.ymlruns green on this PR in GitHub Actions