Skip to content

feat: add current registry CSV/JSON export - #139

Merged
dubemoyibe-star merged 2 commits into
stenion-lab:devfrom
Fhatu12:feat/138-registry-state-export
Aug 31, 2026
Merged

feat: add current registry CSV/JSON export#139
dubemoyibe-star merged 2 commits into
stenion-lab:devfrom
Fhatu12:feat/138-registry-state-export

Conversation

@Fhatu12

@Fhatu12 Fhatu12 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

⚠️ Target the dev branch — not main

main is what Vercel auto-deploys, so a PR merged there goes straight to production.
All contributions land on dev first.

What this changes

Adds GET /api/v1/protocols/export as a current registry snapshot export for JSON and CSV consumers.

The export reuses the registry's persisted latest-successful score semantics while preserving the latest run status, includes category-specific factor breakdowns, methodologyVersion, and operationalState, and does not add historical export, filtering, or score recomputation.

Closes #138.

Verification

  • corepack pnpm format — passes on the exact candidate with no tracked changes.
  • corepack pnpm build
  • corepack pnpm lint — exits successfully; the existing scripts/capture-fixture.mjs unused-URL warning is unchanged.
  • corepack pnpm typecheck
  • corepack pnpm format:check
  • corepack pnpm test
  • corepack pnpm build:dashboard
  • git diff --check origin/dev..HEAD
  • Temporary PostgreSQL 16 scratch database: all 8 migrations applied successfully.
  • STENION_TEST_DATABASE_URL=<scratch-local-postgres> corepack pnpm --filter @stenion/db test — 77 passed, 0 failed, 0 skipped.
  • Export route/CSV focused tests — 11 passed.
  • DB mapper tests — 41 passed.
  • API regression tests — 59 passed.
  • exports only current scored rows with latest-ok factors and latest-run status executed against PostgreSQL and passed.

Checklist

  • Base branch is dev, not main.
  • pnpm format, pnpm build, pnpm lint, pnpm typecheck all pass from the repo root.
  • On-chain method/field confirmation: N/A — this PR does not add or modify adapter/on-chain reads.
  • All five *Safety factors: N/A — this PR does not change scoring or adapter factor computation.
  • No fabricated numbers — the export reads persisted current registry data and performs no score recomputation.
  • methodology/ update: N/A — no formula, threshold, weight, scoring category, or anchoring fact changes.
  • Any new dependency is called out explicitly above, with justification. No new dependency is added.

- add a current scored registry store read with latest-ok score and latest-run freshness semantics

- add JSON/CSV export route with deterministic factor columns, CORS, rate limiting, cache, and attachment headers

- document the export contract and cover store/export behavior
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Fhatu12 is attempting to deploy a commit to the Oyibe Chidubem's projects Team on Vercel.

A member of the Team first needs to authorize it.

@dubemoyibe-star

Copy link
Copy Markdown
Contributor

Excellent work @Fhatu12
CI passes 🔥
I'm gonna do a quick review before I merge

Kindly star the repo while you are at it ♥️

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stenion Ready Ready Preview Aug 31, 2026 10:41am

@Fhatu12

Fhatu12 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the assignment and the warm welcome! I’ve starred the repo ❤️. I really appreciate the opportunity to contribute to Stenion. I’ll have a look at another issue to work on next.

@dubemoyibe-star
dubemoyibe-star self-requested a review August 31, 2026 11:26
…of the staleness model is three places to forget

@dubemoyibe-star dubemoyibe-star left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent
merging!!!!!🚀🚀

@dubemoyibe-star
dubemoyibe-star merged commit 3e9ec75 into stenion-lab:dev Aug 31, 2026
1 of 2 checks passed
@Fhatu12
Fhatu12 deleted the feat/138-registry-state-export branch August 31, 2026 19:52
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.

2 participants