Skip to content

feat: person-evaluations as a versioned gitsheets schema contract - #203

Merged
themightychris merged 8 commits into
developfrom
feat/person-evaluations-contract
Oct 14, 2026
Merged

themightychris merged 8 commits into
developfrom
feat/person-evaluations-contract

Conversation

@themightychris

Copy link
Copy Markdown
Member

Implements plans/person-evaluations-contract.md. Stacked on #202.

The person-evaluations record shape was defined three times: a Zod schema here, a JSON Schema in the data repo's sheet config, and another in the private spam pipeline's config. Nothing checked that the three agreed. Now there's one versioned gitsheets schema contract, codeforphilly.org/person-evaluations/v1:

  • @cfp/shared exports the contract document. The API opens the data repo's sheet against it at boot. gitsheets checks the declared contract's identity first; if that misses, it validates every record. On a mismatch, the boot fails.
  • The data repo: every branch's person-evaluations.toml declares implements = [...], and the canonical contract is vendored at .gitsheets/contracts/…/v1.toml. These commits are prepared and waiting for approval to push. All 27 existing human votes pass gitsheets contracts verify.
  • The private pipeline declares the same contract: CodeForPhilly/codeforphilly-spam-detection#1, which also passes contracts verify.
  • Here: the contract is vendored next to the sheet configs, test repos are seeded with it, and the CI drift check now covers everything under .gitsheets/.

Spec: spam-exclusion.md says the record shape is this contract, both consumers verify it, and changes mean a new version, never an edit to v1.

Tests: the shared constant and the vendored TOML hash identically; boot refuses a data repo with a drifted contract and an invalid record; boot accepts the canonical one. Type-check, lint and the full suite pass (504 API tests).

⚠️ Like #199, the CI drift check fails until the data-repo commits are pushed.

🤖 Generated with Claude Code

themightychris added a commit that referenced this pull request Oct 14, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@themightychris
themightychris force-pushed the feat/incremental-reload branch from bdd9621 to 044fe1f Compare October 14, 2026 02:26
themightychris added a commit that referenced this pull request Oct 14, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@themightychris
themightychris force-pushed the feat/person-evaluations-contract branch from 8b45448 to 4e33a23 Compare October 14, 2026 02:26
Base automatically changed from feat/incremental-reload to develop October 14, 2026 02:40
themightychris and others added 8 commits October 13, 2026 22:47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The record shape shared by the site and the private spam pipeline, as a
gitsheets schema contract (codeforphilly.org/person-evaluations/v1).
Same constraints as the data repo's sheet-local schema it replaces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The data repo's person-evaluations sheet now declares the v1 contract;
the API verifies it at boot (identity first, else every record) and
refuses to start on a mismatch. Vendors the contract next to the sheet
configs, seeds test repos with it, and extends the CI drift check to
everything under .gitsheets/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gitsheets#301 (repo.sync) and #302 (rename moves attachments).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new sheet lands in the data repo's empty branch before the app opens
it, so failing on upstream-only configs broke CI for everyone the
moment the events sheets landed. Vendored files must still match
exactly; upstream-only ones warn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PxDwrzedwQoijkwbqSGKj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PxDwrzedwQoijkwbqSGKj
The config root commit carried only top-level sheet configs, so a
sheet declaring `implements` failed every write with contract_missing.
Copy everything under .gitsheets/, nested contracts included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PxDwrzedwQoijkwbqSGKj
@themightychris
themightychris force-pushed the feat/person-evaluations-contract branch from 4e33a23 to 7c34ea8 Compare October 14, 2026 02:58
@themightychris
themightychris merged commit a2adc5f into develop Oct 14, 2026
1 check passed
@themightychris
themightychris deleted the feat/person-evaluations-contract branch October 14, 2026 03:02
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