Fix 5 QA nits: dead code, N+1 query, dep hygiene, k8s hardening #136
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-api!136
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "135-qa-nits-dead-code-n1-dep-k8s"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Addresses 5 actionable QA nits from the PR #130 review. Cleanup only -- no changes to core worker logic.
Changes
src/pal_e_docs/embedding_worker.py: UseEMBEDDABLE_TYPESconstant in block filtering query (IN %sreplaces!= 'mermaid'), remove redundantset_isolation_levelcall in reconnection path (already handled by_connect()), fix N+1 note title query by adding a correlated subquery to theRETURNINGclause (eliminates per-block SELECT)pyproject.toml: Remove duplicatehttpx>=0.27from[project.optional-dependencies] dev(already in maindependencies)k8s/embedding-worker.yaml: AddterminationGracePeriodSeconds: 60to pod spec for graceful shutdowntests/test_embedding.py: Add 3 tests validatingEMBEDDABLE_TYPESconstant (coverage, mermaid exclusion, guard against drift)Test Plan
pytest tests/ -k test_embedding -v-- 23 passed (20 existing + 3 new)Review Checklist
Related
plan-2026-02-26-tf-modularize-postgres-- Phase 6c-2