Skip to content

feat: add immutable corpus version creation - #12

Merged
jemsbhai merged 2 commits into
mainfrom
codex/immutable-corpus-versions
Aug 15, 2026
Merged

feat: add immutable corpus version creation#12
jemsbhai merged 2 commits into
mainfrom
codex/immutable-corpus-versions

Conversation

@jemsbhai

Copy link
Copy Markdown
Owner

Outcome

Adds append-only immutable corpus version creation for existing corpora through manual input or bounded UTF-8 TXT, CSV, and JSON imports.

What changed

  • Adds server-owned v2+ lineage, monotonically increasing version numbers, historical reads/exports, and CorpusGen 0.1.7 provenance.
  • Applies writer authorization, tenant-scoped hierarchy checks, PostgreSQL locking, duplicate-content conflicts, atomic retained-sentence quota accounting, and text-free audit evidence.
  • Adds accessible project-workbench creation flows, viewer read-only controls, stale-selection protection, partial-success recovery, and focus management.
  • Updates the OpenAPI snapshot, product/operations documentation, and mocked plus real-stack acceptance coverage.

Security and data impact

Corpus versions remain immutable. Parent selection and numbering are server-owned. Cross-tenant identifiers stay opaque, quota/version/audit writes share one transaction, and audit metadata never includes sentence text. No schema migration or dependency change is included.

Validation

  • Backend: 1,498 passed, 80 explicit environment/platform skips, 0 failed; 94% coverage.
  • Ruff formatting/lint and strict mypy: passed.
  • OpenAPI exact-sync and backward-compatibility checks: passed.
  • Web: 496 tests passed; Prettier, ESLint, typecheck, and production build passed.
  • Browser: 77 passed across Chromium, Firefox, and WebKit; 4 explicit environment/platform skips.
  • Opt-in live PostgreSQL/external-stack cases were unavailable locally; lock SQL, transaction rollback, client contracts, and mocked browser behavior are covered.

Rollback

Revert the merge commit. This change adds no database migration and leaves existing version-1 data/contracts intact.

Comment thread src/corpuskit/api/projects.py Fixed
Comment thread src/corpuskit/api/projects.py Fixed
@jemsbhai
jemsbhai merged commit 8234bb3 into main Aug 15, 2026
14 checks passed
@jemsbhai
jemsbhai deleted the codex/immutable-corpus-versions branch August 15, 2026 02:35
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