Skip to content

fix(test): install Starlette TestClient dependency - #1565

Draft
seonghobae wants to merge 3 commits into
developfrom
codex/starlette-testclient-dependency
Draft

seonghobae wants to merge 3 commits into
developfrom
codex/starlette-testclient-dependency

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Problem

Protected develop@042b0c70531b229af3acbd0421a2f23098d848b3 pins Starlette 1.3.1, but the repository development/direct-test environment did not install httpx2. Starlette therefore fell back to deprecated httpx, and warnings-as-errors could stop TestClient collection. Suppressing that warning hid a dependency/runtime defect.

Current exact authority

  • protected base: develop@042b0c70531b229af3acbd0421a2f23098d848b3
  • exact head: 52dfc863d1a5d6e4e80b6366f719dd09f2aa6172
  • lifecycle: Draft / source dependency repair present / exact-head hosted evidence non-passing / independent approval absent
  • effective files: 8 — CHANGELOG.md, backend/pyproject.toml, backend/pytest.ini, backend/requirements-hashes.txt, backend/requirements.txt, backend/tests/test_container_dependency_pin_contract.py, backend/uv.lock, docs/doctoring/starlette-httpx2-testclient-dependency.md

The PR had drifted back to Ready even though its own authority required Draft. That lifecycle drift has been repaired without changing the product head.

Decision and preserved contract

  • install the already-used httpx2==2.5.0 in the repository development/direct-test manifests;
  • regenerate the immutable uv/hash lock for httpx2, httpcore2, and truststore;
  • remove only the matching Starlette fallback warning suppression;
  • prove at runtime under warnings-as-errors that Starlette TestClient selected httpx2, rather than treating manifest presence as execution evidence;
  • structurally validate the direct pin's SHA-256 records;
  • keep existing production HTTP-client/provider routing semantics unchanged;
  • treat broad backend dependency PR build(deps): bump the backend-python group across 1 directory with 72 updates #1685 as a dependent migration lane: it is now stacked on this exact head and must preserve the direct httpx2 TestClient contract while regenerating its combined lock/hash graph.

The doctoring record preserves PyPI/trusted-publishing provenance, exact wheel digest evidence, rollback boundary, and APA 7 references. Earlier local focused passes remain development evidence only and do not transfer as protected merge evidence.

Fresh hosted evidence

For unchanged head 52dfc863d1a5d6e4e80b6366f719dd09f2aa6172, Application CI 33942903892, Security Scan 33942904025, SAST Semgrep 33942903923, and Bandit 33942903937 are terminal-success. CodeQL PR 33942903900 is terminal-failure because all three compatibility-analysis jobs (actions, javascript-typescript, python) fail at the Release runner or enforce current-head CodeQL verdict step after the dispatch request succeeds; the language-detection job itself succeeds. Docker run 33942904099 remains queued. The current formal review inventory and review-thread inventory are both empty, so no qualifying post-last-push independent approval exists.

The CodeQL compatibility result is a fail-closed gate. Do not reinterpret it as source GREEN or bypass it. Do not churn this source merely to manufacture queue activity; queued Docker evidence is a wait state, while any current-head CodeQL dispatch/verdict control-plane defect belongs to its canonical workflow owner.

Merge boundary

Keep Draft until this unchanged exact head has every then-live repository/organization required check terminal-success, every valid current-head finding/thread resolved, and a qualifying independent post-last-push approval under the effective protected-branch rules. Pending, queued, cancelled, skipped-required, absent, stale, predecessor, status-only, author-side, and model-only evidence is non-passing. No predecessor-evidence transfer, self-approval, admin bypass, force-push, destructive rebase, dummy/no-op requeue commit, warning-suppression restoration, or gate weakening.

Assisted-by: OpenAI Codex
Signed-off-by: Seongho Bae <me@seonghobae.me>
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: f65d9847-cf86-40b8-a16f-ed741a78a942

📥 Commits

Reviewing files that changed from the base of the PR and between 042b0c7 and 52dfc86.

⛔ Files ignored due to path filters (1)
  • backend/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • CHANGELOG.md
  • backend/pyproject.toml
  • backend/pytest.ini
  • backend/requirements-hashes.txt
  • backend/requirements.txt
  • backend/tests/test_container_dependency_pin_contract.py
  • docs/doctoring/starlette-httpx2-testclient-dependency.md

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 marked this pull request as draft September 4, 2026 17:42
Include the new direct httpx2 pin in the SHA-256 digest contract instead of checking only record presence.

Assisted-by: OpenAI Codex
Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae
seonghobae marked this pull request as ready for review September 5, 2026 00:59
@seonghobae
seonghobae marked this pull request as draft September 5, 2026 01:06
@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head review found that the dependency test proved only manifest/hash presence, not Starlette runtime selection. Exact head 52dfc863d1a5d6e4e80b6366f719dd09f2aa6172 now imports starlette.testclient under -W error and asserts its selected transport module is httpx2. The focused two-test suite and Ruff pass. Doctoring records Starlette release history plus PyPI trusted-publishing provenance and the exact 2.5.0 wheel digest. Hosted state is 21 queued / 5 skipped / 0 failures; the PR remains Draft.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact head 52dfc863d1a5d6e4e80b6366f719dd09f2aa6172를 원격과 다시 대조했습니다. dependency pin 계약과 실제 FastAPI TestClient 경로 7개가 -W error로 통과했고 Ruff·diff check도 통과했습니다. 미해결 thread, source failure, base 충돌이 없어 Ready로 전환했습니다. queued hosted Checks와 독립 리뷰는 보호 병합 증거가 아니며 완료 전 병합하지 않습니다.

@seonghobae
seonghobae marked this pull request as draft September 5, 2026 04:42
@seonghobae
seonghobae marked this pull request as ready for review September 5, 2026 05:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T05:54:20.777122Z 52dfc86 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@seonghobae
seonghobae marked this pull request as draft September 5, 2026 05:44
@seonghobae
seonghobae marked this pull request as ready for review September 5, 2026 05:50
seonghobae added a commit that referenced this pull request Sep 5, 2026
Non-force merge of PR #1565 into migration owner #1503. Exact synchronization exposed the undeclared TestClient dependency previously masked by an extra local package. Preserve both complete deltas and use #1565 as the direct prerequisite, superseding the historical #1502-before-#1503 proposal without closing either lane.

Verified merged tree 793aadd with fresh and repeat Alembic upgrade to 0019_email_read_state_repair, 75 strict PostgreSQL/dependency tests, Ruff, and diff checks. Consumer propagation and hosted gates remain unverified.

Co-Authored-By: Codex <noreply@openai.com>
Signed-off-by: Seongho Bae <me@seonghobae.me>
seonghobae added a commit that referenced this pull request Sep 5, 2026
Preserve historical receipts while recording the real fresh-install failure, supplemented environment defect, and verified non-force #1565 to #1503 owner integration. Retain remaining consumer propagation, Alembic head merge, and conflicting import acceptance work as Proposed. Narrow the earlier redirect-safety claim to observed configuration evidence.

Verification: source-linked logs and artifact hashes, 224 provenance tests, clean-lock owner fresh/repeat migrations and 75 strict tests, diff checks, and independent read-only evidence review. No protected merge or release claim.

Co-Authored-By: Codex <noreply@openai.com>
Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae
seonghobae marked this pull request as draft September 5, 2026 10:08
seonghobae added a commit that referenced this pull request Sep 6, 2026
Normally merge full migration prerequisite #1503 at 19d5860, including #1565; preserve #1562/#1531/#1554 history and current #1531 base. Record decision and original missing-emails/skip failures in doctoring before commit. No delta discarded, no copied central workflow, no gate bypass.

Add hardened task-only DB lifecycle, isolated bootstrap/child settings, actual pytest collection/xfail guard, cancellation-safe scoped cleanup and redacted artifacts. Full candidate: 1871 passed and 2 explicitly unconfigured live API skips. Independent signal tests passed. Revalidate this exact committed head before protected integration.
@seonghobae seonghobae added bug Something isn't working priority: medium Normal-priority or P2 work type: bug Defect or incorrect behavior labels Sep 7, 2026 — with ChatGPT Codex Connector

Copy link
Copy Markdown
Contributor Author

Fresh exact-head gate RCA for 52dfc863d1a5d6e4e80b6366f719dd09f2aa6172:

  • Application CI, Security Scan, SAST Semgrep, and Bandit are terminal SUCCESS.
  • Docker's prior failure is not a source/lock finding: backend and combined Naruon images passed; only the frontend image failed while fetching the pinned node:26-slim@sha256:4ebb5ace… base because auth.docker.io timed out (failed to fetch oauth token ... i/o timeout). I reran that specific failed job rather than changing source or weakening the gate.
  • CodeQL PR's three compatibility shards failed only because the central current-head dispatch verdict was still pending; the job explicitly says the dispatch workflow should publish a terminal verdict and rerun the exact failed shard. There is still no authenticated codeql-dispatch/* terminal status on this head, so this remains a central evidence/control-plane blocker, not a Naruon source GREEN.
  • Formal review inventory remains empty; Devin/CodeRabbit success statuses are not being treated as a qualifying post-last-push approval.

Keep Draft. Do not create a no-op commit, suppress the CodeQL gate, or transfer predecessor evidence.

seonghobae added a commit that referenced this pull request Sep 14, 2026
Non-force merge of canonical migration owner #1503 into stacked-PR CI owner #1587. Preserve #1503/#1565 migration and TestClient prerequisites while retaining #1587's eight CI/governance deltas unchanged. This removes the known fresh-schema `emails` migration defect from the CI lane by inheritance rather than copying product-schema code.

Current hosted evidence must be regenerated on this exact integrated head; no predecessor GREEN or approval is transferred.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: medium Normal-priority or P2 work type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant