Skip to content

Commit 4d2e9ed

Browse files
committed
chore(checkpoints): satisfy the production knip gate for the split chain
Upstream enabled knip --production (test-only production exports fail). - loadChanges: @internal tag - wired by a later unit in the split chain (knip 5.60 has no export-level ignore config; @internal is its native mechanism, documented at the export site).- appendChange: removed - the single-entry wrapper is production code only in B2; these units journal batch writes (specs keep a local helper).
1 parent a8e8c15 commit 4d2e9ed

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎src/core/checkpoints/__tests__/changeJournal.spec.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ import path from "path"
44

55
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"
66

7-
import { appendChange, appendChanges, journalPath, loadChanges, type ChangeJournalEntry } from "../changeJournal"
7+
import { appendChanges, journalPath, loadChanges, type ChangeJournalEntry } from "../changeJournal"
8+
9+
// appendChange (single-entry wrapper) is production code only in B2; these
10+
// units journal batch writes, so the spec keeps a local helper.
11+
const appendChange = (globalStorageDir: string, taskId: string, entry: ChangeJournalEntry) =>
12+
appendChanges(globalStorageDir, taskId, [entry])
813

914
describe("changeJournal", () => {
1015
const taskId = "test-task"

‎src/core/checkpoints/changeJournal.ts‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,6 @@ export async function appendChanges(
234234
})
235235
}
236236

237-
/** Append a single entry; see appendChanges for the durability contract. */
238-
export async function appendChange(globalStorageDir: string, taskId: string, entry: ChangeJournalEntry): Promise<void> {
239-
await appendChanges(globalStorageDir, taskId, [entry])
240-
}
241-
242237
/**
243238
* Load all change-journal entries for a task.
244239
*
@@ -248,6 +243,7 @@ export async function appendChange(globalStorageDir: string, taskId: string, ent
248243
* unknown operation) are skipped for the same reason. The rest of the file
249244
* is returned in order. An absent
250245
* or empty journal returns [].
246+
* @internal Wired by a later unit in the split chain; remove when the chain completes.
251247
*/
252248
export async function loadChanges(globalStorageDir: string, taskId: string): Promise<ChangeJournalEntry[]> {
253249
const filePath = journalPath(globalStorageDir, taskId)

0 commit comments

Comments
 (0)