WIP: fix: cache wiki snapshots and harden health output #8

Closed
clawlter wants to merge 3 commits from audit/snapshot-health into audit/core-wiki-correctness
Owner

Summary

  • add an immutable, source-versioned wiki snapshot cache shared by page, search, article, and health requests
  • coalesce concurrent builds, reject source changes or explicit invalidation during a build, and leave failed builds retryable
  • redact mount paths, relative wiki paths, parser snippets, and raw errors from public health JSON
  • give supported-scale cold snapshot construction a documented 15-second container health timeout
  • deduplicate persistent availability diagnostics until recovery or a changed failure state

Dependency / merge base

This is a stacked draft based on audit/core-wiki-correctness and depends on #7. Review the two commits above #7 (21d9b98cfe2aa61a6f726b9869f73465333c5148 and 947c445ab2f0f878fe5f75862b9ce909aae55ee1). Merge #7 first, then rebase/retarget this PR to main before merging.

Verification

  • npm test — 7 files / 29 tests passed, including a first-request 2,001-page cold regression and repeated-failure/recovery/new-failure logging coverage
  • npm run lint
  • npm run typecheck
  • npm run build
  • production next start probe with a 2,001-page synthetic vault: cold health HTTP 200 in 8.140146s; warm health HTTP 200 in 0.290226s (cold is inside the documented 15s container timeout)
  • public unavailable responses remain redacted; repeated identical failures log once, recovery resets reporting, and a changed failure state is reportable
  • git diff --check

Public health schema

Success exposes only ok, pages, and indexErrorCount. Unavailable responses expose only ok and the generic status value unavailable, with HTTP 503.

## Summary - add an immutable, source-versioned wiki snapshot cache shared by page, search, article, and health requests - coalesce concurrent builds, reject source changes or explicit invalidation during a build, and leave failed builds retryable - redact mount paths, relative wiki paths, parser snippets, and raw errors from public health JSON - give supported-scale cold snapshot construction a documented 15-second container health timeout - deduplicate persistent availability diagnostics until recovery or a changed failure state ## Dependency / merge base This is a stacked draft based on `audit/core-wiki-correctness` and depends on #7. Review the two commits above #7 (`21d9b98cfe2aa61a6f726b9869f73465333c5148` and `947c445ab2f0f878fe5f75862b9ce909aae55ee1`). Merge #7 first, then rebase/retarget this PR to `main` before merging. ## Verification - `npm test` — 7 files / 29 tests passed, including a first-request 2,001-page cold regression and repeated-failure/recovery/new-failure logging coverage - `npm run lint` - `npm run typecheck` - `npm run build` - production `next start` probe with a 2,001-page synthetic vault: cold health HTTP 200 in 8.140146s; warm health HTTP 200 in 0.290226s (cold is inside the documented 15s container timeout) - public unavailable responses remain redacted; repeated identical failures log once, recovery resets reporting, and a changed failure state is reportable - `git diff --check` ## Public health schema Success exposes only `ok`, `pages`, and `indexErrorCount`. Unavailable responses expose only `ok` and the generic `status` value `unavailable`, with HTTP 503.
fix: cache wiki snapshots and redact health details
Some checks failed
Build and publish container image / Build Docker image and publish package tags (pull_request) Has been cancelled
CI / Validate formatting, linting, types, tests, and build (pull_request) Has been cancelled
f8e3c7947c
clawlter changed title from fix: cache wiki snapshots and harden health output to WIP: fix: cache wiki snapshots and harden health output 2026-07-11 22:32:52 -04:00
clawlter force-pushed audit/snapshot-health from f8e3c7947c
Some checks failed
Build and publish container image / Build Docker image and publish package tags (pull_request) Has been cancelled
CI / Validate formatting, linting, types, tests, and build (pull_request) Has been cancelled
to 21d9b98cfe
All checks were successful
Build and publish container image / Build Docker image and publish package tags (pull_request) Successful in 8m9s
CI / Validate formatting, linting, types, tests, and build (pull_request) Successful in 7m28s
2026-07-11 22:43:42 -04:00
Compare
fix: bound cold health checks and outage logs
Some checks failed
Build and publish container image / Build Docker image and publish package tags (pull_request) Successful in 14m32s
CI / Validate formatting, linting, types, tests, and build (pull_request) Has been cancelled
947c445ab2
test: allow cold health contract assertion to run
All checks were successful
Build and publish container image / Build Docker image and publish package tags (pull_request) Successful in 12m28s
CI / Validate formatting, linting, types, tests, and build (pull_request) Successful in 6m44s
5c0e1f5363
clawlter force-pushed audit/snapshot-health from 5c0e1f5363
All checks were successful
Build and publish container image / Build Docker image and publish package tags (pull_request) Successful in 12m28s
CI / Validate formatting, linting, types, tests, and build (pull_request) Successful in 6m44s
to e910a2689f
All checks were successful
Build and publish container image / Validate Docker build inputs (pull_request) Successful in 6m45s
Build and publish container image / Publish verified container image (pull_request) Has been skipped
CI / Validate formatting, linting, types, tests, and build (pull_request) Successful in 2m8s
2026-07-12 12:21:55 -04:00
Compare
Author
Owner

Closing without merge because the owner cancelled the code-security-audit-2026-07 campaign. This does not revert previously merged work.

Closing without merge because the owner cancelled the `code-security-audit-2026-07` campaign. This does not revert previously merged work.
clawlter closed this pull request 2026-07-14 08:16:12 -04:00
All checks were successful
Build and publish container image / Validate Docker build inputs (pull_request) Successful in 6m45s
Build and publish container image / Publish verified container image (pull_request) Has been skipped
CI / Validate formatting, linting, types, tests, and build (pull_request) Successful in 2m8s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
clawlter/llm-wikipedia!8
No description provided.