Files
image-workbench-desktop/docs/archive/v3.10.0-runtime-execution-and-observability.md
T

3.0 KiB

⚠️ 历史·过程留档(已归档,2026-10-16):本文为当时记录,不代表现状;现状以 docs/standards/architecture-current-state.md 为准,规则见 docs/standards/。

v3.10.0 Runtime Execution and Observability

Scope

v3.10.0 strengthens the runtime execution layer without changing the existing app.js compatibility entry or persisted data contracts. The release adds explicit state conversion, validated recovery execution, request/retry metrics, and bounded diagnostic correlation fields.

Runtime contracts

  • runtime-state-bridge.js converts legacy and current runtime/generation states into stable bridge records. Terminal values are normalized to succeeded and failed where required by the bridge contract.
  • runtime-recovery-runner.js validates recovery candidates against the current node/task collections, excludes terminal records, and returns bounded accepted, skipped, failed, and cancelled results.
  • runtime-fetch.js records metrics for each actual network attempt, including successes, failures, cancellations, timeouts, duration, and retryable HTTP responses.
  • generation-retry.js increments the retry metric before each retry wait. Network-level retries and generation-level retries are observable through the same local metrics object.
  • runtime-metrics.js exposes schema-versioned snapshots with non-negative counters and request-duration averages. Metrics remain in memory and are resettable.
  • runtime-diagnostic-record.js adds bounded runId and retryCount fields while preserving error classification and redaction limits.

Integration boundaries

  • Existing startup recovery and resume flows remain compatible; the new recovery runner is available as a validated execution primitive and does not replace the established UI flow implicitly.
  • Existing request payloads, result handling, cancellation behavior, and retry policy remain unchanged.
  • Diagnostic records contain only bounded summaries. They do not include API keys, authorization headers, complete prompts, image Base64/blob data, raw request payloads, or raw responses.
  • All new modules are browser-safe IIFEs and are copied into dist/src by the existing build pipeline before diagnostic modules.

Compatibility locks

  • LocalStorage keys are unchanged.
  • IndexedDB database iwb_web, physical version 3, and stores images, logs, and kv are unchanged.
  • Image prefixes ref_ and out_, workspace optimistic-lock rev, legacy JSON/ZIP backup formats, DOM selectors/classes, keyboard shortcuts, and generation payload/result formats are unchanged.
  • The single-file app.js fallback remains supported.

Verification

Release validation includes syntax checks, runtime contract tests, the complete unit suite, existing integration tests, and the Playwright smoke suite. Deployment must be followed by a formal-domain version check and production smoke tests for loading, workspace interaction, and generation-related compatibility paths.