refactor(test): colocate pure-domain tests and reduce test debt (#471)
* refactor(test): colocate pure-domain tests and reduce test debt Move focused immutable domain/contracts/adapter tests from tests/composition/** beside their production owners under src/** as colocated *.test.ts/*.fixture.ts, and relocate persistence-shaped composition tests under tests/boundary/filesystem/**. Update import paths, the Vitest project topology (shared worker context for pure domain/contracts and recording-port service projects), the test migration ledger, testing docs, and AGENTS.md to match. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * docs: remove test migration ledger The cutover is complete and the ledger is no longer referenced anywhere in source, scripts, or the docs gate. Drop the standalone artifact. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * docs: clean up stale migration artifacts Remove empty directories left by the test migration and replace the "final cutover" language in docs/testing.md with standing PR guidance that no longer references the completed migration. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix: repair CI failures from schema, knip, and stale generated artifacts Three root causes fixed: 1. catalog-schemas.mjs: valuesAt only traversed anyOf from Zod's toJSONSchema, not oneOf. The webScreenshotDiffSchema change to a discriminated union produces oneOf, so the product catalog generator could not derive the web_screenshot_diff schema version. Add oneOf traversal. 2. conformancePackage.ts: the test rewrite removed the only imports of ScenarioManifest, ReplayPlan, ShimPlan, and ExpectedEvidence, making them unused exports that knip flags. Remove the dead type aliases. 3. Regenerate stale artifacts (product catalog, MCP tool catalog, skill metadata, conformance manifest) that drifted from the source changes. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
344b9b6dff
commit
e91c8c39c2
@@ -19,18 +19,30 @@ export type ProcessReactiveOutcome =
|
||||
| "cancelled"
|
||||
| "cleanup_failed";
|
||||
|
||||
/** One deterministic scenario transition suitable for later Evidence projection. */
|
||||
export interface ProcessReactiveTransitionRecord {
|
||||
/** Lifecycle state shared by the reducer snapshot and its durable projection. */
|
||||
export type ProcessReactiveStatus =
|
||||
| { readonly status: "running"; readonly outcome: null }
|
||||
| {
|
||||
readonly status: "finished";
|
||||
readonly outcome: ProcessReactiveOutcome;
|
||||
};
|
||||
|
||||
interface ProcessReactiveTransitionState {
|
||||
readonly sequence: number;
|
||||
readonly transition_id: string;
|
||||
readonly state_before: string;
|
||||
readonly state_after: string | null;
|
||||
readonly outcome: ProcessReactiveOutcome | null;
|
||||
readonly trigger_event_ids: readonly string[];
|
||||
readonly action_event_ids: readonly string[];
|
||||
readonly action_types: readonly ProcessReactiveAction["type"][];
|
||||
}
|
||||
|
||||
/** One deterministic scenario transition suitable for later Evidence projection. */
|
||||
export type ProcessReactiveTransitionRecord = ProcessReactiveTransitionState &
|
||||
(
|
||||
| { readonly state_after: string; readonly outcome: null }
|
||||
| { readonly state_after: null; readonly outcome: "passed" }
|
||||
);
|
||||
|
||||
interface Counter {
|
||||
readonly id: string;
|
||||
readonly count: number;
|
||||
@@ -42,10 +54,7 @@ interface ReactiveCheckpoint {
|
||||
readonly capture_order: number;
|
||||
}
|
||||
|
||||
/** Immutable reducer state owned by one validated reactive scenario run. */
|
||||
export interface ProcessReactiveSnapshot {
|
||||
readonly status: "running" | "finished";
|
||||
readonly outcome: ProcessReactiveOutcome | null;
|
||||
interface ProcessReactiveSnapshotState {
|
||||
readonly active_state: string;
|
||||
readonly state_entry_capture_order: number;
|
||||
readonly observations: readonly ProcessObservation[];
|
||||
@@ -56,6 +65,10 @@ export interface ProcessReactiveSnapshot {
|
||||
readonly transitions: readonly ProcessReactiveTransitionRecord[];
|
||||
}
|
||||
|
||||
/** Immutable reducer state owned by one validated reactive scenario run. */
|
||||
export type ProcessReactiveSnapshot = ProcessReactiveSnapshotState &
|
||||
ProcessReactiveStatus;
|
||||
|
||||
/** External fact offered to the pure reducer. */
|
||||
export type ProcessReactiveInput =
|
||||
| { readonly kind: "observation"; readonly observation: ProcessObservation }
|
||||
|
||||
Reference in New Issue
Block a user