31 lines
1.7 KiB
Markdown
31 lines
1.7 KiB
Markdown
> **⚠️ 历史·过程留档(已归档,2026-10-16)**:本文为**当时**记录,**不代表现状**;现状以 `docs/standards/architecture-current-state.md` 为准,规则见 `docs/standards/`。
|
|
|
|
# v3.8.0 Runtime Boundaries
|
|
|
|
## Scope
|
|
|
|
v3.8.0 continues the conservative runtime migration from v3.7.0. It adds explicit request, cross-tab channel and local fault-isolation boundaries without changing the storage schema, backup formats, DOM contract or generation payload shape.
|
|
|
|
## New boundaries
|
|
|
|
- `runtime-fetch.js`: timeout, cancellation, HTTP classification and bounded retry primitives.
|
|
- `runtime-channel.js`: BroadcastChannel creation, listener ownership, close and diagnostics snapshot.
|
|
- `runtime-boundary.js`: synchronous/asynchronous best-effort isolation with reporting hooks.
|
|
|
|
All modules are browser-safe IIFE globals and retain `app.js` as the compatibility owner. The build loads them before `app.js`.
|
|
|
|
## Compatibility locks
|
|
|
|
- LocalStorage keys and IndexedDB database/version/stores are unchanged.
|
|
- Existing generation records, result fields, backup formats and request payloads are unchanged.
|
|
- Diagnostics never include keys, authorization headers, complete prompts, images or raw payloads.
|
|
- Unsupported browser APIs degrade to the existing fallback behavior.
|
|
|
|
## Migration order
|
|
|
|
1. Test pure boundary modules in VM sandboxes.
|
|
2. Use the request primitive for low-risk network paths while retaining `wFetch` behavior.
|
|
3. Replace module-level BroadcastChannel ownership with effect-scoped cleanup.
|
|
4. Apply the boundary helper only to optional UI/diagnostic operations.
|
|
5. Unify scheduler/recovery semantics after request and lifecycle tests are stable.
|