openpencil/crates
Kayshen-X cd465f9899 fix(web): keep credential sync reset ahead of repaint wiring in mount
Task 7 reordered mount_ck so the daemon-dependent
web_credential_sync::start() runs only after the postMessage bridge
init gate. But start() bundled two things: a pure state reset
(*self = default) and a daemon policy fetch. Moving the whole call past
the gate also moved the reset past repaint_coalescer::install, so an
early repaint (e.g. during the 2s await_init in an iframe) could queue a
credential change via credential_changed() that the later reset silently
wiped — the pre-existing invariant guarded by
canvaskit_repaint_persists_local_settings_and_syncs_only_credential_changes.

Split the two phases: add web_credential_sync::reset() (pure state
clear, no daemon request) called BEFORE the first repaint and the rAF
coalescer install, and keep start() (now begin_policy_check only, the
daemon fetch) after the bridge gate. Both invariants hold: the reset
precedes repaint wiring, and no daemon request fires before the gate.
The daemon behavior is unchanged in the normal flow (reset() then
begin_policy_check equals the old start()), and strictly better in the
race edge — a change queued between reset and start is now preserved
instead of wiped.

Test updated to assert the reset (not the now-daemon-facing start)
precedes install; the semantic invariant it protects is unchanged and
is now expressed against the actual code order. start()'s ordering after
the gate stays covered by
canvaskit_mount_queues_an_initial_snapshot_only_when_local_credentials_exist.
2026-07-17 02:00:02 +08:00
..
op-acp
op-ai feat(agent): unify generation UX and CLI providers 2026-07-15 03:48:29 +08:00
op-ai-skills fix(orchestrator): preserve and repair progress rings 2026-07-15 03:29:39 +08:00
op-cli fix(ci): clear Rust workflow blockers 2026-07-15 22:47:39 +08:00
op-codegen test: decouple document fixtures from product releases 2026-07-15 21:17:20 +08:00
op-config-store
op-design-lint fix(orchestrator): preserve and repair progress rings 2026-07-15 03:29:39 +08:00
op-editor-core feat(editor): sync gate state machine and bridge protocol codec 2026-07-16 23:13:34 +08:00
op-editor-host-core fix(ci): clear Rust workflow blockers 2026-07-15 22:47:39 +08:00
op-editor-ui fix(canvas): align generating label icon with text 2026-07-16 21:19:58 +08:00
op-figma perf(figma): cut import clone amplification 2026-07-11 10:04:41 +08:00
op-git
op-host-desktop feat(web): managed serve-web contract with handshake and parent-death lease 2026-07-16 23:28:08 +08:00
op-host-native test: decouple document fixtures from product releases 2026-07-15 21:17:20 +08:00
op-host-services feat(web): postMessage bridge with token bootstrap and conflict resolution 2026-07-17 01:06:14 +08:00
op-host-web fix(web): keep credential sync reset ahead of repaint wiring in mount 2026-07-17 02:00:02 +08:00
op-host-web-server feat(web): managed serve-web contract with handshake and parent-death lease 2026-07-16 23:28:08 +08:00
op-i18n feat(agent): unify generation UX and CLI providers 2026-07-15 03:48:29 +08:00
op-mcp fix(mcp): harden batch design and image semantics 2026-07-14 00:29:59 +08:00
op-opmerge
op-orchestrator fix(orchestrator): center resolved radial content 2026-07-15 23:49:58 +08:00
op-pen-loader test: decouple document fixtures from product releases 2026-07-15 21:17:20 +08:00
op-process-io
op-rpc-transport
op-smoke chore(smoke): audit rubric and loop-vs-orchestrator A/B harness 2026-07-12 02:56:43 +08:00
op-web-sdk perf(sdk): share scene via rc and idle the raf pump when clean 2026-07-10 22:56:25 +08:00
CLAUDE.md fix(orchestrator): preserve and repair progress rings 2026-07-15 03:29:39 +08:00