build error fixes, and test expansion

This commit is contained in:
trueheads
2025-12-16 21:30:53 -06:00
parent f302234b0e
commit bb47f22d6c
4 changed files with 446 additions and 33 deletions

View File

@@ -5,16 +5,7 @@
* Uses a modified Kahn's algorithm that respects both dependencies and priorities.
*/
interface Feature {
id: string;
category: string;
description: string;
steps?: string[];
status: string;
priority?: number;
dependencies?: string[];
[key: string]: unknown;
}
import type { Feature } from "../services/feature-loader.js";
export interface DependencyResolutionResult {
orderedFeatures: Feature[]; // Features in dependency-aware order
@@ -198,7 +189,7 @@ export function areDependenciesSatisfied(
return true; // No dependencies = always ready
}
return feature.dependencies.every(depId => {
return feature.dependencies.every((depId: string) => {
const dep = allFeatures.find(f => f.id === depId);
return dep && (dep.status === 'completed' || dep.status === 'verified');
});
@@ -219,7 +210,7 @@ export function getBlockingDependencies(
return [];
}
return feature.dependencies.filter(depId => {
return feature.dependencies.filter((depId: string) => {
const dep = allFeatures.find(f => f.id === depId);
return dep && dep.status !== 'completed' && dep.status !== 'verified';
});

View File

@@ -21,30 +21,10 @@ import { resolveModelString, DEFAULT_MODELS } from "../lib/model-resolver.js";
import { createAutoModeOptions } from "../lib/sdk-options.js";
import { isAbortError, classifyError } from "../lib/error-handler.js";
import { resolveDependencies, areDependenciesSatisfied } from "../lib/dependency-resolver.js";
import type { Feature } from "./feature-loader.js";
const execAsync = promisify(exec);
interface Feature {
id: string;
category: string;
description: string;
steps?: string[];
status: string;
priority?: number;
dependencies?: string[]; // Feature dependencies
spec?: string;
model?: string; // Model to use for this feature
imagePaths?: Array<
| string
| {
path: string;
filename?: string;
mimeType?: string;
[key: string]: unknown;
}
>;
}
interface RunningFeature {
featureId: string;
projectPath: string;

View File

@@ -13,6 +13,10 @@ export interface Feature {
steps?: string[];
passes?: boolean;
priority?: number;
status?: string;
dependencies?: string[];
spec?: string;
model?: string;
imagePaths?: Array<string | { path: string; [key: string]: unknown }>;
[key: string]: unknown;
}