Skip to content

docs(deps): correct the dependency audit to match requirements.txt - #8

Open
VampiricCyborg wants to merge 4 commits into
mainfrom
docs/refresh-dependency-verification
Open

VampiricCyborg wants to merge 4 commits into
mainfrom
docs/refresh-dependency-verification

Conversation

@VampiricCyborg

Copy link
Copy Markdown
Owner

backend/DEPENDENCIES_VERIFIED.md had drifted far enough to be actively misleading.

The important one: it still listed sentence-transformers as the embedding dependency. That stack was removed deliberately — loading PyTorch exhausted memory on Railway's container and crashed the service on boot (2f46ff0, 384e627) — and replaced with onnxruntime + tokenizers against a quantised INT8 model. Anyone following the old table to "fix" a missing dependency would have reinstalled the exact thing that caused the outage. The rewrite gives that its own section, says it must not come back, and says why.

Also corrected:

  • Four packages the code genuinely imports were absent from the table: onnxruntime, tokenizers, numpy, psutil.
  • The counts were wrong (claimed 26 packages / 21 imports; requirements.txt has 28 lines).
  • The verification snippet told you to import sentence_transformers, which now fails.
  • The seven packages that are real requirements but are never imported by name — uvicorn, python-multipart, asyncpg, psycopg2-binary, greenlet, python-dotenv, pytest-asyncio — now have their own table explaining why grepping for imports will not find them.
  • The hardcoded test count is gone rather than updated; it goes stale every time a test is added, and a green run is the actual check.

The import list was derived from the tree rather than by hand, and every package now accounts for: 21 imported + 7 required-but-not-imported = the 28 lines in requirements.txt.

No code changes.

🤖 Generated with Claude Code

The audit still listed sentence-transformers as the embedding dependency. That
stack was removed on purpose -- loading PyTorch exhausted memory on Railway's
container and crashed the service on boot -- and replaced with onnxruntime plus
tokenizers against a quantised INT8 model. Anyone reading the old table would
have reinstated the exact dependency that caused the outage, so the rewrite says
plainly that it must not come back and why.

Four packages the code does import were missing entirely (onnxruntime,
tokenizers, numpy, psutil), and the counts underneath them were wrong. The seven
packages that are genuinely required but never imported by name -- drivers, the
server, plugins -- now have their own table explaining why grepping for imports
will not find them, instead of being scattered through footnotes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docu-query Ready Ready Preview Sep 20, 2026 12:42pm UTC

VampiricCyborg and others added 3 commits September 20, 2026 18:11
Setting state in an effect body trips react-hooks/set-state-in-effect, which
makes `npm run lint` exit 1. Adjusting the count during render instead also
removes the frame where the browser paints the previous line's length before
snapping back to zero.

Same change as cc718d0 on fix/auth-secret-guard-ci, applied byte-for-byte so
the two branches merge without conflict.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The README carried a hardcoded shields.io "build passing" badge that was never
connected to anything and would have stayed green through any failure. Replace
it with the GitHub Actions badge for a workflow that actually runs the suite:
pytest on Python 3.13, then tsc, lint and build for the frontend.

The workflow is a byte-identical copy of the one on fix/auth-secret-guard-ci so
merging either branch is conflict-free. All four steps verified locally: 79
tests passed, tsc 0, lint 0, build 0.

Also put the live URLs at the top, replacing a "Live demo" link that pointed at
an in-page anchor showing a GIF rather than the running app. Both tiers were
probed before linking them: docuqueryvc.vercel.app returns 200, and
docuqueryprod.up.railway.app/health returns 200 with database: ok.

The badge stays unresolved until this workflow reaches the default branch --
GitHub reads Actions badges from the default branch, not the current one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…arness

The project had no way to measure itself: no evaluation script, no benchmark,
no ground-truth data, and no document corpus. Nothing quantitative about
retrieval quality could be claimed or checked.

This adds a harness that drives the real application code -- the same parser,
chunker, embedding service and retrieval pipeline the API uses -- rather than
reimplementing any of it for measurement:

  ingest_corpus.py      per-stage ingestion timings, one synthetic user per
                        chunking config so the production per-user filter does
                        the isolation between configs
  build_eval_set.py     ground-truth queries generated from indexed passages,
                        anchored to (document, page) so one query set stays
                        valid across chunk sizes
  run_retrieval_eval.py Recall@k, Precision@k, MRR, NDCG@k at document, page
                        and answer-span level
  run_config_sweep.py   chunk size, overlap, threshold and metadata filtering
                        compared on one fixed query set
  run_perf_bench.py     embedding throughput, retrieval latency percentiles,
                        LLM time-to-first-token

AUDIT.md records what is measurable today and, just as importantly, what is
not: retrieval quality cannot be computed until a document corpus exists, and
that is stated rather than approximated. Results in results/ are from a
four-file smoke corpus and exist to prove the code path, not to be quoted --
except the embedding batch-size sweep, which is hardware-bound and stands on
its own (batch 32 is 6.17x faster than unbatched, 3.4x faster than batch 64).

The audit also turned up four defects, recorded in AUDIT.md section 7.

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

This branch was successfully deployed

1 active deployment
Preview — 52af3c89 Deployed Sep 20, 2026 by vercel[bot]
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