Repository navigation
Conversation
|
/claim #13978 PayPal: [email removed] |
|
Reviewed the three changed files and verified the suite end to end. plugins/omi-crossref-app/main.py
plugins/omi-crossref-app/test_main.py
.github/checks-manifest.yaml
Leaving models.py validators to #13983 is a reasonable scope cut — pooling and payload guards here, validation envelope there. No product or security decisions needed; leaving the merge call to a human maintainer. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
…t payloads (BasedHardware#13978) - Add FastAPI lifespan managing a persistent httpx.AsyncClient on app.state.http_client; crossref_get reuses it and falls back to a per-request client when the pool is unavailable. - Guard search_crossref_works, get_crossref_work, and get_crossref_works_by_author against null/non-dict message/items payloads instead of raising AttributeError. - Harden extract_year and add _extract_title so malformed date-parts and scalar/empty titles no longer crash or truncate to the first letter. - Add hermetic stdlib test suite (26 tests, <0.1s, no third-party deps) and register crossref-pooling-tests in .github/checks-manifest.yaml (local+ci). Verification: python3 plugins/omi-crossref-app/test_main.py - 26 tests fail on unpatched code (AttributeError/IndexError on null/non-dict payloads, per-request client churn), all pass after the fix. python3 .github/scripts/run_checks.py --lane local --check-id crossref-pooling-tests - PASS. Failure-Class: none
1c1caff to
69fa138
Compare
|
Follow-up on the two new manifest-only commits (69fa138, 6c34997) after the force-push — re-verified everything on head.
Nothing further from my side; the merge call stays with a human maintainer. by AI on behalf of David |
|
Closing as a later duplicate of #13979, opened earlier for the same file class. Both PRs still change overlapping production files ( |
|
Hey @t3ratech 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Closes #13978
Changes
lifespanwires a persistenthttpx.AsyncClientontoapp.state.http_client(same pooling pattern asomi-public-holidays-app/omi-frankfurter-app) — replaces per-request client constructioncrossref_getreuses the pooled client with per-request fallback_extract_items/_extract_titlehelpers;extract_yearhardened with isinstance checks on item/container/date-partsmessage/itemsand non-dict item entries;get_crossref_workreturns a clean error for missing/empty recordstest_main.py— 26 stdlib tests, framework-stubbedchecks-manifest.yaml:crossref-pooling-tests, local+ciVerification
run_checks.py --check-id crossref-pooling-testsPASS;failure-class validateOKScope note: deliberately left
models.pyvalidators and theRequestValidationErrorenvelope to #13983 — this PR covers only the pooling + payload-guard surface./claim #13978 PayPal: [email removed]
Failure-Class: none