Repository navigation
Release 0.8.35: summary.json schema 1.1 + page-bundle + webhook secret untangle - #628
Conversation
/publish-version-doi and /llm-enrich now read X-Webhook-Token against NEMAR_WEBHOOK_TOKEN, with a fallback to GITHUB_WEBHOOK_SECRET for the rollout window. Updates github-app-setup.md to activate the App webhook (missed in Phase 1) and document the two-secret model.
fix(webhooks): untangle App HMAC from dataset bearer token
* feat(admin): summary.json coverage report + backfill dispatch Phase 2 of epic #618. Backend: - new service backend/src/services/manifest-coverage.ts walks dataset_versions, probes data.nemar.org/<id>/<v>/summary.json for each, and classifies as ok/stale/missing/error against the target schema (currently 1.1). Bounded parallelism (8) protects the upstream rate limit. - new admin route GET /admin/summary/coverage returns the report. - new admin route POST /admin/manifest/dispatch fires repository_dispatch[generate-manifest] for a single version with skip_callback=true so the worker doesn't need a seeded manifest_jobs row. - triggerManifestGeneration() extended with skipCallback option. CLI: - new `nemar admin summary check [--fix] [--id <id>] [--only-stale] [--json]` walks the coverage report, prints a colored table or emits JSON, and with --fix dispatches generate-manifest for every stale or missing version (throttled 1.5s). - new typed api helpers getSummaryCoverage + dispatchManifest. Cron: - .github/workflows/check-summary-drift.yml runs weekly (Mon 09:00 UTC), opens or updates a drift issue when coverage is not clean. Tests: - 10 unit tests for schema-comparison + URL normalisation logic. Closes #620 (phase 2 of #618). * review(#623): drift cron resilience, labels, abort wiring, comments
* feat(data): page-bundle endpoint for one-RTT dataset detail SSR Phase 3 of epic #618 / Closes #621. New `GET /<id>/page-bundle.json?v=<v>` returns landing + enriched metadata + summary + catalog row in one JSON response so the website can render the dataset detail page in a single SSR fetch instead of its current 4-parallel-SSR + 2-deferred-client waterfall. Internals: - backend/src/services/page-bundle.ts owns the fan-in. Each upstream is wrapped in Promise.allSettled and surfaces as a tagged union ({ok: true, data} | {ok: false, error}) so a single failure doesn't blank the whole bundle. - bundle.complete drives the cache header: success path gets long s-maxage + SWR, partial-failure path gets no-store so a transient blip isn't pinned at the edge for 24h. - Skips the latestManifest read (multi-MB) — the website renders the tree progressively from summary.paths per nemarOrg/website#64, so metadata.bids_index would be unused work here. - pickVersion falls back to landing.latest when the requested version is missing or unknown rather than 404-ing the whole bundle; the consumer can render a 'version not found, showing latest' UI from the bundle's own data. Route is registered before /:datasetId/:version so Hono doesn't treat 'page-bundle.json' as a version param. Mirrors the metadata.json registration order. Tests: 10 new unit tests for the pure helpers (pickVersion + settled). Per project policy, no D1/S3 mocks for the full buildPageBundle — end-to-end coverage is via the post-deploy smoke against a real dataset. * review(#624): hard-fail D1, extract isBundleComplete, enrichment_degraded
… no-store coverage, P1 cron escalation, route registration test)
Epic: summary.json schema 1.1 + page-bundle (dataset detail perf)
…c logs, page-bundle E2E Addresses cross-component review on the dev->main PR: - code-reviewer 85%: backend/wrangler-sccn.toml secrets comment block was missing NEMAR_WEBHOOK_TOKEN after #622 introduced the two-secret split. Fresh dev/test installs would silently miss it (prod is unaffected because GITHUB_WEBHOOK_SECRET is already set, but that fallback masks the gap). - code-reviewer 82%: 2 stale 'see CLAUDE.md' refs after the AGENTS.md migration (wrangler-sccn.toml header, NEMAR_USER_ROLES.md operator note). - silent-failure MEDIUM: webhooks.ts:246 and :1357 use NEMAR_WEBHOOK_TOKEN ?? GITHUB_WEBHOOK_SECRET. ?? only falls through on null/undefined; an empty string sticks and produces the same generic 'Invalid webhook token' 401 as a real mismatch. Added structured console.error so an on-call can grep for the misconfiguration class. - pr-test-analyzer severity 8: page-bundle endpoint shipping to prod with zero E2E happy-path coverage. Added 4 tests to data-route.test.ts: bundle returns all 4 components ok, Cache-Control matches the complete flag (defends the partial-cache-poisoning class), unknown ?v= falls back to landing.latest, unknown dataset 404s. Uses the existing TEST_DATASET pattern; no DB/AWS mocks.
|
Cross-component Fixed inline:
Deferred (acknowledged + filed):
No CRITICAL or HIGH cross-component issues. The epic ↔ #622 interaction is clean (orthogonal secret namespaces; manifest callbacks use Backend typecheck clean. CI re-run pending on this push. |
Adds a glob-based scope filter to `nemar admin summary check`. Supports wildcards (* and ?) and is anchored. Complements the existing exact --id <id> flag. Examples: nemar admin summary check --match 'on*' # all on-prefix nemar admin summary check --match 'nm*' --fix --yes # all nm-prefix nemar admin summary check --match 'nm00010?' # nm000100..109 nemar admin summary check --match '*99999' # any *99999 Used for staged backfills (on* first, monitor, then nm*) and for scoping any future ops without per-id loops. The cron will adopt this once its CLI consumer wants prefix scoping. globToRegExp is exported + unit-tested (8 cases pinning the semantics: * matches a run including empty, ? matches exactly one, anchored, . treated as literal, other regex metacharacters escaped, mid-string wildcards work).
|
Added Use cases:
The exact- CI re-running on this push. |
Summary
Dev → main release including the epic #618 perf work plus the in-flight webhook + docs fixes.
Included
Epic #618 — summary.json schema 1.1 + page-bundle (perf for ww2 dataset detail)
Merged into dev via #625 today. Three phases:
nemarDatasets/.github#15, separate repo):emit_manifest.pybumped to schema 1.1, embedsreadme.content(raw markdown, up to 256 KB) so consumers stop roundtrippingraw.githubusercontent.comper page load.nemar admin summary check [--fix]CLI +GET /admin/summary/coverage+POST /admin/manifest/dispatch+ weekly drift cron with P1 escalation on majority-error.GET /<id>/page-bundle.json?v=<v>endpoint that returns landing + metadata + summary + catalog in one JSON for ww2 to collapse its 4-parallel-SSR + 2-deferred-client waterfall to 1 RTT.Other dev work
fix(webhooks): untangle App HMAC from dataset bearer token (two-secret webhook model)Post-merge plan
deploy-backend.yml.nemar admin summary check --jsonagainst prod → expect ~130 stale (every existing version is schema 1.0).nemar admin summary check --fix --yes→ dispatches ~130repository_dispatch[generate-manifest]runs at 1.5 s throttle, ~3 min of dispatching; Actions queue drains in ~10–20 min.nemar admin summary checkagain → expect zero drift./<id>/page-bundle.json?v=v1.0.0against a known healthyon*dataset; confirmcomplete: trueandsummary.readme.contentpopulated.Test plan
/pr-review-toolkit:review-prwith 4 parallel agents (code, tests, errors, comments); findings addressed before merge/review-pragainst this dev→main PR (Sonnet model per project convention)Follow-ups filed
complete=falsebundles so a single broken summary doesn't wait up to a week for the Monday cron.Merge strategy
Regular merge (
gh pr merge --merge) per project ruleGit Merge Rules— preserve the individual commit history. The auto-tag pipeline strips the-dev2suffix on merge and tagsv0.8.35, thennpm-publish.ymlships, thensync-dev.ymlbumps dev to0.8.36-dev0.