Skip to content

feat: publish legal dates at /legal.json - #195

Merged
wavekat-eason merged 1 commit into
mainfrom
feat/legal-json
Sep 13, 2026
Merged

wavekat-eason merged 1 commit into
mainfrom
feat/legal-json

Conversation

@wavekat-eason

Copy link
Copy Markdown
Contributor

Why

wavekat-platform#321 records which version of the terms a user agreed to at sign-up, stored as the terms page's own YYYY-MM-DD "last updated" date. The platform keeps its own copy of that date (TERMS_VERSION), and the only thing keeping it in step with this site was a comment. It has already drifted: the platform says 2026-09-12, /terms/ says 2026-09-13.

Sign-up shouldn't depend on this site being up, so the platform keeps its copy. What this adds is a file its CI can compare that copy against.

What

/legal.json, built statically:

{
  "terms":   { "updated": "2026-09-13", "url": "https://wavekat.com/terms/" },
  "privacy": { "updated": "2026-09-12", "url": "https://wavekat.com/privacy/" }
}

It reads TERMS_UPDATED and a new PRIVACY_UPDATED, the same constants that render each page's "last updated" line, so it can't disagree with what a reader sees.

Privacy date consolidated. It was hard-coded as new Date('2026-09-12') in all nine locale privacy pages, each with a "keep in sync with English" comment. It now lives in src/lib/privacy.ts. Every page renders the same date as before (checked in the built en, ko, de output).

scripts/test/legal-dates.test.js (now part of npm test) fails if any privacy page or TermsContent.astro hard-codes a date again, or if legal.json.ts restates one instead of reading the constants. I checked that it fails by putting a hard-coded date back in the ko page.

Keys are additive-only: the platform reads them by name.

Verification

check result
npm test ✅
astro build ✅ dist/legal.json as above, not in the sitemap
check:links ✅ 250 pages
check:meta ✅ (existing warnings only)

No visible page copy changed, so there was no SEO review.

Next

  • Merge wavekat-platform#321.
  • Follow-up platform PR: set TERMS_VERSION to 2026-09-13, add privacy_version, and add a CI check against this file.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Gxht5A4tc5E4JeBHGrDE91

wavekat-platform records the terms version a user agreed to as the page's
own YYYY-MM-DD date, but keeps its own copy of that date — and it has
already drifted (platform says 2026-09-12, the terms page says 2026-09-13).
/legal.json gives its CI something to compare against.

The privacy date was hard-coded in all nine locale pages; it now lives in
src/lib/privacy.ts, so the JSON and every page read one constant.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gxht5A4tc5E4JeBHGrDE91
@github-actions

Copy link
Copy Markdown
Contributor

🔗 Preview: https://feat-legal-json.wavekat-com.pages.dev

@wavekat-eason
wavekat-eason merged commit 3b8e2d3 into main Sep 13, 2026
2 checks passed
@wavekat-eason
wavekat-eason deleted the feat/legal-json branch September 13, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant