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:
morluto
2026-08-10 14:57:44 +08:00
committed by GitHub
co-authored by Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent 344b9b6dff
commit e91c8c39c2
302 changed files with 6822 additions and 5781 deletions
+95 -37
View File
@@ -22,60 +22,107 @@ export interface ElectronWebPreference {
readonly value: ElectronStaticValue;
}
/** A statically resolved BrowserWindow preload declaration, or its absence. */
export type ElectronBrowserWindowPreload =
| {
readonly preload_path: string;
readonly preload_resolution_context: JavaScriptStaticPathContext;
}
| {
readonly preload_path: null;
readonly preload_resolution_context: null;
};
/** Statically visible BrowserWindow construction and preference surface. */
export interface ElectronBrowserWindowFinding {
export type ElectronBrowserWindowFinding = ElectronBrowserWindowPreload & {
readonly options_status: "object-literal" | "dynamic" | "missing";
readonly web_preferences_status: "object-literal" | "dynamic" | "missing";
readonly web_preferences: readonly ElectronWebPreference[];
readonly omitted_web_preferences: number;
readonly preload_path: string | null;
readonly preload_resolution_context: JavaScriptStaticPathContext | null;
readonly module_key: string | null;
readonly location: JavaScriptSourceRange;
}
};
/** Literal, dynamic, or unsupported contextBridge API key syntax. */
export type ElectronContextBridgeApiKey =
| { readonly api_key: string; readonly api_key_expression: null }
| { readonly api_key: null; readonly api_key_expression: string }
| { readonly api_key: null; readonly api_key_expression: null };
/** One contextBridge API declaration without executing its API object. */
export interface ElectronContextBridgeFinding {
export type ElectronContextBridgeFinding = ElectronContextBridgeApiKey & {
readonly world: "main" | "isolated";
readonly world_id: ElectronStaticValue | null;
readonly api_key: string | null;
readonly api_key_expression: string | null;
readonly api_status: "object-literal" | "dynamic" | "missing";
readonly members: readonly string[];
readonly unknown_members: number;
readonly omitted_members: number;
readonly module_key: string | null;
readonly location: JavaScriptSourceRange;
}
};
/** One statically visible Electron IPC send, invocation, listener, or handler. */
export interface ElectronIpcFinding {
readonly side: "renderer" | "main";
readonly operation:
| "send"
| "send-sync"
| "invoke"
| "post-message"
| "send-to-host"
| "on"
| "once"
| "handle"
| "handle-once";
readonly mode: "send" | "invoke" | "listen" | "handle";
readonly channel: string | null;
readonly channel_expression: string | null;
readonly handler_kind:
| "inline-function"
| "identifier"
| "member-expression"
| "dynamic-expression"
| "missing"
| null;
readonly handler_location: JavaScriptSourceRange | null;
/** Electron IPC operation identity and its semantic communication mode. */
export type ElectronIpcDescriptor =
| {
readonly side: "renderer";
readonly operation:
| "send"
| "send-sync"
| "post-message"
| "send-to-host";
readonly mode: "send";
}
| {
readonly side: "renderer";
readonly operation: "invoke";
readonly mode: "invoke";
}
| {
readonly side: "renderer" | "main";
readonly operation: "on" | "once";
readonly mode: "listen";
}
| {
readonly side: "main";
readonly operation: "handle" | "handle-once";
readonly mode: "handle";
};
type ElectronIpcHandler =
| {
readonly mode: "send" | "invoke";
readonly handler_kind: null;
readonly handler_location: null;
}
| {
readonly mode: "listen" | "handle";
readonly handler_kind: "missing";
readonly handler_location: null;
}
| {
readonly mode: "listen" | "handle";
readonly handler_kind:
| "inline-function"
| "identifier"
| "member-expression"
| "dynamic-expression";
readonly handler_location: JavaScriptSourceRange;
};
interface ElectronIpcFindingContext {
readonly module_key: string | null;
readonly location: JavaScriptSourceRange;
}
/** One statically visible Electron IPC send, invocation, listener, or handler. */
export type ElectronIpcFinding = ElectronIpcDescriptor &
ElectronIpcHandler &
ElectronIpcFindingContext &
(
| { readonly channel: string; readonly channel_expression: null }
| { readonly channel: null; readonly channel_expression: string }
);
/** Static check involving an IPC sender, frame, process, URL, or origin. */
export interface ElectronSenderValidationFinding {
readonly subject:
@@ -92,16 +139,27 @@ export interface ElectronSenderValidationFinding {
readonly location: JavaScriptSourceRange;
}
/** One utilityProcess.fork declaration and its statically visible entrypoint. */
export interface ElectronUtilityProcessFinding {
readonly module_path: string | null;
readonly module_resolution_context: JavaScriptStaticPathContext | null;
readonly module_expression: string | null;
interface ElectronUtilityProcessFindingState {
readonly service_name: string | null;
readonly module_key: string | null;
readonly location: JavaScriptSourceRange;
}
/** One utilityProcess.fork declaration and its statically visible entrypoint. */
export type ElectronUtilityProcessFinding = ElectronUtilityProcessFindingState &
(
| {
readonly module_path: string;
readonly module_resolution_context: JavaScriptStaticPathContext;
readonly module_expression: null;
}
| {
readonly module_path: null;
readonly module_resolution_context: null;
readonly module_expression: string;
}
);
/** JavaScript-side binding or re-export requested from one native .node addon. */
export interface ElectronNativeAddonBindingFinding {
readonly specifier: string;