Skip to content

feat(site): serve compliance.json with precomputed parity from GitHub Pages#46

Open
grdsdev wants to merge 2 commits into
mainfrom
claude/optimistic-davinci-95f1ed
Open

feat(site): serve compliance.json with precomputed parity from GitHub Pages#46
grdsdev wants to merge 2 commits into
mainfrom
claude/optimistic-davinci-95f1ed

Conversation

@grdsdev

@grdsdev grdsdev commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Enriched compliance.json with precomputed parity scores so external tools can query https://supabase.github.io/sdk/compliance.json and get the full picture — raw compliance data plus overall, perArea, perLanguage, and perFeature parity values — without having to recompute anything.
  • Site renders precomputed values instead of recomputing parity at build time; generate-site.ts now reads from the ComplianceFile envelope written by aggregate.ts.
  • Header link to compliance.json added to the site so the URL is discoverable.
  • Consolidated CIaggregate-capabilities.yml deleted; its schedule trigger merged into deploy-pages.yml, which now handles all three cases: push to main, daily cron, and manual dispatch.

New compliance.json shape

{
  "compliance": {
    "javascript": { "auth.sign_in.email": { "status": "implemented" }, "…": "" },
    "…": ""
  },
  "parity": {
    "overall": 0.72,
    "perArea":    { "auth": 0.85, "storage": 0.65 },
    "perLanguage": { "javascript": 0.90, "flutter": 0.70, "…": 0 },
    "perFeature":  { "auth.sign_in.email": 1.0, "auth.mfa.enroll": 0.5, "…": 0 }
  }
}

Changed files

File Change
src/types.ts Added ParityReport (with perFeature) and ComplianceFile as canonical exported types
src/report.ts Computes perFeature in computeParity; imports ParityReport from types and re-exports for compat
src/aggregate.ts Calls computeParity after fetching all SDKs; writes ComplianceFile envelope to compliance.json
src/generate-site.ts Reads ComplianceFile; uses precomputed parity; removes featureParity() helper; adds header link; explicit copy of compliance.json to output dir
.github/workflows/deploy-pages.yml Added schedule and workflow_dispatch triggers; documents that Pages artifact includes compliance.json
.github/workflows/aggregate-capabilities.yml Deleted — consolidated into deploy-pages.yml

Testing

All 125 existing tests pass. TypeScript strict mode reports no errors.

… Pages

Enrich site/compliance.json to include parity scores so external sources
can query them without recomputing, and update the site to render from
those precomputed values rather than computing them at build time.

- Add `ParityReport` (with new `perFeature` field) and `ComplianceFile`
  wrapper type to types.ts as canonical exported types
- report.ts: compute and return `perFeature` (cross-language parity per
  feature ID) alongside the existing overall/perArea/perLanguage values;
  re-export ParityReport from types for backward compat
- aggregate.ts: call computeParity after fetching all compliance data and
  write a ComplianceFile envelope (compliance + parity) to compliance.json
- generate-site.ts: read precomputed parity from the ComplianceFile
  envelope; fall back to computeParity when no file is provided (local
  dev); remove featureParity() helper; add link to compliance.json in the
  site header; explicitly copy compliance.json to the output dir so it is
  always present regardless of the input path
- Both deploy workflows: document that the Pages artifact intentionally
  contains both index.html and compliance.json
@grdsdev grdsdev requested review from a team as code owners June 25, 2026 18:01
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