Skip to content

docs: define ownership data and privacy contract - #75

Merged
Aliferous3 merged 3 commits into
mainfrom
docs/ownership-data-privacy-spec
Oct 18, 2026
Merged

Aliferous3 merged 3 commits into
mainfrom
docs/ownership-data-privacy-spec

Conversation

@Aliferous3

Copy link
Copy Markdown
Owner

Summary

Wave 3C Phase 1A — converts the approved ownership RFC (PR #73) and the measured Phase-0.5 GraphQL spike (PR #74) into an implementation-grade production data/privacy contract before any schema or ingestion work.

  • New docs/ownership-data-privacy-spec.md: exact allowed/prohibited persisted fields, repo-scoped contributor identity model, path-storage policy, four-table candidate schema with cardinality guardrails, deletion/RLS/versioning/telemetry/backup/migration contracts, draft privacy-page copy (not applied), methodology disclosure, test contract, and go/no-go gates.
  • Small successor-pointer block added to docs/code-ownership-over-time-rfc.md.

Firm decisions made (not TBD): dir display paths stored / file paths never; github_user_id + login persisted; single "Unlinked contributor" bucket; full monthly history no compaction; one snapshots table w/ head granularity; repository-scoped contributor identity (no global table).

Docs-only — no migrations, production code, privacy-page, UI, or wiring changes.

Test plan

  • npm test — 505/505 pass
  • npm run typecheck — clean
  • npm run build — clean
  • npm audit --audit-level=moderate — 0 vulnerabilities

Generated with Devin

Authoritative Phase-1 data contract derived from the approved RFC and the
measured GraphQL spike:

- allowed/prohibited persisted fields with per-field justification
- repo-scoped contributor identity (github_user_id + login; one
  "Unlinked contributor" bucket; no global contributor table)
- directory-path storage policy (dir display paths yes, file paths never)
- four-table candidate model with cardinality guardrails
- deletion/cascade, RLS/service-role, versioning, telemetry, backup and
  migration/rollback contracts
- draft privacy-page copy (not applied) + methodology disclosure
- implementation test contract and go/no-go gates

No migrations, no production code, no privacy-page changes.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
dev-ledger Ready Ready Preview Oct 18, 2026 9:43am UTC

- linked identity keyed by GraphQL node id (author.user.id), not numeric
  user id; databaseId not requested
- calculation_version is part of snapshot identity; explicit
  active_version/building_version serve gate with build-alongside,
  atomic flip, post-flip GC
- corrected RLS wording: isolation rests on API scoping + user_id
  constraints + tests; RLS blocks direct client access only
- scope_path_hash defined as current-path lookup key; renames create new
  scope identity; no lineage in V1
- unlinked is unresolved attribution, never a person; excluded from
  concentration metrics; new 'aggregate' kind for top-25 'other' bucket
- monthly rows are immutable period facts; current-state fields moved to
  head rows; HEAD cardinality corrected
- rollout gate: 2%-of-floor applies to HEAD blame only; total-cycle
  budget must be measured pre-GA
- unlinked methodology copy tightened to non-speculative language
- test contract extended: version coexistence/flip/GC, unlinked and
  aggregate semantics, foreign-user isolation

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- initial version bootstrap: active_version/building_version nullable;
  first build writes V1 under building_version with active null until
  validated completion promotes it atomically
- tenant consistency enforced by composite foreign keys at the database,
  not application checks (repositories(id,user_id) surrogate unique;
  snapshot scope/contributor FKs tenant-qualified)
- backup classification corrected: scopes/contributors/snapshots are CORE
  (irreplaceable for retained-disconnected repos); sync_state OPERATIONAL
- privacy draft: identity storage stated transparently (minimal linked
  identity + aggregates), no "aggregates only" overclaim
- durable-identity minimization: overflow contributors folded into
  'other' transiently, no identity rows created for them
- concentration metrics renamed human_*; bots excluded from
  contributor/maintainer/concentration counts by default
- excluded-scope contradiction resolved: vendor/generated/binary/
  submodule paths never persisted; excluded flag only for
  cardinality-capped persisted scopes
- test contract: bootstrap/promotion, DB-level tenant mismatch rejection,
  backup class split, identity minimization, bot exclusion, path
  non-persistence

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@Aliferous3
Aliferous3 merged commit 63c8bc2 into main Oct 18, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
Preview — 07e0a2b5 Deployed Oct 18, 2026 by vercel[bot]
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