> **⚠️ 历史·过程留档(已归档,2026-10-16)**:本文为**当时**记录,**不代表现状**;现状以 `docs/standards/architecture-current-state.md` 为准,规则见 `docs/standards/`。 # v3.11.0 Runtime Execution Closure ## Scope v3.11.0 connects the v3.10 runtime contracts to the generation and recovery lifecycle. It adds run correlation, idempotent recovery checks, retry callbacks, and safer diagnostic summaries while preserving the existing browser runtime and persistence formats. ## Runtime context - `runtime-run-context.js` creates a bounded `runId` for each generation run. - The context tracks node/task identity, start and finish times, retry count, and cancellation state. - Generation run records and persisted recovery jobs retain the existing fields and add optional `runId` and `retryCount` values. - Retry callbacks update both the run context and the corresponding persisted job counters. ## Recovery execution - Existing startup recovery continues to read `iwb_web_running`. - Candidates are validated against current nodes and tasks before the recovery prompt is shown. - `runtime-recovery-runner.js` now supports a caller-provided seen set and key function for idempotent execution checks. - Terminal, missing-node, missing-task, duplicate, and cancelled candidates are skipped without starting generation work. ## Diagnostics and metrics - Runtime diagnostic tasks include bounded `runId` and `retryCount` fields. - Existing diagnostics export remains the user-facing entry point and continues to exclude API keys, authorization headers, complete prompts, image data, raw request payloads, and raw responses. - Request metrics continue to count actual network attempts; generation retry metrics are recorded through the retry callback and shared runtime metrics. ## Compatibility locks - LocalStorage keys are unchanged, including `iwb_web_running`. - IndexedDB database `iwb_web`, physical version `3`, and stores `images`, `logs`, and `kv` are unchanged. - Image prefixes, workspace optimistic-lock `rev`, legacy JSON/ZIP backups, DOM selectors/classes, keyboard shortcuts, generation payloads/results, and the single-file `app.js` compatibility entry are unchanged. ## Verification The release gate remains `npm run verify`, covering build output, syntax, runtime contract tests, integration tests, and Playwright stability tests. Deployment requires a formal-domain version check and production smoke test.