Skip to content

RATB-01 rag_api CI hygiene: httpx pin (pip ResolutionImpossible), fail-closed CI env, stale async_pg_vector asserts @ 2dde436 — for Demian (DRAFT, merge before #14) - #15

Closed
Wolbrom1 wants to merge 1 commit into
mainfrom
agent/ratb-01-ci-test-hygiene
Closed

Wolbrom1 wants to merge 1 commit into
mainfrom
agent/ratb-01-ci-test-hygiene

Conversation

@Wolbrom1

@Wolbrom1 Wolbrom1 commented Sep 12, 2026 •

Copy link
Copy Markdown

Lane RAG-API-TENANT-BOUNDARY-01 (RATB-01). Draft for Demian. Do not merge without reading "Merge order".

User outcome

The rag_api CI test job becomes installable and truthful again. Today pip install -r requirements.txt -r test_requirements.txt cannot resolve (httpx==0.27.0 vs langchain-google-genai==4.2.0 → google-genai needs httpx>=0.28.1, pip ResolutionImpossible), and two tests/services/test_async_pg_vector.py assertions are stale against the current AsyncPgVector forwarding signature. This PR fixes both and sets the CI env so the suite runs under the production embeddings provider (Bedrock, offline dummy AWS creds) with a JWT_SECRET, which is also what the fail-closed identity increment in #14 needs to stay green. No app/ source is changed. This PR claims no security or tenant-isolation change.

Exact head

  • Head: 2dde4365a6702c85d1f76988175db72d1e05f442 on agent/ratb-01-ci-test-hygiene
  • Base: 102b377 (origin/main at push time)
  • Files (3): .github/workflows/ci.yml, test_requirements.txt, tests/services/test_async_pg_vector.py

Test results (Docker python:3.12-slim, env = this PR's ci.yml values; fresh independent review re-ran all of it)

Tree Result
origin/main 102b377 baseline 2 failed · 155 passed · 3 skipped · 10 errors
this PR alone 0 failed · 157 passed · 3 skipped · 10 errors
this PR merged onto #14 head e11a021 (round-2, scratch, --no-commit, aborted) 0 failed · 207 passed · 3 skipped · 0 errors

Recovery re-verification (2026-09-12, account-change resume — RATB-01 owner)

Fresh fetch: this PR is unchanged at 2dde436; base origin/main is still 102b377; not merged. Standalone CI (run 34667359538) is still red by construction on the pre-existing test_main cache_clear error that #14 fixes — no new failure.

The composed row above was measured against the superseded round-2 #14 head e11a021. Re-verified at the current #14 head 3ed6e9f (round-3, adds the approved-provider allow-list): the full suite on the Linux ci.yml image (python:3.12 / ratb-rag-test, JWT_SECRET=test_key, EMBEDDINGS_PROVIDER=bedrock, dummy AWS creds; command pytest --disable-warnings -q for full counts) = 214 passed · 3 skipped · 0 failed · 0 errors (217 collected). Both mutually-blocking tests are green: test_async_pg_vector 7 passed (this PR's fix), test_main 10 passed (#14's get_cached_query_embedding lru_cache). Merge of this PR onto 3ed6e9f is clean (only these 3 files change). The 3 skips are all msoffcrypto not installed (optional xlsx loader cases in tests/utils/test_lazy_load.py), environmental and identical on CI. With --maxfail=1 and zero failures the job runs to completion ⇒ composed CI green on Linux (ubuntu-latest). (On a Windows runner, 2 test_path_validation symlink tests need privilege — WinError 1314 — and 6 more tests skip; both are Windows-only and pass/skip on Linux CI, so the 217-item set is fully accounted for. This local Linux result is authoritative and supersedes any Windows-run inference.)

Composition owner: producing a combined green remote check is owned by the KSPT-01 lane (owner of #14 + Core LibreChat-AI#286). It has now done so: #14's head advanced to a single combined candidate 96f261d ("Merge RATB-01 CI hygiene #15 (2dde436) into KSPT-01 #14"), which contains this PR's exact 3 files as its only delta over 3ed6e9f; its real remote CI is running. This support PR stays stable at 2dde436; whether it merges separately (order below) or is carried by the combined candidate is KSPT-01/Demian's merge-strategy call. This lane opens no parallel integration branch and changes #15 only if the composition exposes a support-scope defect.

Conflicts

git merge-tree --write-tree is clean against origin/main (102b377) and against #14 head (e11a021 at push time; re-confirmed clean against the current 3ed6e9f). #14 lists the two async_pg_vector failures as pre-existing; whichever of the two merges second is unaffected.

Merge order

  1. This PR first (safe on main today, independent).
  2. Core claim-minting PR (KSPT-01, agent/kspt-01-rag-jwt-entitlement-claims, Core 🔒 chore: bump python-dotenv to 1.2.2 to patch Dependabot alert LibreChat-AI/rag-api#286) before [SUPERSEDED-BY-TOP #20] KSPT-01 rag_api COMBINED candidate @ 96f261d: fail-closed identity + tid/ent/act entitlement + approved-provider allow-list + RATB-01 #15 CI hygiene — for Demian (DRAFT; composed CI green; deploy AFTER Core #286) #14.
  3. rag_api [SUPERSEDED-BY-TOP #20] KSPT-01 rag_api COMBINED candidate @ 96f261d: fail-closed identity + tid/ent/act entitlement + approved-provider allow-list + RATB-01 #15 CI hygiene — for Demian (DRAFT; composed CI green; deploy AFTER Core #286) #14 after its Core counterpart and after the deploy gate below.

Migrations / configuration

Rollback

Revert the single commit 2dde436. Reverting re-breaks pip resolution for the CI job (pre-existing state), nothing else.

Unproven live checks / CI result

CI run 34667359538 on this head: Install dependencies step SUCCEEDED (pip resolution proven on GitHub, was ResolutionImpossible before the httpx pin); test step FAILED as disclosed above: 54 passed, 1 error, stopped by --maxfail=1 at the pre-existing tests/test_main.py::test_get_all_ids setup error (AttributeError: function object has no attribute cache_clear, identical to origin/main). No new failure. #14 fixes that defect; merged with #14 the suite is 214 passed / 0 errors locally on Linux at the current heads. GitHub CI runs each PR standalone, so there is no combined green check here by construction; the combined result is proven locally (see "Recovery re-verification"). Nothing else is live-testable for a CI-only change.

Ladder: IMPLEMENTED YES · TEST-PROVEN YES (local Docker + fresh review; composed re-verified at current heads) · PUSHED YES · MERGED NO · DEPLOYED NO · LIVE-VERIFIED NO.


Disposition update (2026-09-12) — folded into the single combined rag_api candidate

KSPT-01 (owner of the rag_api composition) integrated this branch's 3 reviewed files into #14 via an additive merge commit 96f261d (now PR #14's head; both reviewed histories preserved). PR #14 is therefore the single combined rag_api release candidate, and the GitHub build-and-test check on the actual composition is green — run 34695621428: 208 passed · 9 skipped · 0 failed (ubuntu-latest). This PR stays open as the reviewed provenance for the 3 files. Demian: merge the combined PR #14 (after Core LibreChat-AI#286 deploys); you do not need to merge this PR separately — its changes are already in #14. Merging this PR to main first is harmless (greens main's CI early) and duplicates no work.

🤖 Generated with Claude Code

…x pin, fail-closed env, stale async_pg_vector asserts)

- test_requirements.txt: bump httpx 0.27.0 -> 0.28.1. The 0.27.0 pin is
  unsatisfiable against google-genai (pulled by langchain-google-genai==4.2.0,
  which requires httpx>=0.28.1) -> `pip install -r requirements.txt
  -r test_requirements.txt` fails with ResolutionImpossible on origin/main.
  The bump is the minimum that resolves for both requirements.txt and
  requirements.lite.txt.
- .github/workflows/ci.yml: run tests under EMBEDDINGS_PROVIDER=bedrock (the
  production provider; client built offline from dummy AWS creds) with a
  JWT_SECRET present, instead of relying on OPENAI_API_KEY + the openai default.
  Valid whether the tree treats these as optional (current main) or required
  (fail-closed identity work landing separately).
- tests/services/test_async_pg_vector.py: update two stale mock assertions to
  the current AsyncPgVector signature, which forwards
  user_id/document_origin_type/subscription_id kwargs to the sync super()
  methods (get_filtered_ids, _delete_multiple). These two assertions fail on
  origin/main today; the update makes them pass.

Disjoint from the rag_api identity/entitlement writer increments; no app/ source
changed. Does not make the full suite green on origin/main by itself
(pre-existing test_main cache_clear errors remain, fixed by the writer increment).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Wolbrom1 pushed a commit that referenced this pull request Sep 12, 2026
…lement #14 — single combined rag_api candidate

Additive merge commit composing the two independently-reviewed, disjoint rag_api
branches so the repo's GitHub checks run on the actual composition:
- #14 agent/kspt-01-rag-fail-closed-entitlement @ 3ed6e9f (fail-closed identity +
  tid/ent/act entitlement + approved-provider allow-list) — unchanged.
- #15 agent/ratb-01-ci-test-hygiene @ 2dde436 (ci.yml Bedrock/JWT env, httpx 0.28.1
  pin, stale async_pg_vector asserts) — 3 files, disjoint, unchanged.

NOT a merge into main. Preserves both reviewed histories. Local Linux composed
result (RATB-01 evidence): 214 passed / 3 skipped / 0 failed / 0 errors (217 collected).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Wolbrom1

Copy link
Copy Markdown
Author

Closing as fully contained in main — judged on its own merits against origin/main = 5816e133bb2023a50de86754a00a5d29e38ac231, not as part of the superseded stack.

Diffing this head (2dde4365) against main over its three files shows only additions main made later, and nothing this PR added is missing or reverted:

  • test_requirements.txt — byte-identical. httpx==0.28.1 is main's current pin, so the reason this PR exists is already satisfied.
  • .github/workflows/ci.yml — main carries the entire fail-closed CI env block verbatim, comments included (JWT_SECRET / EMBEDDINGS_PROVIDER: bedrock / AWS_*) at three job sites, plus later additions of its own (the pgvector service and RAG_TEST_PG_DSN).
  • tests/services/test_async_pg_vector.py — both owner-scoping assertions are present, plus a later text_source=None kwarg.

So there is no delta left to re-offer and no fresh CI read worth taking. Branch untouched.

@Wolbrom1 Wolbrom1 closed this Sep 22, 2026
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.

1 participant