2.4 KiB
⚠️ 历史·过程留档(已归档,2026-10-16):本文为当时记录,不代表现状;现状以
docs/standards/architecture-current-state.md为准,规则见docs/standards/。
v3.12.0 Architecture Split
Goal
v3.12.0 begins the gradual decomposition of the app.js compatibility runtime. The release introduces independent runtime, generation, canvas, and workspace boundaries without changing the existing UI, persistence formats, request payloads, or single-file entry.
New boundaries
runtime-execution-context.js: owns a generation execution identity, AbortController, timers, jobs, retries, terminal state, diagnostics, and disposal.generation-service.js: provides an injected generation scheduling boundary. It normalizes results, creates entries, and exposes retry-aware execution without touching React or the DOM.generation-controller.js: coordinates service execution and runtime contexts while preserving a controller-level compatibility API.canvas-domain.js: provides node, edge, group, snapshot, delete, and restore operations around the existing Canvas Store.workspace-service.js: provides serialized workspace reads and coalesced writes around the existing API or storage adapter.
Compatibility integration
- Existing
runNoderemains the compatibility entry point. - The current generation flow now registers its AbortController and progress timer with the new execution context and disposes the context in the existing finalization path.
- Existing
refs.runningRuns,refs.runAborters,refs.genRuns, LocalStorage keys, IndexedDB version/stores, workspacerev, backup formats, DOM selectors, keyboard shortcuts, and generation request/result shapes remain unchanged. - New services are loaded by the build pipeline and tested independently before broader migration.
Migration strategy
The split is adapter-first. New modules do not replace the full legacy flow in one step. Each boundary is independently tested, then gradually connected to the compatibility wrapper. This keeps rollback possible to the v3.11.0 implementation while reducing the amount of business logic that must remain in app.js.
Verification
The release gate remains npm run verify, including module contract tests, existing integration tests, and Playwright stability tests. Deployment requires a formal-domain version check and production smoke test.