test: convert remaining standalone tests to vitest, remove debug logs, fix parser fallback
This commit is contained in:
parent
ba5ecfc050
commit
449d0ca878
4 changed files with 1142 additions and 1177 deletions
|
|
@ -44,7 +44,6 @@ function normalizeVisionMeetingRoute(
|
|||
if (!firstLine) return undefined;
|
||||
const cleaned = firstLine.toLowerCase().replace(/[`*_~]/g, " ");
|
||||
const match = cleaned.match(/\b(planning|researching|discussing)\b/);
|
||||
console.log(`[sf:debug] normalizeVisionMeetingRoute: firstLine="${firstLine}" match="${match?.[1]}"`);
|
||||
return match?.[1] as VisionMeetingRoute | undefined;
|
||||
}
|
||||
|
||||
|
|
@ -159,12 +158,6 @@ export function inspectMilestoneRoadmapMarkdown(
|
|||
issues.push("missing vision alignment meeting");
|
||||
return { issues };
|
||||
}
|
||||
|
||||
const recommendedRoute = normalizeVisionMeetingRoute(extractSubsection(
|
||||
meetingSection,
|
||||
"Recommended Route",
|
||||
));
|
||||
console.log(`[sf:debug] recommendedRoute for current meeting: "${recommendedRoute}"`);
|
||||
const meeting: Partial<VisionAlignmentMeetingRecord> = {
|
||||
trigger: extractSubsection(meetingSection, "Trigger"),
|
||||
pm: extractSubsection(meetingSection, "Product Manager"),
|
||||
|
|
@ -179,14 +172,13 @@ export function inspectMilestoneRoadmapMarkdown(
|
|||
moderator: extractSubsection(meetingSection, "Moderator"),
|
||||
weightedSynthesis: extractSubsection(meetingSection, "Weighted Synthesis"),
|
||||
confidenceByArea: extractSubsection(meetingSection, "Confidence By Area"),
|
||||
recommendedRoute,
|
||||
recommendedRoute: normalizeVisionMeetingRoute(
|
||||
extractSubsection(meetingSection, "Recommended Route"),
|
||||
),
|
||||
};
|
||||
|
||||
const blockingIssue = getVisionAlignmentBlockingIssue(meeting);
|
||||
if (blockingIssue) {
|
||||
console.log(`[sf:debug] blockingIssue: ${blockingIssue}`);
|
||||
issues.push(blockingIssue);
|
||||
}
|
||||
if (blockingIssue) issues.push(blockingIssue);
|
||||
return { issues };
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,9 +76,10 @@ export function parseRoadmap(content: string): Roadmap {
|
|||
|
||||
function _parseRoadmapImpl(content: string): Roadmap {
|
||||
const stopTimer = debugTime("parse-roadmap");
|
||||
// Try native parser first for better performance
|
||||
// Try native parser first for better performance. Fall back to legacy if
|
||||
// native finds zero slices (e.g. table-style roadmaps not yet supported).
|
||||
const nativeResult = nativeParseRoadmap(content);
|
||||
if (nativeResult) {
|
||||
if (nativeResult && nativeResult.slices.length > 0) {
|
||||
stopTimer({
|
||||
native: true,
|
||||
slices: nativeResult.slices.length,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -25,10 +25,7 @@ export default defineConfig({
|
|||
// runner and must be excluded here too to avoid "No test suite found" errors.
|
||||
exclude: [
|
||||
// Standalone script-style tests (no describe/test, custom assertEq)
|
||||
"src/resources/extensions/sf/tests/derive-state-draft.test.ts",
|
||||
"src/resources/extensions/sf/tests/phases-merge-error-stops-auto.test.ts",
|
||||
"src/resources/extensions/sf/tests/tool-call-loop-guard.test.ts",
|
||||
"src/resources/extensions/sf/tests/visualizer-views.test.ts",
|
||||
// (converted to vitest describe/it style)
|
||||
"src/tests/integration/ci_monitor.test.ts",
|
||||
"src/resources/extensions/vectordrive/tests/manager.test.ts",
|
||||
"src/resources/extensions/voice/tests/linux-ready.test.ts",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue