Skip to content

fix: unblock session writes by skipping full-state validation - #463

Merged
zxch3n merged 2 commits into
mainfrom
fix/session-validation-hotfix
Sep 7, 2026
Merged

zxch3n merged 2 commits into
mainfrom
fix/session-validation-hotfix

Conversation

@zxch3n

@zxch3n zxch3n commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Related issue

Independent availability hotfix; the HistoryWriter work remains deferred in PR #460.

Problem / pressure

Full-state Mirror validation rejects valid local sends when unrelated synchronized history contains an unknown item type or a malformed known item. The writer refactor has broader fork and rollback interactions and should not be an urgent prerequisite.

Summary

Set validateUpdates: false at the two existing session Mirror construction sites (renderer and CLI). No new writer, schema, dependency, storage, copy, rollback, or transport changes. Other Mirrors and explicit external-input parsers retain their existing checks.

Add real-Loro regressions and a production construction-site check. Record the temporary trade-off in a bilingual Agent Note and draft Spec.

Before / after

Before After
Old incompatible history can veto an unrelated valid send. Session Mirror skips whole-state validation; the tested append and text-update paths continue.
Mirror provides an extra runtime check for new local values. That safety net is temporarily absent; this is NOT proof that malformed local writes are impossible.

Test plan

  • Real-Loro enabled/disabled control, live import and snapshot reopening, append and text updates, unchanged old history/container identity, concurrent future-item updates, and unchanged external parser rejection.
  • Shared suite: 92 files / 1037 tests passed; shared typecheck passed.
  • Targeted Prettier, Oxlint (0 errors; existing warnings), docs check, and git diff check passed.
  • Reused local Loro 1.15.1 / Mirror 2.3.1 dependencies. Full pnpm check stopped at missing dependencies in other packages of this isolated worktree; clean-install CI remains required.
  • No deployed desktop/mobile acceptance, disk-failure recovery, or 3000-turn performance acceptance. No merge or release performed.

Context handoff

Instructions for reviewing agents

  • Review focus: Confirm only the two session construction sites bypass validation and existing external parsers are untouched.
  • Decisions to challenge: This explicitly trades a runtime safety net for immediate availability; do not mistake it for changed-input validation.
  • Plausible failures / evidence gaps: Readers may still reject incompatible items, old unpatched clients remain affected, and new malformed local values are no longer caught by Mirror.

Authoring context

  • User goal / directives: Split a minimal hotfix from the larger writer PR and defer the latter for fixes and multi-round independent review.
  • Constraints / non-goals: No HistoryWriter extraction, schema widening, migration, dependency change, merge, or release.
  • Risk-bearing decisions: Disable full-state session update validation while retaining explicit input parsers; there is no new per-field safety boundary in this PR.
  • Destructive or irreversible behavior: No new deletion or rewrite operation; existing initialization and persistence behavior stays unchanged.
  • Deliberately not done or tested: Deployed-client acceptance and the deferred writer review are separate work; full local checks are blocked by isolated-worktree dependency setup.
  • Unknowns / confidence: Real-replica checks establish the tested local write paths, not arbitrary input safety or end-to-end delivery; CI is required before merge consideration.

Keep the HistoryWriter refactor separate from the availability hotfix.

Model: gpt-6
@zxch3n
zxch3n marked this pull request as ready for review September 7, 2026 13:51
@zxch3n
zxch3n merged commit 0de0b0b into main Sep 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant