Skip to content

fix: harden continuation, bridge, pending state and doctor - #84

Merged
HarryHeYu merged 5 commits into
mainfrom
r20-reliability-hardening
Nov 28, 2026
Merged

HarryHeYu merged 5 commits into
mainfrom
r20-reliability-hardening

Conversation

@HarryHeYu

@HarryHeYu HarryHeYu commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

R20 reliability hardening for issues confirmed in the current round. This PR contains four logical fix commits and one CI regression follow-up, each with focused regression tests.

Confirmed findings fixed

  • C5 — pending attach consumption is now atomic (thread_attach + pending_mark in one BEGIN IMMEDIATE transaction). A crash can no longer leave an open pending row attached to an already-attached session.
  • I1 — explicit user constraints survive tight continuation budgets when --goal is supplied. A short, capped copy is placed in the highest-priority ## Goal section.
  • Q1 — bridge search rejects non-string and NUL-containing queries before SQLite/FTS access; the JSON-lines handler catches unexpected per-request exceptions so one bad request cannot kill the long-lived process.
  • M1/M2/M3 — doctor now runs a read-only schema preflight before opening Store(path). Missing tables, missing columns, and orphan events are reported as canonical issues without silent migration, destructive repair, or a false healthy report.

Verification provided here

  • Direct R20 regression harness: 7/7 PASS after the CI regression fix.
  • git diff --check: PASS.
  • Regression tests use in-memory or shared-memory SQLite, synthetic paths/events, and no network, credentials, real HOME, or real DB.
  • Local full suite is not claimed: the sandbox produced SIGTERM / SQLite write interception. GitHub Actions is the full-suite authority for this PR.
  • First CI run exposed one production regression in the M1/M2/M3 preflight: a missing index was treated as structural damage and suppressed the normal doctor report. The fifth commit fixes that narrow case, and adds a focused regression test. No unrelated scope was changed.

Not included

The following confirmed or suspected findings remain intentionally out of scope:

  • CLI --json error contract
  • read-only / locked DB traceback
  • bridge large-request head-of-line blocking
  • same-holder concurrent continue / switch
  • path normalization (dot segments, symlinks, Unicode normalization)
  • remaining provider robustness gaps

Schema

  • Store schema: unchanged
  • Bridge schema: unchanged
  • public JSON compatibility: unchanged unless explicitly demonstrated otherwise
  • no migration

Release

  • no tag
  • no release
  • patch release decision deferred

Copilot AI balanced review requested due to automatic review settings November 28, 2026 15:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@HarryHeYu
HarryHeYu merged commit 4ab86bd into main Nov 28, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants