Skip to content

fix(backend): improve reliability and expand regression coverage - #1217

Merged
qwqcode merged 87 commits into
masterfrom
codex/backend-flow-tests
Nov 16, 2026
Merged

qwqcode merged 87 commits into
masterfrom
codex/backend-flow-tests

Conversation

@qwqcode

@qwqcode qwqcode commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Failed writes, legacy migrations, and imports can leave inconsistent records or hidden replies. This PR fixes these cases and adds regression tests for the main backend workflows.

Main changes:

  • Preserve page IDs, votes, deleted records, and reply links during migrations and imports.
  • Keep account data transfers in one transaction and clear only affected comment caches.
  • Save approvals and notification state together. Send email after the transaction commits.
  • Keep page updates, replies, and exports within their site. Prevent failed database writes from changing cached data.
  • Handle concurrent email queue shutdown and stalled delivery. Report sendmail and AliDM failures correctly.
  • Parse proposed YAML before saving it. Report OAuth session storage failures instead of continuing login.

Tests also cover authentication, moderation, uploads, votes, statistics, administration, and CLI commands. They use existing fixtures and local services.

Existing configuration aliases and request formats, including null values, remain supported. The changes add no public API fields, configuration fields, database columns, or dependencies.

Validation:

  • The full Go suite passes with shuffled test order. Aggregate statement coverage is 90.2% (5,126 / 5,684 statements).
  • go vet ./... passes. Selected race tests and handler regression tests pass in three repeated runs.
  • PostgreSQL 17, MySQL 8.4, and SQL Server 2022 migration and API compatibility tests pass in CI.
  • The production build passes all 12 Chromium and WebKit smoke tests.

Coverage command: CGO_ENABLED=0 go test -shuffle=on -count=1 -coverpkg=./... -coverprofile=coverage.out ./...

@qwqcode qwqcode changed the title Add more backend flow tests fix(backend): preserve data on failed writes and migrations Nov 15, 2026
@qwqcode
qwqcode force-pushed the codex/backend-flow-tests branch from 27cc3f2 to 0f2f2ac Compare November 15, 2026 03:27
@qwqcode qwqcode changed the title fix(backend): preserve data on failed writes and migrations fix(backend): improve reliability and expand regression coverage Nov 16, 2026
@qwqcode
qwqcode merged commit 0647084 into master Nov 16, 2026
14 checks passed
@qwqcode
qwqcode deleted the codex/backend-flow-tests branch November 16, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant