Skip to content

Add Logbook family model and typed exact-k cardinality - #739

Draft
anth-volk wants to merge 1 commit into
mainfrom
anthony/logbook-family-model
Draft

Add Logbook family model and typed exact-k cardinality#739
anth-volk wants to merge 1 commit into
mainfrom
anthony/logbook-family-model

Conversation

@anth-volk

@anth-volk anth-volk commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Warning

This implementation is not fully tested and must not be merged yet. Local Python and PostgreSQL tests pass, but the migration and database-facing behavior have not been verified against the intended Supabase project.

  • add version-2 Logbook build rows with typed requested_k, realized_k, and record_unit fields while preserving every existing row and checksum
  • add relational families, family_members, and family_actions tables, public views, local persistence, archive import/export, reconciliation, and query commands
  • update the exact-k launcher to require a family UUID, store rung = null because exact-k is an absolute count rather than a sampling fraction, and record completed or failed attempts with the cardinality known at that point
  • persist the build, family, and membership locally before attempting database insertion, while keeping publication as a separate manual command

Fixes #641.

Refs #637. This implements the relational foundation for family discovery, membership, revocation, and supersession. It does not complete #637's Hugging Face derivation bundle, immutable child-publication records, arbitrary-k command, family-aware loader, automated discovery interface, or dataset-card work.

Supabase access blocker

This PR is draft because the intended Supabase project and owning organization have not been identified, and we do not currently have access to inspect its applied migration history.

The migration in this PR has not been deployed. Before this PR is ready for deployment, someone with access must:

  1. identify and record the intended Supabase project reference and owning organization;
  2. verify that the database already contains the base Logbook, prediction, sampling-fraction, and 20260818000000_logbook_chain_scopes.sql migrations; and
  3. confirm that 20260821000000_logbook_family_model.sql can be applied after that exact sequence.

The repository has not been linked to any unverified Supabase project.

Verification

  • relevant Logbook and exact-k Python tests pass, including local persistence, archive restore, remote insertion order, legacy-row compatibility, full-size N, reduced exact-k, and failed attempts
  • the PostgreSQL harness applies the migration to a real local PostgreSQL server and verifies constraints, checksums, relationships, permissions, and public views
  • Ruff static analysis and formatting pass for all changed Python files
  • git diff --check passes

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.

Logbook: record requested and realized exact-k cardinality

1 participant