Skip to content

test(db): align PostgreSQL smoke fixtures with current schema - #1468

Draft
seonghobae wants to merge 6 commits into
codex/search-trigram-storage-ownerfrom
fix/postgres-smoke-read-state
Draft

test(db): align PostgreSQL smoke fixtures with current schema#1468
seonghobae wants to merge 6 commits into
codex/search-trigram-storage-ownerfrom
fix/postgres-smoke-read-state

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Current search-owner propagation receipt (2026-09-05)

Head 53ce38ed6683d01a9d113069f5ac5a8f17e133a2, tree 723d9f4b4d503cf19b67d473a8d5398b7b0dd114, normally merges prior head 037b58adeda53e6c847f8949494b9b518a94dac9 with #1572 cd8ff413d4ed8a5f2855c47a21a31db5661cd487. The PR is retargeted to the search owner, preserving both histories and the unique bootstrap assertion. Its only parent-relative files are CHANGELOG and the existing bootstrap test; the release note no longer claims that conditional legacy index handling was removed.

Exact dependency sync, fresh and repeat migration to 0020_search_trigram_storage, and 131 tests with -W error pass, 0 failed/skipped, in 44.26 seconds. Ruff and diff checks pass. Local artifacts: /private/tmp/naruon-search-index-rca.VRmUrq/prop1468_tests.xml and prop1468_migration.log; isolated resources were removed by the exact-project exit trap. These are local receipts, not hosted/protected/released evidence.

Keep Draft: #1572 retains the representative search p95 and migration-cost acceptance gates, and exact-head required Checks/independent review remain necessary. CodeRabbit/Devin metadata alone is not qualifying approval. Earlier receipts below retain historical scope only; they do not describe this new head.


What changed

  • Preserve the regression guard against unconditional legacy emails index DDL.
    The inherited fix: create workspace_entities/workspace_documents registry and provision Workspace rows #1503 owner creates a structured legacy index only if that table exists;
    email_records remains the canonical model.
  • Make PostgreSQL smoke fixtures provide the non-null email_records.is_read
    state explicitly, matching the current migration/model contract.
  • Add a regression assertion and an Unreleased changelog entry.

This is a small prerequisite for the current PDF DOM upload follow-up (#1427):
it restores the full backend smoke gate without mixing unrelated product code
into that PR.

Historical verification (before the current owner restack)

  • ruff check backend/scripts/bootstrap_db.py backend/tests/test_bootstrap_db.py backend/tests/test_data_api.py
  • git diff --check
  • PYTHONWARNINGS=error python -m pytest backend/tests -q
    (1833 passed, 2 skipped)
  • Focused bootstrap/data smoke tests (2 passed)

Risk and rollback

The current unique delta is a four-line bootstrap guard and a four-line changelog
entry. Production migration repair is inherited from #1503 and must follow its
retained-data rollback policy; do not revert inherited prerequisites as if they
were disposable fixture changes.


Open in Devin Review

Current owner-restack receipt — 2026-09-05

  • Exact head: 037b58adeda53e6c847f8949494b9b518a94dac9; direct base: fix/workspace-document-registry-migration@19d5860bc27e860acba940390f5792721cd99e5e.
  • A normal merge preserves both the prior head 603914596cb379a5be25c33f0990404d08054ffc and the full direct-parent delta; no force push or predecessor closure.
  • In a task-owned environment after uv sync --locked, a fresh isolated PostgreSQL 16.15 database migrated through 0019_email_read_state_repair using uv run --frozen python scripts/migrate_db.py.
  • From backend/: uv run --frozen python -m pytest -q -W error -ra --tb=short tests/test_alembic_migrations.py tests/test_bootstrap_db.py tests/test_data_api.py tests/test_email_read_state_migration_postgres.py tests/test_legacy_document_scope_postgres.py tests/test_workspace_document_migration.py tests/test_container_dependency_pin_contract.py75 passed, 0 failed, 0 skipped. These are local migrated-PostgreSQL/source tests, not protected-merge, deployed, or external-owner release evidence.
  • Ruff on the changed Python files and git diff --check passed in that integration run.
  • Keep Draft. A subsequent feat(data): add bounded tenant provenance portability #1497 combined-schema run found a separate whole-document GiST capacity defect (1 failed / 288 passed), now being repaired in the Naruon search-schema prerequisite lane. Do not shrink that input or claim this receipt resolves it. Current-head hosted checks and qualifying independent reviews still need verification before landing.

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae enabled auto-merge (squash) August 25, 2026 12:38

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

PR governance metadata gate is not ready for 9012b10d3d3b5ac9bfab5d57780cbbfce4fbf2cc:

  • Required check strix is FAILURE on the current head.

@seonghobae

Copy link
Copy Markdown
Contributor Author

The current-head strix failure is infrastructure-only: the job log records NVIDIA NIM HTTP 429 on all primary retries, then the fallback emitted provider warning/error evidence and direct OpenAI returned HTTP 404. No authoritative clean Strix report was produced. This is not a source failure in the bootstrap/test fixture diff; the PR remains on the protected normal path pending hosted gates and independent approval.

@seonghobae

seonghobae commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Maintainer exact-head validation

  • Repository: ContextualWisdomLab/naruon
  • Pull request: test(db): align PostgreSQL smoke fixtures with current schema #1468
  • Exact head SHA: 1da167de26b442be6961622f15bb36ae9374e6c4
  • Exact base SHA: e5e99b4e3bb081b92c602358878856536030e2ca
  • Local validation: the exact-head PostgreSQL smoke regression passed in the dedicated PR worktree; Ruff and git diff --check passed.
  • Hosted evidence: the current exact-head check rollup has no failed or pending check runs.
  • Current exact-head approvals: 0; the protected ruleset requires two qualifying approvals.
  • Current unresolved review threads: 0.
  • Decision: WAIT_AND_REMEDIATE for independent approvals; continue through the protected review/check path with no bypass or direct protected-branch write.

@opencode-agent
opencode-agent Bot disabled auto-merge August 31, 2026 06:44
@seonghobae
seonghobae changed the base branch from develop to codex/starlette-testclient-dependency September 5, 2026 04:12
@seonghobae
seonghobae marked this pull request as draft September 5, 2026 04:12
@seonghobae

Copy link
Copy Markdown
Contributor Author

현재 head 603914596cb379a5be25c33f0990404d08054ffc은 최신 develop과 TestClient prerequisite #1565 (52dfc863d1a5d6e4e80b6366f719dd09f2aa6172)를 비강제 merge했고 base를 그 parent branch로 retarget했습니다. CHANGELOG 충돌은 PostgreSQL fixture 수리와 prerequisite 기록을 모두 보존했습니다. effective child delta는 기존 4개 파일이며, bootstrap/data/pin 테스트 43개 통과·PostgreSQL 서비스 의존 2개 skip, Ruff·diff 통과입니다. #1565 보호 병합 전에는 Draft를 유지합니다.

Merge #1503 normally as the prerequisite to #1468, preserving the unique bootstrap regression assertion and changelog. The owner already carries the is_read fixture delta. Verified merged tree 00e170c with fresh Alembic upgrade and 75 clean-lock strict PostgreSQL tests, Ruff, and diff checks. No delta is discarded or protected merge claimed.

Co-Authored-By: Codex <noreply@openai.com>
Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae
seonghobae changed the base branch from codex/starlette-testclient-dependency to fix/workspace-document-registry-migration September 5, 2026 07:08
seonghobae added a commit that referenced this pull request Sep 5, 2026
Non-force merge of updated #1468, retaining the PDF upload contract and Proposed ADR. Merged tree e0717d3 passes fresh Alembic upgrade, 76 clean-lock strict PostgreSQL/dependency tests, Ruff, and diff checks. Owner service release and hosted review/Checks remain separate prerequisites; no 64 MiB sidecar runtime or protected merge is claimed.

Co-Authored-By: Codex <noreply@openai.com>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Preserve the unique no-unconditional-legacy-index assertion and both owner histories.

Correct the historical-only canonical-index release claim; conditional legacy handling remains inherited from #1503.

Exact dependency sync, fresh and repeat migration 0020, and 131 strict PostgreSQL tests pass.

Search and migration performance remain Draft acceptance gates in #1572; no protected completion is claimed.

Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae
seonghobae changed the base branch from fix/workspace-document-registry-migration to codex/search-trigram-storage-owner September 5, 2026 08:07
seonghobae added a commit that referenced this pull request Sep 5, 2026
Normally merge #1468 while preserving the PDF admission, signed-session, and deferred-worker delta.

Exact synchronization, fresh and repeat migration 0020, and 132 strict PostgreSQL/search tests pass.

Renumber the colliding unpublished ADR proposal to 0021 and retain its former identity and owner-release gate.

Correct provider maturity claims; 64MiB NewsDOM runtime and search performance remain unverified.

Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae seonghobae added priority: medium Normal-priority or P2 work type: maintenance Maintenance, build, dependency, or operational upkeep labels Sep 7, 2026 — with ChatGPT Codex Connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance priority: medium Normal-priority or P2 work type: maintenance Maintenance, build, dependency, or operational upkeep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant