From f0a13745b2be247f95fa7ae64c2f9206cb100abe Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Fri, 31 Jul 2026 13:09:55 -0700 Subject: [PATCH] =?UTF-8?q?fix(test):=20lazy-views=20doc=20parser=20stops?= =?UTF-8?q?=20at=20any=20heading=20=E2=80=94=20six=20phantom=20views=20cam?= =?UTF-8?q?e=20from=20the=20H2=20that=20follows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- .../app/__tests__/lazy-loaded-views-docs.test.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/dashboard/app/__tests__/lazy-loaded-views-docs.test.ts b/packages/dashboard/app/__tests__/lazy-loaded-views-docs.test.ts index 0124499331..3a8b77c8ce 100644 --- a/packages/dashboard/app/__tests__/lazy-loaded-views-docs.test.ts +++ b/packages/dashboard/app/__tests__/lazy-loaded-views-docs.test.ts @@ -134,7 +134,14 @@ const EXPECTED_CURATED_LAZY_SOURCES = [ ] as const; function extractLazyLoadedSection(agentsDoc: string): string { - const match = agentsDoc.match(/### Lazy-Loaded Heavy Views[\s\S]*?(?=\n### |\n---|$)/); + /* + FNXC:LazyViewDocs 2026-07-31-21:40: + Stop at ANY next heading, not only H3. The section after the inventory is the H2 `## FNXC_LOG + comments:`, so a lookahead of only `\n### ` ran the parse window into it — and when that section + gained a bullet with backticked tokens (`date -u`, `pnpm lint`, ...), this test reported six + phantom "views" and went red on every shard while the inventory itself was perfectly in sync. + */ + const match = agentsDoc.match(/### Lazy-Loaded Heavy Views[\s\S]*?(?=\n#{1,6} |\n---|$)/); if (!match) { throw new Error("Lazy-Loaded Heavy Views section not found in AGENTS.md"); }