5.2 KiB
⚠️ 历史·过程留档(已归档,2026-10-16):本文为当时记录,不代表现状;现状以
docs/standards/architecture-current-state.md为准,规则见docs/standards/。
⚠️ 历史/时效说明(2026-10-15 复核):本文档是历史快照(保护分支
optimize/baseline、基线 commit9402bd2、当时线上v3.0.0-o131),不要当作现状。当前事实以docs/standards/architecture-current-state.md为准。 已知过期点:① 「all errors receive the same one-retry/2-second behavior」与「GEN_TIMEOUT_MSis passed to api() but not enforced」已过期 —— 现行已有软超时(不 abort,避免重复计费)+ 硬超时(GEN_HARD_TIMEOUT_MS)+ 槽位兜底,且非幂等请求不自动重试(见规范 §13.11);② 图片引用形态、门禁基线(本文档 325/5 一类数字)均已变化。正文按历史记录原样保留。
Project boundary
- This work applies only to the
image-workbench-webproject. - The separate local app project
image-workbench-appis out of scope. - Do not modify, stop, start, test, commit, or deploy the app project as part of this work.
- Port
8787currently belongs toimage-workbench-app; do not use it for Web previews. - The current Web preview is
http://localhost:8788, served from the Web project directory and verified against the current localapp.jsandstyle.csshashes.
Repository state
- Protected branch:
optimize/baseline - Base commit:
9402bd28cf14f7695ff56f3af949e9ab1229a362 - GitHub
main: same commit - Cloudflare production deployment: same commit
- Local feature changes are intentionally preserved and not deployed.
Production
- Project:
image-workbench-web - Production branch:
main - Domains:
https://iwb.maqiart.eu.org,https://image-workbench-web.pages.dev - Latest known deployment:
9458b0d3 - Deployment type: static Pages deployment, no Functions
- Online version marker:
v3.0.0-o131
Local pending changes
app.js: local feature and reliability updatesstyle.css: matching UI updatespackage.jsonandpackage-lock.json: test harness files currently untrackednode_modules/: ignored; never commit
Notable local updates include unified node geometry, command palette, copy/paste, auto-layout locking, connection validation hints, serialized saves, and prompt-library state mirroring.
Verification baseline
-
macOS:
26.5.2, Apple Siliconarm64. -
Homebrew Node is installed at
/opt/homebrew/bin:- Node
v22.22.1 - npm
11.12.1 - npx
11.12.1
- Node
-
The QwenPaw shell PATH omits
/opt/homebrew/bin; tests must run withexport PATH="/opt/homebrew/bin:$PATH"until the shell environment is corrected. -
git diff --check: passed. -
Existing jsdom test baseline before fixture corrections:
325 passed / 5 failed. -
After correcting test fixtures (unique mock image URLs, multipart request recording, generated-image URL assertion):
326 passed / 4 failed. -
Corrected fixture issues:
- Gallery preview now receives distinct mock URLs, so next-image navigation is testable.
- Multipart image-generation requests are recorded instead of being invisible to the test.
- Generated output URL is accepted by the ordering assertion.
-
Remaining checks to classify:
- Space + drag canvas pan — user-confirmed normal in the real browser; treat the jsdom failure as an environment/test limitation.
- Combined-task generation completion state — parallel generation is intentional; results are expected to appear as each request completes, so the test must not assume sequential/all-at-once completion.
- Combined-task reference forwarding assertion — the reference image is expected to be forwarded; current multipart mock cannot inspect the actual Blob contents and needs a test-specific observable assertion.
- Output-node preview left/right navigation buttons.
-
Product behavior confirmed by user: combined tasks run in parallel and display completed images immediately; this is correct behavior.
-
No Cloudflare deployment or GitHub push has been performed during this preparation.
-
Implemented shared global request slots and synchronous duplicate-run protection in the Web
app.js. -
Current cap remains
GEN_CONCURRENCY = 4; service-provider unlimited concurrency does not imply browser-side unlimited fan-out. -
node --check app.jsandnode --check tests/iwb-v32-web-test.js: passed. -
Existing jsdom test after implementation:
326 passed / 4 known behavior/test-assumption differences; no new failures. -
Local Web preview:
http://localhost:8788. -
No GitHub push or Cloudflare deployment performed.
-
Main audit conclusion: per-node parallel generation and first-completed-first-displayed behavior are correct; highest-risk gaps are duplicate overlapping runs and the lack of a shared global concurrency cap across multiple generator nodes.
-
Audit also found that
GEN_TIMEOUT_MSis passed toapi()but not enforced by the current Web fetch path, and all errors currently receive the same one-retry/2-second behavior.
Investigate the remaining four checks. Separate jsdom event/timing assumptions from actual canvas, combined-task, and output-preview behavior before changing business logic.