Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
Sweep beta drafts a newer published beta supersedes (PRD-9590) (#6717)
Andrew Mikofalvye375ba785989
diff --git a/.github/scripts/select-stuck-drafts.mjs b/.github/scripts/select-stuck-drafts.mjsindex 88acc47b6..a69483d32 100644--- a/.github/scripts/select-stuck-drafts.mjs+++ b/.github/scripts/select-stuck-drafts.mjs@@ -1,4 +1,5 @@/* biome-ignore-all lint/suspicious/noUndeclaredEnvVars: GitHub Actions invokes this entrypoint outside Turbo. */+import { readFileSync } from 'node:fs';import { pathToFileURL } from 'node:url';import { compareVersions, highestVersion } from './write-back-gate.mjs';@@ -26,6 +27,17 @@ export function highestPublishedStable(releases) {return highestVersion(cycles);}+export function highestPublishedBeta(releases) {+ const versions = [];+ for (const release of releases ?? []) {+ if (release.isDraft || !release.isPrerelease) continue;+ if (!isPipelineTag(release.tagName)) continue;+ if (!BETA_SUFFIX.test(release.tagName)) continue;+ versions.push(String(release.tagName).trim().replace(/^v/, ''));+ }+ return highestVersion(versions);+}+export function objectAgeSeconds(release, nowMs) {const stamp = release.updatedAt ?? release.publishedAt;if (!stamp) return null;@@ -36,8 +48,9 @@ export function objectAgeSeconds(release, nowMs) {export function selectStuckDrafts({ releases, nowMs, maxAgeSeconds }) {const maxStable = highestPublishedStable(releases);if (maxStable === null) {- return { maxStable: null, sweep: [], keep: [] };+ return { maxStable: null, maxBeta: null, sweep: [], keep: [] };}+ const maxBeta = highestPublishedBeta(releases);const sweep = [];const keep = [];for (const release of releases ?? []) {@@ -46,41 +59,42 @@ export function selectStuckDrafts({ releases, nowMs, maxAgeSeconds }) {keep.push({ tagName: release.tagName, cycle: null, reason: 'unrecognized tag shape' });continue;}- if (BETA_SUFFIX.test(release.tagName)) {- keep.push({- tagName: release.tagName,- cycle: cycleOf(release.tagName),- reason: 'unpublished beta history is retained',- });- continue;- }+ const cycle = cycleOf(release.tagName);const ageSeconds = objectAgeSeconds(release, nowMs);if (ageSeconds === null) {- keep.push({- tagName: release.tagName,- cycle: cycleOf(release.tagName),- reason: 'no usable timestamp',- });+ keep.push({ tagName: release.tagName, cycle, reason: 'no usable timestamp' });continue;}if (!(ageSeconds > maxAgeSeconds)) {- keep.push({- tagName: release.tagName,- cycle: cycleOf(release.tagName),- reason: 'younger than the age gate',- });+ keep.push({ tagName: release.tagName, cycle, reason: 'younger than the age gate' });continue;}- const cycle = cycleOf(release.tagName);const entry = { tagName: release.tagName, cycle };- if (compareVersions(cycle, maxStable) <= 0) sweep.push(entry);+ if (BETA_SUFFIX.test(release.tagName)) {+ const version = String(release.tagName).trim().replace(/^v/, '');+ if (maxBeta !== null && compareVersions(version, maxBeta) < 0) {+ sweep.push({ ...entry, supersededBy: `v${maxBeta}` });+ } else {+ keep.push({ ...entry, reason: 'no newer beta has been published' });+ }+ continue;+ }+ if (compareVersions(cycle, maxStable) <= 0) sweep.push({ ...entry, supersededBy: `v${maxStable}` });else keep.push({ ...entry, reason: 'cycle not yet covered by a published stable' });}- return { maxStable, sweep, keep };+ return { maxStable, maxBeta, sweep, keep };}function main() {- const releases = JSON.parse(process.env.RELEASES_JSON ?? '[]');+ const input = readFileSync(0, 'utf8').trim();+ if (input === '') {+ console.error(+ '::error::select-stuck-drafts: no release listing arrived on stdin. Pipe the JSON array of releases into this script; an empty listing is `[]`.',+ );+ process.exitCode = 1;+ return;+ }+ const releases = JSON.parse(input);const maxAgeSeconds = Number(process.env.MAX_AGE_SECONDS ?? STUCK_DRAFT_MAX_AGE_SECONDS);const result = selectStuckDrafts({ releases, nowMs: Date.now(), maxAgeSeconds });if (result.maxStable === null) {@@ -89,14 +103,14 @@ function main() {);return;}- console.error(`Highest published stable version: ${result.maxStable}`);+ console.error(+ `Highest published stable version: ${result.maxStable}; highest published beta: ${result.maxBeta ?? 'none'}.`,+ );for (const { tagName, reason } of result.keep) {- console.error(`Keeping ${tagName}: ${reason} (newest published stable ${result.maxStable}).`);+ console.error(`Keeping ${tagName}: ${reason}.`);}- for (const { tagName, cycle } of result.sweep) {- console.error(- `Selected ${tagName} for sweeping: its ${cycle} cycle is closed (stable ${result.maxStable} exists).`,- );+ for (const { tagName, supersededBy } of result.sweep) {+ console.error(`Selected ${tagName} for sweeping: published ${supersededBy} supersedes it.`);}console.log(result.sweep.map((entry) => entry.tagName).join('\n'));}diff --git a/.github/scripts/select-stuck-drafts.test.mjs b/.github/scripts/select-stuck-drafts.test.mjsindex ea4e2d80a..d226bb101 100644--- a/.github/scripts/select-stuck-drafts.test.mjs+++ b/.github/scripts/select-stuck-drafts.test.mjs@@ -6,6 +6,7 @@ import { fileURLToPath } from 'node:url';import { describe, expect, test } from 'vitest';import {cycleOf,+ highestPublishedBeta,highestPublishedStable,isPipelineTag,objectAgeSeconds,@@ -85,6 +86,22 @@ describe('highestPublishedStable', () => {});});+describe('highestPublishedBeta', () => {+ test('ignores drafts and stables, and orders the beta counter numerically', () => {+ const releases = [+ published('v0.99.0'),+ betaDraft('v0.86.0-beta.20'),+ publishedBeta('v0.86.0-beta.9'),+ publishedBeta('v0.86.0-beta.10'),+ ];+ expect(highestPublishedBeta(releases)).toBe('0.86.0-beta.10');+ });++ test('is null when no beta has been published', () => {+ expect(highestPublishedBeta([published('v0.68.3'), betaDraft('v0.69.0-beta.0')])).toBeNull();+ });+});+describe('isPipelineTag', () => {test('admits the shapes the release pipeline creates', () => {expect(isPipelineTag('v0.68.3')).toBe(true);@@ -126,7 +143,7 @@ describe('selectStuckDrafts', () => {expect(swept(releases)).toEqual(['v0.65.0', 'v0.66.0']);});- test('retains unpublished beta history even after a newer stable ships', () => {+ test('keeps a beta draft that only a newer stable follows, with no newer published beta', () => {const releases = [published('v0.68.3'), betaDraft('v0.64.0-beta.6')];expect(swept(releases)).toEqual([]);expect(kept(releases)).toEqual(['v0.64.0-beta.6']);@@ -142,6 +159,81 @@ describe('selectStuckDrafts', () => {expect(swept([published('v0.68.3'), betaDraft('v0.68.3-beta.1')])).toEqual([]);});+ test('sweeps a beta draft once a later beta of its cycle has published', () => {+ const releases = [+ published('v0.68.3'),+ publishedBeta('v0.69.0-beta.5'),+ betaDraft('v0.69.0-beta.6'),+ publishedBeta('v0.69.0-beta.7'),+ ];+ expect(select(releases).sweep).toEqual([+ { tagName: 'v0.69.0-beta.6', cycle: '0.69.0', supersededBy: 'v0.69.0-beta.7' },+ ]);+ });++ test('sweeps a beta draft that a published beta of a later cycle supersedes', () => {+ const releases = [published('v0.68.3'), betaDraft('v0.69.0-beta.1'), publishedBeta('v0.70.0-beta.0')];+ expect(swept(releases)).toEqual(['v0.69.0-beta.1']);+ });++ test('keeps a beta draft when every newer beta is itself still a draft', () => {+ const releases = [+ published('v0.68.3'),+ publishedBeta('v0.69.0-beta.5'),+ betaDraft('v0.69.0-beta.6'),+ betaDraft('v0.69.0-beta.7'),+ ];+ expect(swept(releases)).toEqual([]);+ expect(select(releases).keep).toEqual([+ { tagName: 'v0.69.0-beta.6', cycle: '0.69.0', reason: 'no newer beta has been published' },+ { tagName: 'v0.69.0-beta.7', cycle: '0.69.0', reason: 'no newer beta has been published' },+ ]);+ });++ test('spares a superseded beta draft younger than the age gate, since its build may still be running', () => {+ const releases = [+ published('v0.68.3'),+ betaDraft('v0.69.0-beta.6', AT_GATE),+ betaDraft('v0.69.0-beta.8', PAST_GATE),+ publishedBeta('v0.69.0-beta.9'),+ ];+ expect(swept(releases)).toEqual(['v0.69.0-beta.8']);+ });++ test('sweeps exactly the five drafts stranded on inkeep/open-knowledge as of 2026-10-16', () => {+ const at = (iso) => ({ updatedAt: iso });+ const releases = [+ { ...published('v0.86.22') },+ { ...published('v0.82.0') },+ { ...published('v0.79.4') },+ { ...betaDraft('v0.79.4-beta.0'), ...at('2026-09-29T21:10:21Z') },+ { ...betaDraft('v0.79.12-beta.0'), ...at('2026-10-01T00:28:26Z') },+ publishedBeta('v0.79.12-beta.1'),+ { ...betaDraft('v0.80.0-beta.0'), ...at('2026-10-01T10:04:39Z') },+ publishedBeta('v0.80.0-beta.1'),+ publishedBeta('v0.82.0-beta.0'),+ { ...betaDraft('v0.82.0-beta.1'), ...at('2026-10-02T20:02:03Z') },+ publishedBeta('v0.82.0-beta.2'),+ publishedBeta('v0.86.0-beta.5'),+ { ...betaDraft('v0.86.0-beta.6'), ...at('2026-10-11T17:41:29Z') },+ publishedBeta('v0.86.0-beta.7'),+ publishedBeta('v0.87.0-beta.3'),+ ];+ const result = selectStuckDrafts({+ releases,+ nowMs: Date.parse('2026-10-16T22:00:00Z'),+ maxAgeSeconds: MAX_AGE,+ });+ expect(result.sweep.map((entry) => entry.tagName).sort()).toEqual([+ 'v0.79.12-beta.0',+ 'v0.79.4-beta.0',+ 'v0.80.0-beta.0',+ 'v0.82.0-beta.1',+ 'v0.86.0-beta.6',+ ]);+ expect(result.keep).toEqual([]);+ });+test('spares a draft younger than the age gate, whatever its cycle', () => {expect(swept([published('v0.68.3'), stableDraft('v0.65.0', FRESH)])).toEqual([]);});@@ -224,7 +316,7 @@ describe('selectStuckDrafts', () => {nowMs: NOW,maxAgeSeconds: MAX_AGE,});- expect(result).toEqual({ maxStable: null, sweep: [], keep: [] });+ expect(result).toEqual({ maxStable: null, maxBeta: null, sweep: [], keep: [] });});});@@ -234,7 +326,7 @@ describe('the module CLI contract the workflow depends on', () => {const run = (releases) =>spawnSync(process.execPath, [SCRIPT], {encoding: 'utf8',- env: { ...process.env, RELEASES_JSON: JSON.stringify(releases) },+ input: JSON.stringify(releases),});test('stdout carries only the sweep tags, one per line', () => {@@ -243,6 +335,20 @@ describe('the module CLI contract the workflow depends on', () => {expect(r.stdout).toBe('v0.65.0\nv0.66.0\n');});+ test('an empty stdin fails loudly instead of reading as a listing with nothing to sweep', () => {+ const r = spawnSync(process.execPath, [SCRIPT], { encoding: 'utf8', input: '' });+ expect(r.status).toBe(1);+ expect(r.stdout.trim()).toBe('');+ expect(r.stderr).toContain('::error::select-stuck-drafts:');+ expect(r.stderr).toContain('stdin');+ });++ test('an empty listing is still a clean, empty sweep', () => {+ const r = run([]);+ expect(r.status).toBe(0);+ expect(r.stdout.trim()).toBe('');+ });+test('narration goes to stderr, never stdout', () => {const r = run([published('v0.68.3'), stableDraft('v0.65.0')]);expect(r.stderr).toContain('Highest published stable version');@@ -278,7 +384,7 @@ describe('the janitor workflow drives this module', () => {});test('the release list carries the object timestamp, not the commit date', () => {- const start = workflow.indexOf('RELEASES_JSON=$(');+ const start = workflow.indexOf('releases_file=$(mktemp)');const end = workflow.indexOf('sweep=$(');if (start === -1 || end === -1)throw new Error('the janitor no longer lists releases then sweeps');@@ -288,27 +394,25 @@ describe('the janitor workflow drives this module', () => {expect(listCommand).not.toContain('createdAt');});- test('the release list is narrowed to what the selector actually reads', () => {- const start = workflow.indexOf('RELEASES_JSON=$(');+ test('the listing reaches the selector on stdin, published betas included', () => {+ const start = workflow.indexOf('releases_file=$(mktemp)');const end = workflow.indexOf('sweep=$(');if (start === -1 || end === -1)throw new Error('the janitor no longer lists releases then sweeps');- expect(workflow.slice(start, end)).toContain('select(.draft or (.prerelease | not))');- });-- test('dropping published prereleases does not change the sweep set', () => {- const releases = [- published('v0.68.3'),- publishedBeta('v0.68.3-beta.4'),- publishedBeta('v0.69.0-beta.1'),- stableDraft('v0.68.0'),- betaDraft('v0.68.1-beta.0'),- stableDraft('v0.69.0'),- ];- const narrowed = releases.filter((r) => r.isDraft || !r.isPrerelease);- expect(narrowed.length).toBeLessThan(releases.length);- expect(select(releases).sweep).not.toEqual([]);- expect(select(releases)).toEqual(select(narrowed));+ const listCommand = workflow.slice(start, end);+ const projection = /--jq '([^']*)'/.exec(listCommand)?.[1];+ if (projection === undefined) throw new Error('the janitor no longer projects the listing with --jq');+ expect(projection.trim()).toMatch(/^\.\[\] \| \{[^|]*\}$/);+ expect(projection).toContain('isPrerelease: .prerelease');+ expect(workflow).toMatch(/node \.github\/scripts\/select-stuck-drafts\.mjs < "\$\{?\w+\}?"/);+ expect(workflow).not.toContain('RELEASES_JSON');+ });++ test('published betas decide the beta sweep, so a listing without them would strand drafts', () => {+ const releases = [published('v0.68.3'), betaDraft('v0.69.0-beta.1'), publishedBeta('v0.69.0-beta.2')];+ const withoutPublishedBetas = releases.filter((r) => r.isDraft || !r.isPrerelease);+ expect(swept(releases)).toEqual(['v0.69.0-beta.1']);+ expect(swept(withoutPublishedBetas)).toEqual([]);});test('no inline filter re-narrows the sweep to prereleases', () => {diff --git a/.github/workflows/desktop-release-draft-janitor.yml b/.github/workflows/desktop-release-draft-janitor.ymlindex f1c607544..8bee9c40c 100644--- a/.github/workflows/desktop-release-draft-janitor.yml+++ b/.github/workflows/desktop-release-draft-janitor.yml@@ -17,22 +17,6 @@ name: Draft release janitor# STUCK_DRAFT_MAX_AGE_SECONDS is 10800 (180 min), clearing 110 with margin for# cold caches and build-macos's one retry. An earlier 5400 was derived from# build-macos's 75-minute timeout alone and did not cover the path.-#-# The list is narrowed to drafts plus PUBLISHED STABLES. Stable and beta drafts-# share the stable-cycle ceiling. The narrowing is gh's LOCAL --jq transform of the full paginated-# response: the releases endpoint has no filter parameter, so every release-# still crosses the wire; what is bounded is the payload handed to the module.-# That matters because Published betas are dead weight and this repo has-# hundreds: unnarrowed, the payload measured 90,670 bytes across 915 releases,-# and it crosses execve's per-string MAX_ARG_STRLEN (131,072 on Linux, applying-# to env as well as argv) at roughly 1,300 releases. Narrowed, the same snapshot-# is 16,460 bytes across 175 entries and yields an identical sweep set.-#-# Age is a backstop, not the real protection: an in-flight cycle is kept by the-# cycle gate whatever its age, and age is load-bearing only where a draft's-# cycle EQUALS the just-published stable. It cannot cover an operator re-running-# a days-old stranded build at all; the sweep cap and dry_run are the rails for-# that case.on:schedule:@@ -79,12 +63,12 @@ jobs:run: |set -euo pipefail- RELEASES_JSON=$(gh api "repos/$GITHUB_REPOSITORY/releases?per_page=100" --paginate \- --jq '.[] | select(.draft or (.prerelease | not)) | {tagName: .tag_name, isDraft: .draft, isPrerelease: .prerelease, updatedAt: .updated_at}' \- | jq -sc '.')- export RELEASES_JSON+ releases_file=$(mktemp)+ gh api "repos/$GITHUB_REPOSITORY/releases?per_page=100" --paginate \+ --jq '.[] | {tagName: .tag_name, isDraft: .draft, isPrerelease: .prerelease, updatedAt: .updated_at}' \+ | jq -sc '.' > "${releases_file}"- sweep=$(node .github/scripts/select-stuck-drafts.mjs)+ sweep=$(node .github/scripts/select-stuck-drafts.mjs < "${releases_file}")if [ -z "${sweep}" ]; thenecho "Nothing to sweep."@@ -114,6 +98,6 @@ jobs:printf '%s\n' "${sweep}" | while IFS= read -r tag; do[ -z "${tag}" ] && continuegh release delete "${tag}" --repo "$GITHUB_REPOSITORY" --yes- echo "::notice::Swept stuck draft ${tag}: its cycle is closed. Git tag kept."+ echo "::notice::Swept stuck draft ${tag}: a newer published release supersedes it. Git tag kept."doneecho "Draft-release janitor sweep complete."diff --git a/knip.config.ts b/knip.config.tsindex eb9727af8..e43118957 100644--- a/knip.config.ts+++ b/knip.config.ts@@ -155,15 +155,11 @@ export default {'src/shadow-fixture-launch.test-helper.mjs',],project: 'src/**',- ignoreDependencies: [- '@types/shell-quote',- ],+ ignoreDependencies: ['@types/shell-quote'],},'packages/cli': {entry: ['src/**/*.test.ts', 'scripts/*.ts', 'tests/**/*.ts', 'src/parse-worker.ts'],- ignoreDependencies: [- 'yjs',- ],+ ignoreDependencies: ['yjs'],},'packages/desktop': {entry: [diff --git a/packages/app/tests/integration/bug3-source-mode-writeback.test.ts b/packages/app/tests/integration/bug3-source-mode-writeback.test.tsindex 4549c74b3..a50b00123 100644--- a/packages/app/tests/integration/bug3-source-mode-writeback.test.ts+++ b/packages/app/tests/integration/bug3-source-mode-writeback.test.ts@@ -1,4 +1,3 @@-import { readFileSync } from 'node:fs';import { join } from 'node:path';import { setTimeout as wait } from 'node:timers/promises';diff --git a/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts b/packages/app/tests/integration/indented-jsx-byte-sacred.test.tsindex 4fc2c11f9..6fcdc23f2 100644--- a/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts+++ b/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts@@ -1,4 +1,3 @@-import { setTimeout as wait } from 'node:timers/promises';import { normalizeBridge } from '@inkeep/open-knowledge-core';import { updateYFragment } from '@tiptap/y-tiptap';diff --git a/packages/app/tests/integration/interior-edit-freshness.test.ts b/packages/app/tests/integration/interior-edit-freshness.test.tsindex 9f2f6feb6..40b5cdfd6 100644--- a/packages/app/tests/integration/interior-edit-freshness.test.ts+++ b/packages/app/tests/integration/interior-edit-freshness.test.ts@@ -1,4 +1,3 @@-import { setTimeout as wait } from 'node:timers/promises';import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';import { afterAll, beforeAll, describe, expect, test } from 'vitest';diff --git a/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts b/packages/app/tests/integration/keystroke-cadence-danger-space.test.tsindex 2a085742b..93666af70 100644--- a/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts+++ b/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts@@ -1,4 +1,3 @@-import { setTimeout as wait } from 'node:timers/promises';import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';import { afterAll, beforeAll, describe, expect, test } from 'vitest';diff --git a/packages/app/tests/integration/producer-guard-wiring.test.ts b/packages/app/tests/integration/producer-guard-wiring.test.tsindex 878d5196b..867598d34 100644--- a/packages/app/tests/integration/producer-guard-wiring.test.ts+++ b/packages/app/tests/integration/producer-guard-wiring.test.ts@@ -1,4 +1,3 @@-import { setTimeout as wait } from 'node:timers/promises';import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';import { afterAll, beforeAll, describe, expect, test } from 'vitest';diff --git a/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts b/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.tsindex 4ada3cf26..0970ac12f 100644--- a/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts+++ b/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts@@ -1,4 +1,3 @@-import { randomUUID } from 'node:crypto';import { afterEach, describe, expect, test } from 'vitest';import { agentWriteMd, createTestServer, type TestServer } from './test-harness';diff --git a/packages/app/tests/integration/qa-045-restore-after-gc.test.ts b/packages/app/tests/integration/qa-045-restore-after-gc.test.tsindex cbe2b705f..b632185e1 100644--- a/packages/app/tests/integration/qa-045-restore-after-gc.test.ts+++ b/packages/app/tests/integration/qa-045-restore-after-gc.test.ts@@ -1,4 +1,3 @@-import { execFileSync } from 'node:child_process';import { randomUUID } from 'node:crypto';import { join } from 'node:path';diff --git a/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts b/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.tsindex 89bc9b4d9..c530ce4ba 100644--- a/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts+++ b/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts@@ -1,4 +1,3 @@-import { randomUUID } from 'node:crypto';import { afterAll, afterEach, beforeAll, describe, expect, test } from 'vitest';import type * as Y from 'yjs';diff --git a/packages/app/tests/integration/undo-after-rollback.test.ts b/packages/app/tests/integration/undo-after-rollback.test.tsindex a78aeb0e4..d3767adc9 100644--- a/packages/app/tests/integration/undo-after-rollback.test.ts+++ b/packages/app/tests/integration/undo-after-rollback.test.ts@@ -1,4 +1,3 @@-import { ROLLBACK_ORIGIN } from '@inkeep/open-knowledge-server';import { afterAll, beforeAll, describe, expect, test } from 'vitest';import * as Y from 'yjs';diff --git a/packages/app/tests/integration/undo-recycle-reset.test.ts b/packages/app/tests/integration/undo-recycle-reset.test.tsindex e7cc69c3f..b076f955c 100644--- a/packages/app/tests/integration/undo-recycle-reset.test.ts+++ b/packages/app/tests/integration/undo-recycle-reset.test.ts@@ -1,4 +1,3 @@-import { writeFileSync } from 'node:fs';import { join } from 'node:path';import { setTimeout as wait } from 'node:timers/promises';diff --git a/packages/app/tests/integration/undo-rederive-survival.test.ts b/packages/app/tests/integration/undo-rederive-survival.test.tsindex 9ddcd0730..7935e35f8 100644--- a/packages/app/tests/integration/undo-rederive-survival.test.ts+++ b/packages/app/tests/integration/undo-rederive-survival.test.ts@@ -1,4 +1,3 @@-import { prependFrontmatter } from '@inkeep/open-knowledge-core';import { Plugin, PluginKey } from '@tiptap/pm/state';import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';diff --git a/packages/core/src/bridge/compose.ts b/packages/core/src/bridge/compose.tsindex 2a597ec3d..f4cc8a286 100644--- a/packages/core/src/bridge/compose.ts+++ b/packages/core/src/bridge/compose.ts@@ -1,4 +1,3 @@-import { prependFrontmatter, stripFrontmatter } from '../extensions/frontmatter.ts';export type ComposeAdjustment = 'none' | 'body' | 'frontmatter' | 'unresolved';diff --git a/packages/core/src/bridge/doc-boundary-space.ts b/packages/core/src/bridge/doc-boundary-space.tsindex ffd8fce06..e7e63f43d 100644--- a/packages/core/src/bridge/doc-boundary-space.ts+++ b/packages/core/src/bridge/doc-boundary-space.ts@@ -1,4 +1,3 @@-import { FRONTMATTER_RE, stripFrontmatter } from '../extensions/frontmatter.ts';import { carriedEdgeEmpties, type DocEdgeEmpties } from '../markdown/doc-edge-blank-runs.ts';diff --git a/packages/core/src/markdown/comment-promoter.ts b/packages/core/src/markdown/comment-promoter.tsindex fb0ba5a7c..fc267cbea 100644--- a/packages/core/src/markdown/comment-promoter.ts+++ b/packages/core/src/markdown/comment-promoter.ts@@ -1,4 +1,3 @@-import type { Nodes, Paragraph, PhrasingContent, Root, RootContent, Text } from 'mdast';import { SKIP, visit } from 'unist-util-visit';import type { VFile } from 'vfile';diff --git a/packages/core/src/markdown/merged-walker.ts b/packages/core/src/markdown/merged-walker.tsindex ae8cb390b..861003fb4 100644--- a/packages/core/src/markdown/merged-walker.ts+++ b/packages/core/src/markdown/merged-walker.ts@@ -1,4 +1,3 @@-import type { Nodes, Parent, Root } from 'mdast';import { SKIP, visit } from 'unist-util-visit';import type { VFile } from 'vfile';diff --git a/packages/core/src/markdown/safe-url.ts b/packages/core/src/markdown/safe-url.tsindex 8be632ba4..4d3250d3a 100644--- a/packages/core/src/markdown/safe-url.ts+++ b/packages/core/src/markdown/safe-url.ts@@ -1,4 +1,3 @@-export const SAFE_URL_SCHEMES = ['https', 'http', 'mailto', 'tel', 'ftp', 'sms'] as const;const SCHEME_ALT = SAFE_URL_SCHEMES.map((s) => `${s}:`).join('|');