2.4 KiB
2.4 KiB
⚠️ 历史·过程留档(已归档,2026-10-16):本文为当时记录,不代表现状;现状以
docs/standards/architecture-current-state.md为准,规则见docs/standards/。
v3.9.0 Runtime Recovery and Diagnostics
Scope
v3.9.0 extends the v3.8 runtime boundaries with a pure run-record contract, recovery candidate validation, redacted diagnostic summaries and local metrics. The implementation remains incremental and preserves the existing app.js compatibility entry.
Runtime contracts
runtime-record.js: normalized run states, legal transitions, legacy conversion, interruption marking and diagnostic projection.runtime-recovery.js: parses the existingiwb_web_runningpayload, excludes terminal/cancelled records, validates node/task existence and creates recoverable candidates.runtime-diagnostic-record.js: bounded, non-sensitive diagnostic records with stable error classes.runtime-metrics.js: in-memory aggregate counters and request-duration averages; no user payloads are persisted or uploaded.
Page integration
- Startup recovery continues to use
iwb_web_runningand its existing resume UI. - Old
runningrecords are validated before becoming recoverable candidates. - Cancelled, completed, missing-node and missing-task records no longer trigger recovery prompts.
- Storage health checks execute through
RuntimeBoundary; failures increment a local metric without interrupting page startup. - Diagnostic export includes a safe metrics summary in addition to the existing task, storage, lifecycle and scheduler summaries.
- Persisted run records retain legacy
statusandjobsfields and addruntimeStatefor forward-compatible diagnostics.
Compatibility locks
- LocalStorage keys are unchanged.
- IndexedDB database
iwb_web, physical version3, and storesimages,logs,kvare unchanged. - Existing backup and generation payload/result formats are unchanged.
- Diagnostics exclude API keys, authorization headers, complete prompts, image data, raw request payloads and raw responses.
- Browser-safe IIFE modules and single-file app.js fallback remain supported.
Verification
- Runtime contract tests cover legal transitions, interruption, cancellation exclusion, missing entity validation, redaction and metrics reset.
- Existing unit, integration and Playwright suites remain required release gates.