fix(data-integrity): keep controlled value sync atomic - #201
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review Please review exact current head |
Rate Limit Exceeded
|
There was a problem hiding this comment.
Review (head 9fd9a28)
No blocking product defect in the standalone-editor integrity slice. This lane already implements the residual gap called out on #228:
editable/hideToolbaraccept only omitted defaults or exact booleans;"false"throws the payload-redactedRangeErrors before TipTap/accessibility/frame setup.value/defaultValue/formResetValueaccept onlyundefinedor string.- Controlled replacement is parsed once, previewed through current transaction policy, and rolled back on live divergence.
Integration
Base is still historical 50ac98c. Live protected main is e8109ec / the #118 v0.6.0 candidate. Predecessor CI on this head is not current-head evidence. After #118, reconverge non-destructively with the then-live tip and regenerate exact-head gates before any readiness decision.
Keep Draft. This comment is not a qualifying independent approval. Do not open a competing CwlEditor.tsx writer; continue #252/#263 here.
Sent by Cursor Automation: Fix Issues
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
|
Restacked onto current protected Validation at
Controlled replacement remains policy-previewed and atomic; composition defers only the latest host value, and runtime prop type violations fail closed. Browser-only assurance remains owned by Draft #380. @codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Remove the duplicated event-matrix test repair from the controlled-value lane. PR #405 remains the single writer for that shared CI contract. Signed-off-by: Seongho Bae <me@seonghobae.me> Commit-Message-Assisted-by: Claude (via Claude Code)
Preserve the controlled-value preview, rollback, composition and editability guards while inheriting PR #176 and its PR #402 prerequisite through ordinary history. The existing composition regression reproduced a second snapshot after TipTap 3 defaulted setContent to emit updates; use the options object in the shared synchronization helper. The focused policy, composition and editability tests and typecheck pass without weakening assertions. Signed-off-by: Seongho Bae <me@seonghobae.me>
The packed declaration verifier rejected the inherited helper's Editor import from TipTap React. Import the same public Editor type from TipTap core, matching the shared dependency foundation. Preserve the declaration boundary assertion; focused composition/policy/editability checks, build and full package verification pass. Signed-off-by: Seongho Bae <me@seonghobae.me>
Exact-head dependency inheritance verification — 2026-09-05Candidate source The merge keeps this lane's controlled-value preview, rollback, composition deferral and editability guards. Two existing checks first failed after inheriting TipTap 3: the composed-snapshot test received two callbacks instead of one, and the packed-declaration verifier rejected the helper's React-internal type import. The shared helper now uses At this exact final source head:
The net delta against #176 is eight controlled-editor source/test files; no shared workflow, Markdown or dependency delta is re-owned here. #380 remains the browser-only child and must inherit and verify this new parent independently. Keep Draft. Hosted skipped jobs, absent security/review evidence and predecessor checks remain non-passing; no Ready, formal approval, merge, release or bypass is claimed. |
Keep the child delta browser-only while inheriting PR #201 and its #176/#402 prerequisites through ordinary history. The heading, list and table setup assertions first reproduced false edit snapshots from the old TipTap setContent boolean. Use explicit update suppression in the existing fixture; all nine focused cases pass across Chromium, Firefox and WebKit without weakening input or callback oracles. Signed-off-by: Seongho Bae <me@seonghobae.me>
Preserve the four-file forced-colors source/test delta while inheriting #380 and its #201/#176/#402 prerequisites through ordinary history. The existing focus, forced-colors and print stylesheet tests pass. No browser discovery configuration is copied or re-owned here; normal theme rules and the already-merged #362 baseline remain intact. Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Deterministic teardown regression — 2026-09-06Exact candidate The #151 whole-suite run exposed a timing-dependent test-oracle failure: the old assertion queried document text after the editor had been destroyed. Explicitly waiting for destruction reproduced the null-schema error. The test now records the last live document using the existing public destruction callback and then waits for completed teardown; it still requires no late document callback and the original composed text. No runtime lifetime or public callback contract changes. This is not a weakened oracle: temporarily removing only the existing inactive-component guard made the repaired test fail with Fresh final-head verification:
The initial browser command was corrected to the existing browser-test package. An initial successful run without head metadata was retained separately and is not substituted for the final head-bound receipt. RED/negative-control logs and final receipts are preserved; no forced reset or test weakening was used. #380 and #151 must inherit this source-owner regression through ordinary parent-first merges and rerun their own final-head checks. This is not a protected merge, published package, installed-tarball browser result, physical-device/OS-IME proof or central approval. Keep Draft and apply all live governance before integration. |


Closes #200.
Closes #252.
Closes #263.
Closes #267.
Closes #271.
Scope
Draft standalone
CwlEditorintegrity lane. This remains the active Inkspan source writer forsrc/components/CwlEditor.tsx; stacked browser assurance remains in Draft #380.Dependency stack
This source-owner PR inherits the shared dependency foundation from #402 through the Markdown owner #176 by ordinary merge history. Its base is the #176 branch
fix/public-markdown-resource-options-175; #380 remains its browser-only child. The net delta against #176 remains standalone controlled-editor semantics and their regression tests. The merge preserves the local preview/rollback and composition lifecycle instead of replacing them with a direct document swap. The helper uses TipTap 3's explicit update-suppression options and public core Editor type; existing behavior and packed-declaration checks reproduced both migration regressions before repair.Behavior contracts
editableand toolbar visibility inputs fail closed on invalid runtime types;valuereceived during composition is deferred and the latest host value is applied after composition ends;onChangevalue stream but are excluded from strongonDocumentChangesnapshot callbacks until composition is no longer active.Composition lifecycle tracking is installed synchronously from TipTap
onCreateonto the created editor view's DOM before the publiconReadycallback runs, and is removed during TipTaponDestroy. This keeps lifecycle ownership on TipTap creation/destruction rather than a callback-sensitive React effect while making the immediate-post-ready composition boundary executable.These are standalone editor/document semantics only. This PR adds no transport, authentication, tenancy, durable persistence, credentials, migrations, retention, deployment, durable audit, model/provider, network, durable PDF, or host-owned Yjs authority.
Verification discipline
The realistic composition regression is
src/components/CwlEditor.controlledValueComposition.test.tsx; it exercises a composition that starts immediately after editor readiness, performs an intermediate document change, and requires the strong snapshot callback to remain silent until composition ends. Do not weaken or replace that regression to obtain a green run.Do not embed mutable PR-head SHAs, protected-main SHAs, workflow run IDs, review counts, mergeability snapshots, or child-stack heads in this body as durable truth. Before any lifecycle action, independently refetch:
mainand this PR's exact current head/live base;Pending, queued, skipped-required, cancelled, absent, neutral, failed, stale, predecessor, status-only, synthetic-source, wrong-checkout, model-only, or otherwise vacuous evidence is non-passing. Repository CI success is technical evidence only and does not substitute for qualifying independent approval or correct central security/review workflows.
Ownership / governance boundary
Keep this PR Draft until its behavior and exact-current evidence satisfy then-live governance. Draft #380 owns browser harness/spec/config evidence only and must not re-own this PR's production source. Central reusable workflow defects belong to their existing
.githubowner paths, not to an Inkspan-local workaround.Do not mark Ready, merge, tag, publish, transfer predecessor evidence, self-approve, weaken gates, create a competing source/workflow writer, force-push/destructively rebase, or fabricate release identity. Protected shipped truth remains whatever exact
mainresolves to at decision time; #118 remains the canonical stable-release operational-acceptance boundary.