feat(FN-1569): add mission validation telemetry APIs and UI
- Emit fix-feature mission events and forward validator telemetry through mission execution - Add core and dashboard API types plus a validation telemetry route in mission-routes - Update SSE mission event handling so validation telemetry updates stream reliably to clients - Add telemetry surfaces in MissionManager with corresponding mission-specific UI styling - Expand MissionManager and mission e2e test coverage for validation telemetry flows
This commit is contained in:
@@ -276,6 +276,7 @@ export type {
|
||||
FeatureEventPayload,
|
||||
FeatureDeletedPayload,
|
||||
FeatureLinkedPayload,
|
||||
FixFeatureCreatedPayload,
|
||||
// Validator run types
|
||||
MissionValidatorRun,
|
||||
MissionAssertionFailureRecord,
|
||||
|
||||
@@ -40,6 +40,7 @@ import type {
|
||||
SlicePlanState,
|
||||
MissionContractAssertion,
|
||||
FeatureAssertionLink,
|
||||
FixFeatureCreatedPayload,
|
||||
MilestoneValidationRollup,
|
||||
ContractAssertionCreateInput,
|
||||
ContractAssertionUpdateInput,
|
||||
@@ -122,6 +123,8 @@ export interface MissionStoreEvents {
|
||||
"validator-run:started": [MissionValidatorRun];
|
||||
/** Emitted when a validator run is completed (run, final status, durationMs) */
|
||||
"validator-run:completed": [MissionValidatorRun, ValidatorRunStatus, number];
|
||||
/** Emitted when a generated fix feature is created after failed validation */
|
||||
"fix-feature:created": [FixFeatureCreatedPayload];
|
||||
}
|
||||
|
||||
// ── MissionStore Class ──────────────────────────────────────────────
|
||||
@@ -2177,6 +2180,12 @@ export class MissionStore extends EventEmitter<MissionStoreEvents> {
|
||||
|
||||
this.db.bumpLastModified();
|
||||
this.emit("feature:created", fixFeature);
|
||||
this.emit("fix-feature:created", {
|
||||
feature: fixFeature,
|
||||
sourceFeatureId,
|
||||
runId,
|
||||
failedAssertionIds,
|
||||
});
|
||||
|
||||
return fixFeature;
|
||||
}
|
||||
|
||||
@@ -484,6 +484,18 @@ export interface FeatureLinkedPayload {
|
||||
taskId: string;
|
||||
}
|
||||
|
||||
/** Payload for fix-feature:created event */
|
||||
export interface FixFeatureCreatedPayload {
|
||||
/** The generated fix feature */
|
||||
feature: MissionFeature;
|
||||
/** Source feature ID that failed validation */
|
||||
sourceFeatureId: string;
|
||||
/** Validator run ID that triggered the fix generation */
|
||||
runId: string;
|
||||
/** Assertion IDs that failed and triggered the fix */
|
||||
failedAssertionIds: string[];
|
||||
}
|
||||
|
||||
// ── Contract Assertion Types ────────────────────────────────────────
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user