Skip to content

Add fuzzy professor teaching upload - #194

Draft
jerryzhou196 wants to merge 4 commits into
mainfrom
codex/fuzzy-prof-teaches-upload
Draft

Add fuzzy professor teaching upload#194
jerryzhou196 wants to merge 4 commits into
mainfrom
codex/fuzzy-prof-teaches-upload

Conversation

@jerryzhou196

Copy link
Copy Markdown
Member

Summary

  • add a protected POST /admin/course-professors/upload endpoint for Quest prof_teaches.json uploads
  • normalize and dedupe uploaded rows, validate course references, and fuzzy-match instructor names with Postgres similarity()
  • store accepted uploaded associations in scraped_prof_teaches_course and union them into the existing prof_teaches_course materialized view/search indexes
  • document the upload curl shape and cover parser/classifier behavior with focused tests

Verification

  • env GOCACHE=/private/tmp/uwflow-go-build-pr go test ./api/admin ./common/env ./common/db
  • git diff --check
  • Full env GOCACHE=/private/tmp/uwflow-go-build-pr go test ./... still fails locally on existing native dependency: pdftotext.cc:6:10: fatal error: 'poppler/cpp/poppler-document.h' file not found

jerryzhou196 and others added 4 commits June 28, 2026 22:10
Replace the fuzzy-matching engine (pg_trgm similarity, ambiguous-review
queue, per-row issue tracking) with the importer's existing prof identity:
resolve courses and instructors by code and upsert. Drops the trigram
extension/index and the fuzzy-only columns; handler goes 626 -> 179 lines.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The admin import endpoint is operator-only; block it at the public proxy so
it's reachable only from inside the box (localhost:8081 / SSH tunnel / sibling
container). The AWS SG already blocks :8081 directly, so this closes the one
public path. No rate limiting needed once it's not publicly routable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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