Skip to content

feat(T13305): row uids fill by default (canary); refusal is quiet; #1952 LOWs - #1964

Merged
kryptobaseddev merged 5 commits into
mainfrom
feat/T13305-row-uid-default-on
Oct 10, 2026
Merged

kryptobaseddev merged 5 commits into
mainfrom
feat/T13305-row-uid-default-on

Conversation

@kryptobaseddev

Copy link
Copy Markdown
Owner

Summary

C2 of T12341: the open-time row-identity pass now runs by default. CLEO_ROW_UID_FILL=0 is the documented kill switch. Ship through canary only.

Before the flip, the refusal path is made cheap and quiet (de32009). A store with a stale recipe whose share state is not unshared is refused the full refill (T13231). The live cleocode store is one: 5,619 pre-release uids, Nexus-linked, no recipe marker.

  • The refusal is saved as a local-only row_identity_refused marker in tasks_row_identity_meta. It records the state, recipe, a share-signal digest, the reasons, at and warnedAt.
  • Later opens take the C1 fast path. rowIdentityFillPending no longer reports a stale recipe while a matching refusal holds, and the opens log nothing.
  • A warning is logged once a day at most (REFUSAL_WARN_INTERVAL_MS).
  • The pass is re-evaluated only when the recipe or the share signals change, or on cleo doctor row-identity --refill. The dry run also clears the marker and reports refusalCleared (new contract field).
  • cleo doctor reports a standing refusal as a finding.

Default-on flip (5ae0891): rowUidFillEnabled() returns env !== '0'. Tests that exercise the fill-off path are pinned to '0'. The sync capture, sealer and repair tests are pinned too, because filling uids on capture interacts with K-capture. That is filed as T13311 for the sync team.

#1952 review LOWs (c18c611):

  • LOW-1: importing or vault-restoring a bundle whose project cleo.db carries row uids marks the placed store receive. This includes bundles made before fix(T13250): bundle exports and vault pushes mark the project identity shared in the store #1952, which carry no marker. The new markStoreFileIdentityShared opens the placed file with openNativeDatabase: no migration and no open-time pass ("import only preserves"). It only writes when the meta table exists and the store holds identity values.
    • v1 .cleobundle imports carry only the legacy tasks/brain/conduit/nexus/signaldock files, never cleo.db, so they can't carry uids. They are left untouched.
  • LOW-2: a machine export that cannot mark one project (busy or restoring) fails with the new E_PROJECT_STORE_UNAVAILABLE (exit LOCK_TIMEOUT), and the message names that project root.

Tests

  • row-identity-full-refill.test.ts, refusal marker:
    • the second open of a refused store is fast, and a NULL-uid row still fills without re-warning;
    • unlinking re-evaluates and the store refills;
    • another recipe's refusal does not count;
    • the doctor dry run clears the marker and re-evaluates.
  • row-identity-flag.test.ts: unset means on, 0 means off, other values mean on.
  • identity-share.test.ts:
  • Targeted runs:
    • row-identity set: 130/130;
    • bundle and vault set (nexus-vault, portable-bundle*, identity-share): 134/134;
    • sync capture, sealer and repair: 101/101 (earlier run).
  • tsc -b core+cleo is clean; biome is clean.
  • Arch gates 3 (strict), 4, 17, 21, 28, 34, 38 (--base origin/main), 40 and 32 (PR mode) pass.

Not in this PR

  • Running cleo doctor row-identity --refill --apply on live cleocode is the owner's call.
  • Precondition evidence: Gate B passed all 7 checks on a sandbox copy of snapshot-20261006-121748 (CLI 2026.10.4).

Task: T13305

🤖 Generated with Claude Code

kryptobaseddev and others added 5 commits October 6, 2026 18:44
…fast and quiet

team-lead (C2 prep): a linked store whose share state reads 'unknown' (or
'shared') refused the full refill on EVERY open: the stale marker kept
'recipe' pending, so C1's fast path never applied, the whole pass ran and an
error was logged each time.

- resetStaleIdentity records the refusal (tasks_row_identity_meta, local-only:
  state, recipe, share-verdict digest, reasons, at, warnedAt) and logs a
  warning at most once a day (REFUSAL_WARN_INTERVAL_MS).
- rowIdentityFillPending: a refusal recorded for the current recipe with the
  share verdict unchanged settles the stale marker (no 'recipe' pending), so
  later opens take the fast path. A recipe change or any change of the share
  signals re-evaluates.
- cleo doctor row-identity --refill (dry run included) clears the refusal
  (refusalCleared), so the next open decides afresh; cleo doctor reports a
  standing refusal as a row_identity finding.

Tests: second open fast (nothing pending, refill none), a new NULL-uid row is
filled without re-warning; unlinking re-evaluates and refills; a refusal of
another recipe is not settled; the doctor dry run clears and re-evaluates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
C2: the real-store Gate B of the release recipe passed on every store,
cleocode included (all 7 checks on a sandbox copy of snapshot-20261006-121748).
rowUidFillEnabled is now true unless CLEO_ROW_UID_FILL=0.

Tests: row-identity-flag.test.ts (unset = on, 0 = off, other values = on).
Tests written to exercise the fill-OFF path now set the kill switch
explicitly (row-identity-off, -heal, -import 'uids off', -steady-open fill-off,
doctor refill 'fill off'). The sync journal tests (capture, sealer, repair)
were written against fill off and are pinned to it; the capture + fill-on
interplay (real uid triggers emitting K captures) is a separate task. 646
identity tests + 101 sync tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es the project (T13305)

Folds the #1952 review LOWs into C2:
- LOW-1: a placed project cleo.db that carries row uids records that it
  received them (pre-T13250 bundles carry no marker), through a direct
  no-migration open of the placed file.
- LOW-2: a machine export that cannot mark one project fails with
  E_PROJECT_STORE_UNAVAILABLE naming that project.

Changeset documents the default-on flip and the CLEO_ROW_UID_FILL=0 kill switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- schema-write guard coverage: the import-time marker open is DML only (exempt).
- trigger-suspend: a table rebuild on a connection the open pass armed also
  drops its TEMP row-uid triggers (the next open re-arms them); the §13
  rollback runs with the kill switch, as an operator rollback does.
- migrate-signaldock: the agent-registry-store mock is partial, since the
  open pass now loads the store writers.
- exodus-capture-bracket, recursive-triggers-audit, rewriters-capture: pinned
  off like capture/sealer/repair; K captures with fill on are T13311.
- spawn, pipeline-e2e: pinned off; a TDZ under vi.resetModules with fill on
  is T13313 (the built CLI is unaffected).
- Docs that called row uids opt-in now name the kill switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kryptobaseddev
kryptobaseddev merged commit d506df8 into main Oct 10, 2026
207 of 209 checks passed
@kryptobaseddev
kryptobaseddev deleted the feat/T13305-row-uid-default-on branch October 10, 2026 04:14
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