Skip to content

security(core/R-15): Gate 3 — durable protected-record adapter and crash-durability proof #921

Description

@qnbs

TERMINAL CLOSURE — 2026-10-02

Gate 3's defined headless durability evidence is complete for ordinary protected records. Residual ownership is explicit: Gate 4 owns serialization/admission/journal/rekey and the key-epoch crash window; Gate 5 owns asset-pair commit semantics; Gate 6 owns packaged physical power-loss proof; #948 owns protected deletion before Gate 7; the legacy TS/Tauri authority is replaced only at Gate 7.

HISTORICAL / SUPERSEDED — CURRENT EXECUTION — 2026-10-01 23:12 CEST — 3C PART 2 ACTIVE — superseded by terminal closure 2026-10-02

GATE_3 = ACTIVE
SLICE_3A = TERMINAL via #930
SLICE_3B_PART_1 = TERMINAL via #937
SLICE_3B_PART_2 = TERMINAL via #940
SLICE_3C_PART_1 = TERMINAL via #941 → main 03a24786f1c9fda76656dbbd2a635e324331ec81
CURRENT_MAIN = 03a24786f1c9fda76656dbbd2a635e324331ec81
RESULTING_MAIN_VERIFICATION = TERMINAL
CI / CODEQL / SECURITY / SIGNATURES = SUCCESS
VERCEL_PRODUCTION = READY on exact CURRENT_MAIN

SLICE_3C_PART_2 = PR #942 ACTIVE
PR_942_HEAD = 48525c99ed20c88774df161b8d8c0d474a785302
PR_942_MERGE_READY = NO
SLICE_3C_PART_3 = NEXT — two-phase root/anchor commit + write integration + list_records + retention
THEN = terminal Gate 3 + #357/QNB-10 reconciliation
PRODUCTION_AUTHORITY_SWITCH_ALLOWED = NO

#941 is terminal and production-proven. #942 is now the sole active Gate 3 engineering owner. Current exact-head review/CI is not terminal. Codex returned four P2s on 48525c99...: reversible identity recovery for hashed bindings, non-ordinary-class rejection, shard-bound enforcement in catalog_set_digest, and redacted catalog Debug. CodeRabbit independently confirms the non-ordinary-class issue as Major. CodeAnt adds the same class-admission concern plus decoded binding/template/project-scope validation and a shard-bound API nitpick. CodeScene has argument-count health findings; DeepSource has one minor range-style finding. Node 22/24 and Cubic are still running; Sourcery is quota-limited. Validate the full epoch first and converge in one correction wave where practical.

The Gate 3 closure must still cover the asset-pair marker/catalog boundary identified during #941 before claiming complete committed authority.

HISTORICAL / SUPERSEDED — CURRENT EXECUTION — 2026-10-01 — 3B TERMINAL / 3C PART 1 ACTIVE — superseded 2026-10-01 23:12 CEST

GATE_3 = ACTIVE
SLICE_3A = TERMINAL via #930 → main 01230de4758208f7b682ef9548720b0fd39ce801
SLICE_3B_PART_1 = TERMINAL via #937 → main 90ae5c4c44596b423a502dc4ce2d2213886092ca
SLICE_3B_PART_2 = TERMINAL via #940 → main e43559b9bd6c5a8b6f5ba06ed9a2da42079551e1
CURRENT_MAIN = e43559b9bd6c5a8b6f5ba06ed9a2da42079551e1
RESULTING_MAIN_VERIFICATION = TERMINAL
CI / CODEQL / SECURITY / SIGNATURES = SUCCESS
VERCEL_PRODUCTION = READY on exact CURRENT_MAIN

SLICE_3C_PART_1 = PR #941 ACTIVE
PR_941_HEAD = 7a1edcf1527947e7b75cc8e8c6fbe6e1ea11a701
PR_941_MERGE_READY = NO
SLICE_3C_PART_2 = NEXT — catalog descriptors/pages + shard assignment
SLICE_3C_PART_3 = THEN — two-phase root/anchor commit + write integration + list_records + retention
THEN = Gate 3 closure + #357/QNB-10 reconciliation
PRODUCTION_AUTHORITY_SWITCH_ALLOWED = NO

#940's resulting main is fully green and production-proven; Gate 3B is no longer active work.

#941 is the current Gate 3 owner. Its latest head already incorporates the bootstrap journal_revision = 0 fix, shared tagged-binding implementation and root-field coverage fixes. At the latest readback, Node 22/24 are still running and the current review epoch still has a Codex P2 requiring asset-pair entries to be representable in marker_set_digest, plus a Cubic P3 to align RootError::InvalidCounter documentation with the valid bootstrap sentinel. Do not merge until this exact-head remainder is resolved/dispositioned and the resulting head converges.

After #941 terminal proof, continue directly to 3C parts 2 and 3 without a chat handoff.

HISTORICAL / SUPERSEDED — pre-3B checkpoint — 2026-10-01

GATE_3 = ACTIVE
SLICE_3A = TERMINAL via #930
3A_RESULTING_MAIN = 01230de4758208f7b682ef9548720b0fd39ce801
#933/#934 = TERMINAL
#935/#936 = MERGED
CURRENT_MAIN = cd12c1041fc5e6e7197484bd81c88597f6974fa6
RESULTING_MAIN_VERIFICATION = IN PROGRESS
CODEQL / SECURITY / SIGNATURES = SUCCESS
VERCEL_PRODUCTION = READY on exact CURRENT_MAIN
NODE_22 / NODE_24 = RUNNING at latest readback
NEXT_SLICE = 3B commit markers + startup reconciliation
THEN = 3C authority-root/catalog commit + Gate 3 closure/#357 reconciliation
PRODUCTION_AUTHORITY_SWITCH_ALLOWED = NO

#936 has merged and #935 is closed. Do not keep the support lane active or reopen it without new material evidence.

Finish resulting-main proof on cd12c104..., then proceed directly to 3B. Claude is already continuing the Gate 3 lane; no chat handoff or additional governance detour is required.


Program position

Child owner of #445 for R-15 Gate 3.

TARGET_RELEASE = v1.30.0
PREDECESSOR = Gate 2 terminal
PRIMARY_LEGACY_OWNER = #357
PRODUCTION_AUTHORITY_SWITCH_ALLOWED = NO

Objective

Implement the first renderer-neutral durable protected-record adapter with real crash-durability semantics, not merely atomic rename.

Binding sequence: encrypted staging generation → file content sync → atomic replacement/promotion → parent-directory metadata durability where required → generation reconciliation → only then durable success.

Required scope

  • choose one representative protected record class;
  • implement Core/native durable read/write around the admitted R-15 envelope + KeyProvider;
  • file and directory sync semantics by platform;
  • generation and commit-marker reconciliation;
  • orphan staging recovery/cleanup;
  • exact failure classification, never torn authoritative state;
  • deterministic fault injection around each meaningful durability boundary;
  • prove plaintext staging is not left behind beyond admitted mechanisms.

#357 reconciliation

#357 is no longer a separate Tauri-only destination. Its crash-durability requirement must be satisfied by this renderer-neutral/native Core path wherever practical. Close #357 only with concrete R-15 evidence or retain a bounded legacy residual that must disappear before Gate 7.

Acceptance

  • representative protected record survives the crash/fault matrix;
  • sync and directory-durability semantics explicit;
  • rollback/substitution cannot masquerade as latest committed state;
  • no authority switch;
  • exact-head/resulting-main proof complete;
  • packaged evidence that cannot be proven in source CI is explicitly carried to Gate 6, never silently called PASS.

Non-goals

  • full all-class migration;
  • journal/rekey state machine;
  • production cutover;
  • unrelated filesystem refactors.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions