Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(persistence): read adoption recovery proof before the recovery transaction (#8869)

garrytan07cebb35a047
diff --git a/docs/architecture/key-files/core-persistence-request-indexes.md b/docs/architecture/key-files/core-persistence-request-indexes.md
index a78bc19c4b..23bbbe56ec 100644
--- a/docs/architecture/key-files/core-persistence-request-indexes.md
+++ b/docs/architecture/key-files/core-persistence-request-indexes.md
@@ -17,4 +17,4 @@ The online-built request-table indexes (the managed sync checkpoint pair, the pa
- `src/core/persistence/hosted-repo.ts` with `src/commands/sources-host-repo.ts` — G7b-2, `gbrain sources host-repo <id> --dir <path> [--push-remote <url>] [--dry-run | --expect <plan_hash>]`: a hosted brain gives an empty, unbound source a bare repository (`<dir>/repo.git`, branch `main`, one commit holding an empty `.gitignore`, repository-local identity `gbrain`) and checks it out as a linked worktree (`<dir>/worktree`) claimed through `runManagedSourceLifecycle` (`add` or `claim`, every physical-root and manifest check), with `config.canonical = "git"` and `config.hosted_repo` set in the claim's own transaction. The door then commits there unchanged. A pre-receive hook (`core.hooksPath` pinned to the repository's `hooks/`) refuses every push, since Git's checked-out-branch refusal ends once the worktree is pruned. The preview (the default without `--expect`) prints the plan in words and a `plan_hash` over the source incarnation, canonical setting, directory state, push remote and hook; the apply refuses `preview_changed` when it moved. Refuses `strict_requires_managed` on an unmanaged brain, `hosted_repo_refused` (`source_bound`, `source_has_path`, `source_has_pages`, `source_archived`, `dir_not_empty`) and `overlapping_path` (a directory in a checkout or a source's directory). On a hosted source the preview reports the hook (`ok`/`missing`/`changed`) and the worktree link, and the apply reinstalls the hook. Trusted local CLI only; no operation. Tests: `test/hosted-repo-g7b2.test.ts` (both engines).
- `src/core/persistence/worktree-link.ts` `linkedWorktreeProblem` / `assertLinkedWorktreeIntact` — a claim (`localRoot` in `source-lifecycle.ts`) refuses `git_worktree_link_broken` for a linked worktree whose `.git` file names a repository entry that is gone (pruned) or whose entry names another path (the checkout moved); a submodule's `.git` file is checked for existence only. Tests: `test/hosted-repo-g7b2.test.ts`.
- `src/core/persistence/sync-receipt-wait.ts` — how long a managed sync pass waits on its own admitted write, in one place: `syncReceiptWait()` returns `pass` (5 s), `checkpoint` (8 s), `held` (30 s, while this process's consumer still holds the write) and `drain` (30 s, a drain's re-entry). `sync-run.ts` reads every wait from it. `__setSyncReceiptWaitForTests(partial | null)` is the test seam (returns a restore function), so a test outlasts a wait in milliseconds instead of sleeping past 30 s.
-- **`src/core/persistence/local-edit-adoption.ts`** — GST-1601 part 2: with `persistence.adopt_local_edits.source.<id>` on, `finishUnpublishedFailure` (`coordinator.ts`) hands a `remember` / `capture` / `add_timeline_entry` refused `file_database_drift` to `adoptLocalEdit`, which reads the drifted file the refusal carries (`localEdit`, set in `page-prepare.ts` compareFileTarget), waits until it is quiet (`persistence.adopt_quiet_ms`, empty reads as the 5000 default, at most three windows and never past 30 s: the caller's claim holds its worktree queue meanwhile), and adopts only a one-sided, safe edit (#8755: a file over `PAGE_MAX_BYTES`, checked by stat before reading, a segmented page, an unmerged path or an operation in progress (`pending-import.ts` `unmergedPath` / `operationMarkerPaths`; #8826 adds `BISECT_LOG` and `SQUASH_MSG` and reads `--absolute-git-dir` as bytes, answering null unless it is one absolute, existing directory in valid UTF-8), and a stale editor save (`staleEditorSave`: the file equals an earlier `page_versions` body, or lacks a list or table row the current revision has and its newest archived version had not) keep the refusal; the repo-less test walks up for `.git`): HEAD's blob matches the database copy (`fileMatchesSnapshot`; a repo-less brain skips this), `protectedLocalEdit` finds no title, type or protected-key change, and `prepareRepairPublication` is `ready`. The adoption is a `managed_file_repair` (`file-repair.ts`) carrying `adoptLocalEdit` (`{ blob, replaced_revision }`), admitted under the CLI writer with a request id derived from the caller's (one adoption per write), claimed and published inline (`publishMutation`, retrying a busy worktree lock for 10 s) so it lands before the caller: it publishes the file's unchanged bytes with the `localEditAdoptionCommit` note, stamps the archived replaced revision `change_reason = 'adopted_local_edit'`, and commits that one file inside its publication transaction (`afterEffects` → `commitAdoptedLocalEdit`; a strict source's door commits it instead). #8755: a publication that fails after that commit is requeued by recovery and `publishAdoption` publishes it again (it retries any release within its 10 s): `adoptedHeadHolds` accepts HEAD holding the adopted blob and the replay names the landed commit (`landed_before_row`). The intent names the caller's claim (`adoptLocalEdit.caller`); `assertAdoptionCaller` (`file-repair.ts` preparation) refuses `write_claim_lost` once that claim is gone, so an adoption orphaned by a crash publishes nothing; its own claim carries the owner stamp. #8824: the check runs only until the adoption's commit lands: once HEAD holds it (`landedAdoptionCommit`: the newest commit on the path has the adoption's subject, trailer and commit-ledger line, its parent holds the pre-adoption blob and HEAD the adopted one; the commit line is written after `git commit` and can be missing, so the ledger's intent line also proves the commit when its `head_before` is the commit's parent and its message digest is the commit's), a replay publishes it whatever became of its caller, and `settleAdoption` leaves such a requeued adoption to the consumer instead of cancelling it. #8767: `recoverPublication` (`coordinator.ts`) stamps that commit (`adoptionCommitLanded`) as `outcome.persistence = {git_state: committed, git_commit, landed_before_row: true}` on the requeued or failed receipt, which `completeWrite` keeps on any later end without committing. `settleAdoption` waits up to 120 s more on an adoption whose publication already started; a caller whose claim was lost is returned as `claimLost`, never `released`; an admission failure logs `[persistence] phase=adoption`. The caller is then released with `intent.adopted_local_edit` and prepared again; `withAdoptedLocalEdit` (`service.ts` preparePersistedMutation) puts `adopted` on its receipt. A file changed under the adoption ends both `raw_file_changed`. Commit-ledger lines carry `adopted` (`adoptedBy`, `effect-model.ts`). Doctor `local_edit_adoptions` (`src/commands/doctor/checks/local-edit-adoptions.ts`) lists adoptions of the last 24 h per source from `outcome.adopted_local_edit` (kept by compaction), always ok. Tests: `test/adopt-local-edit.test.ts`, `test/operation-marker-paths.test.ts`.
+- **`src/core/persistence/local-edit-adoption.ts`** — GST-1601 part 2: with `persistence.adopt_local_edits.source.<id>` on, `finishUnpublishedFailure` (`coordinator.ts`) hands a `remember` / `capture` / `add_timeline_entry` refused `file_database_drift` to `adoptLocalEdit`, which reads the drifted file the refusal carries (`localEdit`, set in `page-prepare.ts` compareFileTarget), waits until it is quiet (`persistence.adopt_quiet_ms`, empty reads as the 5000 default, at most three windows and never past 30 s: the caller's claim holds its worktree queue meanwhile), and adopts only a one-sided, safe edit (#8755: a file over `PAGE_MAX_BYTES`, checked by stat before reading, a segmented page, an unmerged path or an operation in progress (`pending-import.ts` `unmergedPath` / `operationMarkerPaths`; #8826 adds `BISECT_LOG` and `SQUASH_MSG` and reads `--absolute-git-dir` as bytes, answering null unless it is one absolute, existing directory in valid UTF-8), and a stale editor save (`staleEditorSave`: the file equals an earlier `page_versions` body, or lacks a list or table row the current revision has and its newest archived version had not) keep the refusal; the repo-less test walks up for `.git`): HEAD's blob matches the database copy (`fileMatchesSnapshot`; a repo-less brain skips this), `protectedLocalEdit` finds no title, type or protected-key change, and `prepareRepairPublication` is `ready`. The adoption is a `managed_file_repair` (`file-repair.ts`) carrying `adoptLocalEdit` (`{ blob, replaced_revision }`), admitted under the CLI writer with a request id derived from the caller's (one adoption per write), claimed and published inline (`publishMutation`, retrying a busy worktree lock for 10 s) so it lands before the caller: it publishes the file's unchanged bytes with the `localEditAdoptionCommit` note, stamps the archived replaced revision `change_reason = 'adopted_local_edit'`, and commits that one file inside its publication transaction (`afterEffects` → `commitAdoptedLocalEdit`; a strict source's door commits it instead). #8755: a publication that fails after that commit is requeued by recovery and `publishAdoption` publishes it again (it retries any release within its 10 s): `adoptedHeadHolds` accepts HEAD holding the adopted blob and the replay names the landed commit (`landed_before_row`). The intent names the caller's claim (`adoptLocalEdit.caller`); `assertAdoptionCaller` (`file-repair.ts` preparation) refuses `write_claim_lost` once that claim is gone, so an adoption orphaned by a crash publishes nothing; its own claim carries the owner stamp. #8824: the check runs only until the adoption's commit lands: once HEAD holds it (`landedAdoptionCommit`: the newest commit on the path has the adoption's subject, trailer and commit-ledger line, its parent holds the pre-adoption blob and HEAD the adopted one; the commit line is written after `git commit` and can be missing, so the ledger's intent line also proves the commit when its `head_before` is the commit's parent and its message digest is the commit's), a replay publishes it whatever became of its caller, and `settleAdoption` leaves such a requeued adoption to the consumer instead of cancelling it. #8767: `recoverPublication` (`coordinator.ts`) stamps that commit (`adoptionCommitLanded`, read by `adoptionRecoveryEvidence` under the worktree lock before the recovery transaction; #8869: the transaction refuses `recovery_required` before touching a file, leaving the recovery pending, when the request or the checkout's HEAD changed since) as `outcome.persistence = {git_state: committed, git_commit, landed_before_row: true}` on the requeued or failed receipt, which `completeWrite` keeps on any later end without committing. `settleAdoption` waits up to 120 s more on an adoption whose publication already started; a caller whose claim was lost is returned as `claimLost`, never `released`; an admission failure logs `[persistence] phase=adoption`. The caller is then released with `intent.adopted_local_edit` and prepared again; `withAdoptedLocalEdit` (`service.ts` preparePersistedMutation) puts `adopted` on its receipt. A file changed under the adoption ends both `raw_file_changed`. Commit-ledger lines carry `adopted` (`adoptedBy`, `effect-model.ts`). Doctor `local_edit_adoptions` (`src/commands/doctor/checks/local-edit-adoptions.ts`) lists adoptions of the last 24 h per source from `outcome.adopted_local_edit` (kept by compaction), always ok. Tests: `test/adopt-local-edit.test.ts`, `test/operation-marker-paths.test.ts`.
diff --git a/src/core/persistence/coordinator.ts b/src/core/persistence/coordinator.ts
index cef9d0a01c..6f188d97b2 100644
--- a/src/core/persistence/coordinator.ts
+++ b/src/core/persistence/coordinator.ts
@@ -9,7 +9,7 @@ import { pageIdentityError, rememberAcceptsPageCreatedSince } from './page-ident
import { atomicStagingPath, atomicWriteFileSync, mkdirPrivate, validateAtomicStagingPath } from '../atomic-write.ts';
import { flushDirectory } from '../fs-durable.ts';
import { isWriteTargetContained } from '../path-confine.ts';
-import { sha256 } from './digest.ts';
+import { sha256, stableJson } from './digest.ts';
import { authorizeStoredRequest } from './authority.ts';
import { hostIdFor } from './identity.ts';
import { acquireWorktree, getWorktreeBinding, guardOwnership, type WorktreeBinding } from './ownership.ts';
@@ -31,7 +31,7 @@ import { tryAcquirePublicationCapacity } from './pool-capacity.ts';
import { queuePublicationEffects } from './effect-journal.ts';
import { deferredReplayRefusal } from './refresh-barrier.ts';
import { holdForImport } from './import-deferral.ts';
-import { adoptionCommitLanded, adoptLocalEdit } from './local-edit-adoption.ts';
+import { adoptionRecoveryEvidence, adoptLocalEdit } from './local-edit-adoption.ts';
import { timePublicationStep } from './publication-timing.ts';
import type { AppendedRange, GitCommitNote } from './effect-model.ts';
import { authorizePageVisibility } from './page-visibility.ts';
@@ -46,7 +46,7 @@ import { assertMutationProtocol, assertSharedSkillPersistence, declareDurablePer
import { assertBundleRecoveryBinding, bundleFileHash, prepareBundleRecovery, publishStagedBundleFile, stageBundleFile, type MutationFile } from './bundle-files.ts';
import { assertKnowledgePublicationAllowed } from '../shared-skills/knowledge-guard.ts';
import { classifyMirrorPage, sourceMirrorReadOnly } from './mirror-read-only.ts';
-import { landedCommit, PENDING_IMPORT, SYNC_HELD } from './pending-import.ts';
+import { headCommit, landedCommit, PENDING_IMPORT, SYNC_HELD } from './pending-import.ts';
import { CANONICAL_FILE_MISSING, CHECKOUT_REFUSAL_ORIGINS, type CheckoutRefusalOrigin, SOURCE_CHANGED_ORIGINS, type SourceChangedDetail, type SourceChangedOrigin, databaseRefusal, ownerExceptionFailure, stagingFailureDetail, withAttempt, type PublicationFailure, type PublicationFailureDetail, type PublicationStage } from './publication-failure.ts';
import { SYNC_CURSOR_REPLACED, SYNC_PASS_SUPERSEDED } from './sync-checkpoint-replaced.ts';
import { fenceFailureDetail } from '../fence-repair/refusal.ts';
@@ -794,12 +794,20 @@ export async function recoverPublication(engine: BrainEngine, id: string, hostId
return blocked ?? row;
}
if (!isTerminal(row)) await upgradeRecoveryStaging(engine, 'persistence_requests', id, row.worktree_id!, 'restore');
+ const adoption = isTerminal(row) ? null : await adoptionRecoveryEvidence(engine, row, binding);
+ const adoptionPin = (request: WriteRequest) => stableJson([request.intent, request.state, request.execution_token]);
+ const pinned = adoptionPin(row);
row = await engine.transaction(async tx => {
await declareDurablePersistence(tx);
await tx.executeRaw('SELECT id FROM persistence_worktrees WHERE id=$1::uuid FOR SHARE', [row!.worktree_id]);
await lockCounters(tx, ['brain', principalKey(requestPrincipal(row!)), `worktree:${row!.worktree_id}`]);
const [current] = await tx.executeRaw<WriteRequest>('SELECT * FROM persistence_requests WHERE id=$1::uuid FOR UPDATE', [id]);
if (!current.recovery) return current;
+ // #8869: the adoption proof was read before this transaction; a request or HEAD that moved since leaves the recovery pending.
+ if (adoption && !isTerminal(current) && (adoptionPin(current) !== pinned || await headCommit(adoption.root) !== adoption.head)) throw opError('recovery_required',
+ 'Local edit adoption recovery evidence changed.',
+ `Request ${current.request_id} in source ${current.source_id} or its checkout's HEAD changed while recovery read the adoption's commit proof, so recovery stopped before touching any file and the request stays recovering. Its canonical owner retries the recovery with fresh evidence.`,
+ { fix: ownerStatusFix(current.source_id) });
const records = recoveryFiles(current.recovery);
let landed: string | null = null;
if (isBundleRecovery(current.recovery)) {
@@ -870,7 +878,7 @@ export async function recoverPublication(engine: BrainEngine, id: string, hostId
const failure: PublicationFailure | undefined = terminalError ?? (current.error_code ? {code:current.error_code,message:current.error_message ?? 'Publication failed before database completion.',
...(current.error_detail ? { detail: current.error_detail as unknown as PublicationFailureDetail } : {})} : undefined);
// #8767: so is a local edit adoption's own commit (local-edit-adoption.ts), on a failure and on the requeued replay.
- landed ??= await adoptionCommitLanded(tx, current, binding);
+ landed ??= adoption?.landed ?? null;
// G7b: a door commit that landed before its row is named on the receipt, whatever the replay's outcome.
const kept = landed ? { persistence: { git_state: 'committed', git_commit: landed, landed_before_row: true } } : null;
if (failure) return completeWrite(tx, current, failureState(failure.code), kept ?? {}, failure);
diff --git a/src/core/persistence/local-edit-adoption.ts b/src/core/persistence/local-edit-adoption.ts
index 552b5ae154..d390ae3d42 100644
--- a/src/core/persistence/local-edit-adoption.ts
+++ b/src/core/persistence/local-edit-adoption.ts
@@ -260,6 +260,18 @@ export async function adoptionCommitLanded(engine: BrainEngine, row: WriteReques
return landedAdoptionCommit(root, join(root, intent.path), { path: intent.path, blob: adopted.blob, replaced_revision: adopted.replaced_revision, head: adopted.head });
}
+/**
+ * #8869: `adoptionCommitLanded` with the HEAD it was read at, for `recoverPublication` to read under the worktree lock
+ * before its transaction, so Git history and the whole commit ledger are never read under the recovery's row locks. Null
+ * for any other request.
+ */
+export async function adoptionRecoveryEvidence(engine: BrainEngine, row: WriteRequest, binding: WorktreeBinding): Promise<{ root: string; head: string | null; landed: string | null } | null> {
+ if (!binding.local_path || !(row.intent as { adoptLocalEdit?: unknown } | null)?.adoptLocalEdit) return null;
+ const root = join(binding.local_path, binding.relative_path);
+ const head = await headCommit(root);
+ return { root, head, landed: await adoptionCommitLanded(engine, row, binding) };
+}
+
/** Claims, prepares and publishes the admitted adoption, retrying while another owner task holds the worktree lock. */
async function publishAdoption(engine: BrainEngine, caller: WriteRequest, admitted: WriteRequest, path: string): Promise<WriteRequest> {
const { finishUnpublishedFailure, publishMutation } = await import('./coordinator.ts');
diff --git a/test/adopt-local-edit.test.ts b/test/adopt-local-edit.test.ts
index 6d2b6fd498..b0ba2f9d8d 100644
--- a/test/adopt-local-edit.test.ts
+++ b/test/adopt-local-edit.test.ts
@@ -35,9 +35,11 @@ import { performManagedSync } from '../src/core/persistence/sync-run.ts';
import { ledgerFiles, readLedger, recordIntent } from '../src/core/git/commit-ledger.ts';
import { isTerminal, requestPrincipal, type WriteRequest } from '../src/core/persistence/model.ts';
import { cancelWriteRequest } from '../src/core/persistence/control.ts';
+import { recoverPublication } from '../src/core/persistence/coordinator.ts';
import { isolatedPersistencePostgres } from './helpers/persistence-postgres.ts';
import { managedBrain } from './helpers/managed-brain.ts';
import { testBackends } from './helpers/test-backends.ts';
+import { waitFor } from './helpers/wait-for.ts';
import { commitFile, git, page, withRefreshFixture, type RefreshFixture } from './helpers/worktree-refresh-fixture.ts';
const backends = testBackends();
@@ -704,6 +706,78 @@ test('#8767: a terminal failure after the adoption\'s commit leaves a receipt na
expect((listing as { rows?: Array<{ request_id: string }> }).rows?.map(row => row.request_id)).toContain(done.request_id);
}), 180_000);
+test('#8869: adoption recovery reads its commit ledger before the recovery transaction, never inside it', () => each(async f => {
+ const { installFaultHook } = await import('../src/core/persistence/fault-points.ts');
+ writeFileSync(join(f.root, 'alpha', 'one.md'), EDITED);
+ const transaction = f.engine.transaction, read = fs.readFileSync;
+ let depth = 0, observing = false, fired = 0;
+ const depths: number[] = [];
+ f.engine.transaction = (function (this: BrainEngine, fn: Parameters<BrainEngine['transaction']>[0], opts?: Parameters<BrainEngine['transaction']>[1]) {
+ return transaction.call(this, async tx => { depth++; try { return await fn(tx); } finally { depth--; } }, opts);
+ }) as BrainEngine['transaction'];
+ const reads = spyOn(fs, 'readFileSync').mockImplementation(((path: fs.PathOrFileDescriptor, ...rest: unknown[]) => {
+ if (observing && String(path).endsWith('commit-ledger.jsonl')) depths.push(depth);
+ return (read as (...args: unknown[]) => unknown)(path, ...rest);
+ }) as typeof fs.readFileSync);
+ installFaultHook((point, detail) => {
+ if (point !== 'publication:before_commit' || detail.operation !== 'put_page' || detail.sourceId !== f.alpha || fired++ > 0) return;
+ observing = true;
+ throw new Error('example terminal failure after the adoption commit');
+ });
+ try { await timeline(f)().catch(() => undefined); }
+ finally { observing = false; installFaultHook(undefined); reads.mockRestore(); f.engine.transaction = transaction; }
+ expect(fired).toBe(1);
+ const landed = adoptCommit(f, 'one.md');
+ expect(landed).toHaveLength(1);
+ const [adoption] = await adoptionRows(f);
+ const done = await settled(f.engine, adoption!);
+ expect(done.state).toBe('failed');
+ expect((done.outcome as { persistence?: unknown }).persistence).toEqual({ git_state: 'committed', git_commit: landed[0], landed_before_row: true });
+ expect(depths.length).toBeGreaterThan(0);
+ expect(depths).toEqual(depths.map(() => 0));
+}), 180_000);
+
+test('#8869: a HEAD that moves after the adoption proof was read leaves the recovery pending with no file touched; a fresh recovery names the commit', () => each(async f => {
+ const { installFaultHook } = await import('../src/core/persistence/fault-points.ts');
+ writeFileSync(join(f.root, 'alpha', 'one.md'), EDITED);
+ const transaction = f.engine.transaction, read = fs.readFileSync, target = join(f.root, 'alpha', 'one.md');
+ let proved = false, moved = false, fired = 0;
+ const refusals: Array<{ code?: string; recovering: boolean; unchanged: boolean }> = [];
+ const reads = spyOn(fs, 'readFileSync').mockImplementation(((path: fs.PathOrFileDescriptor, ...rest: unknown[]) => {
+ if (fired > 0 && String(path).endsWith('commit-ledger.jsonl')) proved = true;
+ return (read as (...args: unknown[]) => unknown)(path, ...rest);
+ }) as typeof fs.readFileSync);
+ f.engine.transaction = (async function (this: BrainEngine, fn: Parameters<BrainEngine['transaction']>[0], opts?: Parameters<BrainEngine['transaction']>[1]) {
+ if (!proved || moved) return transaction.call(this, fn, opts);
+ moved = true;
+ git(f.root, 'commit', '-q', '--allow-empty', '-m', 'A foreign commit');
+ const bytes = read(target, 'utf8');
+ try { return await transaction.call(this, fn, opts); }
+ catch (error) {
+ refusals.push({ code: (error as { code?: string }).code, recovering: (await adoptionRows(f))[0]!.recovery !== null, unchanged: read(target, 'utf8') === bytes });
+ throw error;
+ }
+ }) as BrainEngine['transaction'];
+ installFaultHook((point, detail) => {
+ if (point === 'publication:before_commit' && detail.operation === 'put_page' && detail.sourceId === f.alpha && fired++ === 0) throw new Error('example terminal failure after the adoption commit');
+ });
+ // The caller waits on the pending adoption; the owner's next recovery (the resident consumer's, run here) finishes it.
+ const write = timeline(f)().catch(() => undefined);
+ try {
+ await waitFor(() => refusals.length > 0, { timeoutMs: 30_000, label: 'the recovery refusal' });
+ const [pending] = await adoptionRows(f);
+ await waitFor(async () => (await recoverPublication(f.engine, pending!.id, localHostId())).recovery === null, { timeoutMs: 30_000, intervalMs: 200, label: 'a fresh recovery' });
+ await write;
+ } finally { installFaultHook(undefined); reads.mockRestore(); f.engine.transaction = transaction; }
+ expect(refusals).toEqual([{ code: 'recovery_required', recovering: true, unchanged: true }]);
+ const landed = adoptCommit(f, 'one.md');
+ expect(landed).toHaveLength(1);
+ expect(git(f.root, 'rev-parse', 'HEAD^')).toBe(landed[0]!);
+ const [done] = await adoptionRows(f);
+ expect(done!.state).toBe('failed');
+ expect((done!.outcome as { persistence?: unknown }).persistence).toEqual({ git_state: 'committed', git_commit: landed[0], landed_before_row: true });
+}), 180_000);
+
test('#8824: an adoption whose commit line never reached the ledger is still published, proved by its intent line', () => each(async f => {
const { installFaultHook } = await import('../src/core/persistence/fault-points.ts');
const rel = 'people/alice-example.md', slug = 'people/alice-example';