Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

Run OK stress e2e specs by Playwright discovery, not a hand-kept list (#5937)

Dimitri POSTOLOVbd4582ef2e64
diff --git a/packages/app/package.json b/packages/app/package.json
index 8c6457acd..4652af45a 100644
--- a/packages/app/package.json
+++ b/packages/app/package.json
@@ -41,7 +41,7 @@
"measure:stress": "bash scripts/measure-stress.sh",
"measure:sweep": "bash scripts/measure-sweep.sh",
"perf:compare": "bash scripts/perf-compare.sh",
- "test:e2e": "playwright test tests/stress/empty-bullet-before-link.e2e.ts tests/stress/list-item-drag.e2e.ts tests/stress/ux-interactions.e2e.ts tests/stress/file-tree-create.e2e.ts tests/stress/file-tree-drag-to-root.e2e.ts tests/stress/file-tree-deselect-to-root.e2e.ts tests/stress/file-tree-collapse-spaced-folder.e2e.ts tests/stress/sidebar-file-list-fills.e2e.ts tests/stress/file-tree-sticky-collapse.e2e.ts tests/stress/file-tree-collapse-persistence.e2e.ts tests/stress/file-tree-fractional-zoom.e2e.ts tests/stress/create-then-rename-editable.e2e.ts tests/stress/find-replace.e2e.ts tests/stress/external-link-cue.e2e.ts tests/stress/editor-tabs.e2e.ts tests/stress/crdt-stress.e2e.ts tests/stress/slash-command.e2e.ts tests/stress/paste-fidelity.e2e.ts tests/stress/fr-7a-disconnect-source-mode.e2e.ts tests/stress/docs-open.e2e.ts tests/stress/frozen-table-headers.e2e.ts tests/stress/asset-embed.e2e.ts tests/stress/asset-embed-advanced.e2e.ts tests/stress/asset-click-dispatch.e2e.ts tests/stress/handoff.e2e.ts tests/stress/multi-agent-presence.e2e.ts tests/stress/editor-mode-persistence.e2e.ts tests/stress/lint-config-toggle.e2e.ts tests/stress/plugin-enable-notice.e2e.ts tests/stress/schema-edit-fields-view.e2e.ts tests/stress/header-search-pill.e2e.ts tests/stress/navigation-history.e2e.ts tests/stress/command-palette-semantic.e2e.ts tests/stress/agent-activity-panel.e2e.ts tests/stress/drop-pipeline-auto-open.e2e.ts tests/stress/command-palette-flicker.e2e.ts tests/stress/cm6-list-hanging-indent.e2e.ts tests/stress/ng7-rapid-nav-coherence.e2e.ts tests/stress/reveal-on-activate.e2e.ts tests/stress/selection-indicator.e2e.ts tests/stress/new-file-cross-doc-bleed.e2e.ts tests/stress/new-item-shortcut-fast-path.e2e.ts tests/stress/editor-mode-flip-cross-doc-bleed.e2e.ts tests/stress/editor-area-viewport-resize.e2e.ts tests/stress/qa-sidebar-responsive.e2e.ts tests/stress/prd-6955-reassertion-repro.e2e.ts tests/stress/prd-6955-reassertion-wedge.e2e.ts tests/stress/prd-6914-repro.e2e.ts tests/stress/showall-lazy-tree.e2e.ts tests/stress/tabs-component-strip.e2e.ts tests/stress/source-find-scroll.e2e.ts tests/stress/harness-app-warmth.e2e.ts tests/stress/qa-canary-authoring-both-modes.e2e.ts tests/stress/qa-canary-live-typing.e2e.ts tests/stress/keystroke-cadence-danger-space.e2e.ts tests/stress/jsx-unregistered-backspace-delete.e2e.ts tests/stress/jsx-unregistered-ime-concurrent.e2e.ts tests/stress/jsx-backspace-delete.e2e.ts tests/stress/link-authoring-bytes.e2e.ts tests/stress/link-authoring-apex.e2e.ts tests/stress/qa019-suffix-precedence.e2e.ts tests/stress/command-palette-parity.e2e.ts tests/stress/settings-search.e2e.ts tests/stress/settings-close-button.e2e.ts tests/stress/okf-generated-index-settings.e2e.ts tests/stress/okf-recommended-skill-install.e2e.ts tests/stress/chip-popover-positioning.e2e.ts tests/stress/docs-open-scroll-restore.e2e.ts tests/stress/file-tree-decoration-chip-strip-repro.e2e.ts tests/stress/grip-click-nodeselect.e2e.ts tests/stress/jsx-halo-semantics.e2e.ts tests/stress/jsx-image-body-click.e2e.ts tests/stress/jsx-prop-panel-placeholder.e2e.ts tests/stress/jsx-range-encompass-halo.e2e.ts tests/stress/jsx-wildcard-convert.e2e.ts tests/stress/markdown-lint.e2e.ts tests/stress/frontmatter-schema-badge.e2e.ts tests/stress/frontmatter-glob-picker.e2e.ts tests/stress/unified-problems.e2e.ts tests/stress/mid-type-recovery.e2e.ts tests/stress/observer-a-multi-client.e2e.ts tests/stress/outline-toolbar-occlusion.e2e.ts tests/stress/selection-surface-pane-clip.e2e.ts tests/stress/quiet-tree-hidden-doc.e2e.ts tests/stress/raw-mdx-fallback-onblur-upgrade.e2e.ts tests/stress/rename-noext-probe.e2e.ts tests/stress/show-ok-folders.e2e.ts tests/stress/source-polish.e2e.ts tests/stress/warm-skeleton-scroll-restore.e2e.ts tests/stress/props-toggle-scroll-preserve.e2e.ts tests/stress/yjs-no-dual-import.e2e.ts tests/stress/graph-panel-surfaces.e2e.ts tests/stress/asset-embed-real-fidelity.e2e.ts tests/stress/image-invalid-placeholder.e2e.ts tests/stress/local-target-audit.e2e.ts tests/stress/rename-content-preservation.e2e.ts tests/stress/rename-consolidation.e2e.ts tests/stress/outline-active-heading.e2e.ts tests/stress/outline-navigation.e2e.ts tests/stress/prd-7627-default-swatch.e2e.ts tests/stress/clipboard-dollar-math-source-fallback.e2e.ts tests/stress/source-mode-undo-keymap.e2e.ts tests/stress/source-undo-mode-flip.e2e.ts tests/stress/timeline-recovered-restore.e2e.ts tests/stress/blank-line-preservation.e2e.ts tests/stress/nested-component-sibling-edit-bytes.e2e.ts tests/stress/landing-helpers.e2e.ts tests/stress/agent-follow-scroll.e2e.ts tests/stress/mode-switch-landing.e2e.ts tests/stress/mode-switch-ordinal-divergence.e2e.ts tests/stress/comment-annotation-visibility.e2e.ts tests/stress/comment-opens-in-panel.e2e.ts tests/stress/qa-miles-edge-blanks.e2e.ts tests/stress/prop-upload.e2e.ts tests/stress/slash-command-auto-open.e2e.ts tests/stress/clipboard-relative-url-source-fallback.e2e.ts tests/stress/editor-split-view.e2e.ts tests/stress/language-load-failure.e2e.ts tests/stress/language-first-paint.e2e.ts tests/stress/user-text-direction.e2e.ts tests/stress/pseudolocale.e2e.ts tests/stress/language-picker.e2e.ts tests/stress/zh-hans-coverage-sweep.e2e.ts tests/stress/preview-tab-promotion.e2e.ts tests/stress/cv-paint-lock-click.e2e.ts tests/stress/cv-auto-paint-lock-click.e2e.ts tests/stress/harness-port-ownership.e2e.ts tests/stress/server-reuse-admission.e2e.ts tests/stress/server-reuse-reset.e2e.ts tests/stress/prebuilt-dev-serving.e2e.ts tests/stress/history-traversal-preview-tab.e2e.ts tests/stress/tab-close-scroll-restore.e2e.ts tests/stress/skills-sidebar-open.e2e.ts tests/stress/trailing-affordance.e2e.ts tests/stress/text-doc-composer-inset.e2e.ts tests/stress/composer-control-alignment.e2e.ts tests/stress/agents-settings-accessible-names.e2e.ts tests/stress/composer-growth-eof-reveal.e2e.ts tests/stress/theme-fade.e2e.ts tests/stress/theme-color-conversion.e2e.ts tests/stress/composer-open-caret-reveal.e2e.ts tests/stress/spellcheck-browser-absence.e2e.ts tests/stress/agents-panel-reload-visibility.e2e.ts tests/stress/hidden-chat-activity.e2e.ts tests/stress/rail-flex-distribution-law.e2e.ts tests/stress/editor-card-side-panel-width.e2e.ts tests/stress/editor-card-file-list-drag.e2e.ts tests/stress/editor-pane-cards.e2e.ts tests/stress/audit-409-console-record.e2e.ts tests/stress/pagelist-refresh-lifetime.e2e.ts tests/stress/app-header-layout.e2e.ts tests/stress/app-header-locales.e2e.ts tests/stress/app-header-fit.e2e.ts tests/stress/header-pane-buttons.e2e.ts tests/stress/editor-pane-button.e2e.ts tests/stress/list-keymap.e2e.ts tests/stress/okignore-settings.e2e.ts tests/stress/chat-shortcut-collapsed-thread.e2e.ts tests/stress/chat-explicit-hide-late-restore.e2e.ts tests/stress/information-cover-retention.e2e.ts tests/stress/information-cover-doc-panel-host.e2e.ts tests/stress/responsive-cycles-release-editor-callback-contexts.e2e.ts tests/stress/constrained-sidebar-request-routes.e2e.ts tests/stress/editor-group-switch-immediate-selection.e2e.ts tests/stress/corner-stack-feedback.e2e.ts tests/stress/corner-stack-notices.e2e.ts tests/stress/corner-stack-layouts.e2e.ts tests/stress/corner-stack-survival.e2e.ts tests/stress/corner-stack-geometry.e2e.ts tests/stress/corner-stack-layering.e2e.ts tests/stress/corner-stack-surface.e2e.ts tests/stress/corner-stack-already-seen.e2e.ts tests/stress/assertion-timeout.e2e.ts tests/stress/loop-markers.e2e.ts tests/stress/template-admission-detail.e2e.ts",
+ "test:e2e": "playwright test",
"test:e2e:install-browsers": "playwright install chromium webkit firefox",
"test:perf": "vitest run tests/stress/component-blocks.perf.test.ts",
"test:a11y": "playwright test --config playwright.a11y.config.ts",
diff --git a/packages/app/playwright.config.ts b/packages/app/playwright.config.ts
index 17c82f573..9ef584992 100644
--- a/packages/app/playwright.config.ts
+++ b/packages/app/playwright.config.ts
@@ -75,6 +75,7 @@ export const EXPECT_TIMEOUT_MS = 15_000;
export default defineConfig({
testDir: './tests/stress',
testMatch: /.*\.e2e\.ts$/,
+ testIgnore: ['**/frontmatter-edit.e2e.ts'],
globalSetup: [
'./tests/stress/_helpers/i18n-catalog-freshness.ts',
// Build the per-run Vite optimizer seed cache once, before any worker
diff --git a/packages/app/tests/meta/e2e-ci-membership.test.ts b/packages/app/tests/meta/e2e-ci-membership.test.ts
index e5d55aef8..78fa490c0 100644
--- a/packages/app/tests/meta/e2e-ci-membership.test.ts
+++ b/packages/app/tests/meta/e2e-ci-membership.test.ts
@@ -1,15 +1,13 @@
import { readdirSync, readFileSync } from 'node:fs';
-import { join } from 'node:path';
+import { join, matchesGlob } from 'node:path';
import { describe, expect, test } from 'vitest';
import { isTestOnlySourceFile } from '../../../../test-support/test-only-source-file.mjs';
+import playwrightConfig from '../../playwright.config';
import { E2E_CI_EXCLUSIONS } from '../stress/e2e-ci-ledger';
const APP_ROOT = join(import.meta.dirname, '..', '..');
const STRESS_DIR = join(APP_ROOT, 'tests', 'stress');
const PKG_JSON_PATH = join(APP_ROOT, 'package.json');
-const LEDGER_HINT =
- 'add the file to the test:e2e script in packages/app/package.json (runs in CI) ' +
- 'OR add a ledger entry with reason + evidence in packages/app/tests/stress/e2e-ci-ledger.ts';
function listStressE2eFiles(): string[] {
return readdirSync(STRESS_DIR)
@@ -17,108 +15,54 @@ function listStressE2eFiles(): string[] {
.sort();
}
-function nestedE2ePaths(relPaths: readonly string[]): string[] {
- return relPaths
- .filter((p) => isTestOnlySourceFile(p, 'playwright') && /[/\\]/.test(p))
- .map((p) => p.replace(/\\/g, '/'))
- .sort();
-}
-
-function parseEnumeratedFiles(script: string): string[] {
+function specFilterTokens(script: string): string[] {
return script
.split(/\s+/)
- .filter(
- (token) => token.startsWith('tests/stress/') && isTestOnlySourceFile(token, 'playwright'),
- )
- .map((token) => token.slice('tests/stress/'.length));
+ .filter((token) => isTestOnlySourceFile(token, 'playwright') || token.startsWith('tests/'));
}
-interface MembershipViolations {
- unlisted: string[];
- dual: string[];
- staleLedger: string[];
- staleEnumeration: string[];
+function ignoredFiles(onDisk: readonly string[], patterns: readonly string[]): string[] {
+ return onDisk.filter((file) =>
+ patterns.some((pattern) => matchesGlob(`tests/stress/${file}`, pattern)),
+ );
}
-function computeMembershipViolations(
- onDisk: readonly string[],
- enumerated: readonly string[],
- ledgered: readonly string[],
-): MembershipViolations {
- const diskSet = new Set(onDisk);
- const enumSet = new Set(enumerated);
- const ledgerSet = new Set(ledgered);
- return {
- unlisted: onDisk.filter((f) => !enumSet.has(f) && !ledgerSet.has(f)),
- dual: onDisk.filter((f) => enumSet.has(f) && ledgerSet.has(f)),
- staleLedger: ledgered.filter((f) => !diskSet.has(f)),
- staleEnumeration: enumerated.filter((f) => !diskSet.has(f)),
- };
-}
-
-function loadRealSets(): { onDisk: string[]; enumerated: string[]; ledgered: string[] } {
- const pkg = JSON.parse(readFileSync(PKG_JSON_PATH, 'utf-8')) as {
- scripts?: Record<string, string>;
- };
- const script = pkg.scripts?.['test:e2e'] ?? '';
- return {
- onDisk: listStressE2eFiles(),
- enumerated: parseEnumeratedFiles(script),
- ledgered: E2E_CI_EXCLUSIONS.map((entry) => entry.file),
- };
+function testIgnorePatterns(): string[] {
+ const { testIgnore } = playwrightConfig;
+ if (testIgnore === undefined) return [];
+ const patterns = Array.isArray(testIgnore) ? testIgnore : [testIgnore];
+ return patterns.map((pattern) => {
+ if (typeof pattern !== 'string') {
+ throw new Error(`testIgnore must hold glob strings, one per ledger entry, got ${pattern}`);
+ }
+ return pattern;
+ });
}
describe('test:e2e membership meta-guard', () => {
- test('the guard has inputs (sanity: stress files exist, enumeration parses)', () => {
- const { onDisk, enumerated } = loadRealSets();
- expect(onDisk.length).toBeGreaterThan(0);
- expect(enumerated.length).toBeGreaterThan(0);
- const nested = nestedE2ePaths(readdirSync(STRESS_DIR, { recursive: true }));
- expect(nested).toEqual([]);
- });
-
- test('every tests/stress/*.e2e.ts is in the test:e2e enumeration or the exclusion ledger', () => {
- const { onDisk, enumerated, ledgered } = loadRealSets();
- const { unlisted } = computeMembershipViolations(onDisk, enumerated, ledgered);
- expect(
- unlisted,
- `CI-invisible stress e2e file(s) — ${LEDGER_HINT}:\n${unlisted
- .map((f) => ` tests/stress/${f}`)
- .join('\n')}`,
- ).toEqual([]);
- });
-
- test('no file is in BOTH the test:e2e enumeration and the exclusion ledger', () => {
- const { onDisk, enumerated, ledgered } = loadRealSets();
- const { dual } = computeMembershipViolations(onDisk, enumerated, ledgered);
+ test('the test:e2e script names no spec files, so Playwright discovery decides membership', () => {
+ const pkg = JSON.parse(readFileSync(PKG_JSON_PATH, 'utf-8')) as {
+ scripts?: Record<string, string>;
+ };
+ const script = pkg.scripts?.['test:e2e'] ?? '';
+ expect(script).toMatch(/^playwright test/);
expect(
- dual,
- `File(s) present in both the test:e2e enumeration and the ledger — a promoted file must have its ledger entry deleted:\n${dual
- .map((f) => ` tests/stress/${f}`)
- .join('\n')}`,
+ specFilterTokens(script),
+ 'test:e2e must not list spec files: Playwright file arguments are filters, so a new spec ' +
+ 'would silently miss CI. Exclude a spec through packages/app/tests/stress/e2e-ci-ledger.ts.',
).toEqual([]);
});
- test('every ledger entry points at a file that still exists', () => {
- const { onDisk, enumerated, ledgered } = loadRealSets();
- const { staleLedger } = computeMembershipViolations(onDisk, enumerated, ledgered);
- expect(
- staleLedger,
- `Stale ledger entr(ies) — the file no longer exists; delete the entry from e2e-ci-ledger.ts:\n${staleLedger
- .map((f) => ` ${f}`)
- .join('\n')}`,
- ).toEqual([]);
- });
-
- test('every enumerated test:e2e file still exists', () => {
- const { onDisk, enumerated, ledgered } = loadRealSets();
- const { staleEnumeration } = computeMembershipViolations(onDisk, enumerated, ledgered);
+ test('playwright.config.ts ignores exactly the ledgered stress files', () => {
+ const onDisk = listStressE2eFiles();
+ expect(onDisk.length).toBeGreaterThan(0);
+ const ledgered = E2E_CI_EXCLUSIONS.map((entry) => entry.file).sort();
expect(
- staleEnumeration,
- `Stale test:e2e entr(ies) — the file no longer exists on disk. Playwright file args are filters, so a stale entry silently matches nothing; remove it from the script:\n${staleEnumeration
- .map((f) => ` tests/stress/${f}`)
- .join('\n')}`,
- ).toEqual([]);
+ ignoredFiles(onDisk, testIgnorePatterns()),
+ 'testIgnore in packages/app/playwright.config.ts must skip exactly the files in ' +
+ 'packages/app/tests/stress/e2e-ci-ledger.ts. Add or remove a glob together with its ledger ' +
+ 'entry; if a ledgered file is gone from tests/stress, delete both.',
+ ).toEqual(ledgered);
});
test('ledger entries are unique and carry non-empty reason + evidence', () => {
@@ -133,43 +77,18 @@ describe('test:e2e membership meta-guard', () => {
expect(problems, `Ledger hygiene violation(s):\n${problems.join('\n')}`).toEqual([]);
});
- test('membership predicate fires on planted violations and not on adjacent negatives', () => {
- const clean = computeMembershipViolations(
- ['a.e2e.ts', 'b.e2e.ts', 'c.e2e.ts'],
- ['a.e2e.ts', 'b.e2e.ts'],
- ['c.e2e.ts'],
- );
- expect(clean.unlisted).toEqual([]);
- expect(clean.dual).toEqual([]);
- expect(clean.staleLedger).toEqual([]);
- expect(clean.staleEnumeration).toEqual([]);
-
- const unlisted = computeMembershipViolations(['a.e2e.ts', 'd.e2e.ts'], ['a.e2e.ts'], []);
- expect(unlisted.unlisted).toEqual(['d.e2e.ts']);
-
- const dual = computeMembershipViolations(['a.e2e.ts'], ['a.e2e.ts'], ['a.e2e.ts']);
- expect(dual.dual).toEqual(['a.e2e.ts']);
- expect(dual.unlisted).toEqual([]);
-
- const staleLedger = computeMembershipViolations(['a.e2e.ts'], ['a.e2e.ts'], ['gone.e2e.ts']);
- expect(staleLedger.staleLedger).toEqual(['gone.e2e.ts']);
-
- const staleEnum = computeMembershipViolations(['a.e2e.ts'], ['a.e2e.ts', 'gone.e2e.ts'], []);
- expect(staleEnum.staleEnumeration).toEqual(['gone.e2e.ts']);
- });
-
- test('parseEnumeratedFiles reads only tests/stress e2e tokens from the script', () => {
- const parsed = parseEnumeratedFiles(
- 'playwright test tests/stress/a.e2e.ts tests/visual/v.e2e.ts tests/stress/b.e2e.ts --grep foo',
- );
- expect(parsed).toEqual(['a.e2e.ts', 'b.e2e.ts']);
+ test('specFilterTokens flags spec paths and ignores flags', () => {
+ expect(specFilterTokens('playwright test')).toEqual([]);
+ expect(specFilterTokens('playwright test --workers=2 --grep foo')).toEqual([]);
+ expect(
+ specFilterTokens('playwright test tests/stress/a.e2e.ts b.e2e.ts tests/stress/ --retries=0'),
+ ).toEqual(['tests/stress/a.e2e.ts', 'b.e2e.ts', 'tests/stress/']);
});
- test('nestedE2ePaths flags subdirectory e2e files and ignores top-level + non-e2e', () => {
- expect(
- nestedE2ePaths(['a.e2e.ts', '_helpers/b.e2e.ts', 'fixtures/data.json', 'c.e2e.ts']),
- ).toEqual(['_helpers/b.e2e.ts']);
- expect(nestedE2ePaths(['_fixtures\\d.e2e.ts'])).toEqual(['_fixtures/d.e2e.ts']);
- expect(nestedE2ePaths(['a.e2e.ts', 'b.e2e.ts'])).toEqual([]);
+ test('ignoredFiles matches a ledger glob against its own on-disk file only', () => {
+ const patterns = ['**/a.e2e.ts'];
+ expect(ignoredFiles(['a.e2e.ts', 'b.e2e.ts', 'aa.e2e.ts'], patterns)).toEqual(['a.e2e.ts']);
+ expect(ignoredFiles(['b.e2e.ts'], patterns)).toEqual([]);
+ expect(ignoredFiles(['a.e2e.ts'], [])).toEqual([]);
});
});
diff --git a/packages/app/tests/meta/link-audit-seams-coverage.test.ts b/packages/app/tests/meta/link-audit-seams-coverage.test.ts
index 791b4f52f..714339511 100644
--- a/packages/app/tests/meta/link-audit-seams-coverage.test.ts
+++ b/packages/app/tests/meta/link-audit-seams-coverage.test.ts
@@ -1,6 +1,8 @@
import { existsSync, readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
import { describe, expect, test } from 'vitest';
+import { isTestOnlySourceFile } from '../../../../test-support/test-only-source-file.mjs';
+import { E2E_CI_EXCLUSIONS } from '../stress/e2e-ci-ledger';
import {
LINK_AUDIT_COMPOSITION_ROOTS,
LINK_AUDIT_SEAMS,
@@ -9,6 +11,10 @@ import {
} from './link-audit-seams.manifest.ts';
const workspaceRoot = fileURLToPath(new URL('../../../../', import.meta.url));
+const BLOCKING_E2E_DIR = 'packages/app/tests/stress/';
+const CI_EXCLUDED_E2E = new Set(
+ E2E_CI_EXCLUSIONS.map((entry) => `${BLOCKING_E2E_DIR}${entry.file}`),
+);
interface ValidationDeps {
exists(path: string): boolean;
@@ -19,6 +25,7 @@ function validateLinkAuditSubstrate(
seams: readonly LinkAuditSeam[],
roots: readonly LinkAuditCompositionRoot[],
deps: ValidationDeps,
+ ciExcluded: ReadonlySet<string> = CI_EXCLUDED_E2E,
): string[] {
const violations: string[] = [];
const ids = new Set<string>();
@@ -35,15 +42,15 @@ function validateLinkAuditSubstrate(
}
}
- const packageJson = deps.read('packages/app/package.json');
for (const testPath of new Set(
seams.flatMap((seam) =>
seam.tests.filter((entry) => entry.tier === 'browser-e2e').map((entry) => entry.path),
),
)) {
- const appRelative = testPath.replace(/^packages\/app\//, '');
- if (!packageJson.includes(appRelative)) {
- violations.push(`browser E2E is not in the blocking app test:e2e script: ${testPath}`);
+ const collected =
+ testPath.startsWith(BLOCKING_E2E_DIR) && isTestOnlySourceFile(testPath, 'playwright');
+ if (!collected || ciExcluded.has(testPath)) {
+ violations.push(`browser E2E is not in the blocking app test:e2e run: ${testPath}`);
}
}
@@ -87,6 +94,32 @@ describe('local-target link-audit seam substrate', () => {
]);
});
+ test('the checker flags a browser E2E that the blocking run does not collect', () => {
+ const ledgered = `${BLOCKING_E2E_DIR}ledgered.e2e.ts`;
+ const seamWith = (path: string): LinkAuditSeam => ({
+ id: 'planted',
+ priority: 'P1',
+ owner: 'test',
+ failureClass: 'test',
+ modules: [],
+ tests: [{ path, tier: 'browser-e2e' }],
+ requiredTiers: ['browser-e2e'],
+ });
+ const deps = { exists: () => true, read: () => '' };
+ const violationsFor = (path: string) =>
+ validateLinkAuditSubstrate([seamWith(path)], [], deps, new Set([ledgered]));
+ expect(violationsFor(`${BLOCKING_E2E_DIR}local-target-audit.e2e.ts`)).toEqual([]);
+ for (const path of [
+ `${BLOCKING_E2E_DIR}_helpers/fixtures.ts`,
+ ledgered,
+ 'packages/app/tests/a11y/x.e2e.ts',
+ ]) {
+ expect(violationsFor(path)).toEqual([
+ `browser E2E is not in the blocking app test:e2e run: ${path}`,
+ ]);
+ }
+ });
+
test('the checker distinguishes missing real wiring from an adjacent masking path', () => {
const [root] = LINK_AUDIT_COMPOSITION_ROOTS.filter((entry) => entry.maskingText !== undefined);
expect(root).toBeDefined();
diff --git a/packages/app/tests/stress/e2e-ci-ledger.ts b/packages/app/tests/stress/e2e-ci-ledger.ts
index 06911beb2..7ec75c11e 100644
--- a/packages/app/tests/stress/e2e-ci-ledger.ts
+++ b/packages/app/tests/stress/e2e-ci-ledger.ts
@@ -18,7 +18,7 @@ export const E2E_CI_EXCLUSIONS: readonly E2eCiLedgerEntry[] = [
until: '2026-12-11',
reason:
'needs-fixture: FR6 (duplicate-key marker) and FR9 (malformed-YAML banner) seed malformed frontmatter through /api/agent-write-md, which now by design refuses to introduce malformed frontmatter (400 urn:ok:error:frontmatter-malformed). They need a disk-write fixture that loads a pre-malformed doc from the inheritor path — M effort, not in this PR. (The other former failures — the virtual "tags" placeholder row and the banner copy — are stale selectors that a repair would fix in the same pass.)',
- exit: 'Add a disk-write fixture that loads a pre-malformed document from the inheritor path, return frontmatter-edit.e2e.ts to the test:e2e script in packages/app/package.json, and delete this entry.',
+ exit: 'Add a disk-write fixture that loads a pre-malformed document from the inheritor path, remove its glob from testIgnore in packages/app/playwright.config.ts, and delete this entry.',
evidence:
'agent-write-md returns 400 for a duplicate-title / ": : : invalid" frontmatter body; the duplicate-marker and yaml-error-banner surfaces still exist in src (FrontmatterRow / PropertyPanel), so the suite is repairable once the fixture lands',
},