Repository navigation
Conversation
|
/claim #13983 PayPal: [email removed] |
|
Verified this against #13983 end to end — nice, complete fix. Details per file: plugins/omi-crossref-app/models.py — plugins/omi-crossref-app/main.py — the plugins/omi-crossref-app/test_main.py — the hermetic stub approach (functional mini-pydantic + controllable FakeAsyncClient) matches the repo's existing convention from .github/checks-manifest.yaml — Two non-blocking nits, neither worth a re-spin: Re base: 🤖 This was an automated review on behalf of the maintainers. Verified by actually running the new suite on this head and on pre-PR code, and by executing the new manifest check via by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
77bcd68 to
935c8a9
Compare
|
Follow-up on the two commits pushed after the earlier automated review (rebase +
One merge-ordering note: #14138 (pooling-only, #13978) is fully subsumed by this PR — whichever lands first, the other can be closed with credit. Thanks @t3ratech — the pooled-client fallback path and the HTTP 200 validation envelope are exactly the right shape for the chat-tool contract. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
0018884 to
99aa767
Compare
|
Rebased onto current main in Four DOI test fixtures needed updating for upstream's
|
99aa767 to
8b6cce3
Compare
…l HTTP client (BasedHardware#13983) - models.py: strip whitespace on query/doi/author, clamp max_results to 1-10 (default 5 on garbage), and require exactly one of result/error on ChatToolResponse. - main.py: RequestValidationError handler returns HTTP 200 with the {result, error} envelope instead of FastAPI's default 422; lifespan handler pools an httpx.AsyncClient on app.state.http_client with a polite User-Agent and per-request fallback; _extract_title, extract_year, _message_dict, and _work_items survive scalar, non-dict, and empty payloads; crossref_get rejects non-dict JSON. - test_main.py: 30 hermetic stdlib tests (unittest + framework stubs) covering validation, extraction, pooling, envelope, and handlers. - checks-manifest.yaml: register crossref-validation-tests in local+ci. Verified: python3 plugins/omi-crossref-app/test_main.py -> 30 tests OK (patched); same suite against pre-fix main.py/models.py -> 21 of 30 fail (10 failures, 11 errors). Manifest runner: SELECTED + PASS crossref-validation-tests (local lane). Failure-Class: none
…asedHardware#13983) Upstream's normalize_doi enforces ^10\.\d{4,9}/... — a 4-9 digit registrant per the DOI spec — and returns one uniform error string. Test fixtures using registrant '1' (10.1/test) are not real DOIs and now fail validation before reaching the mocked handler; updated to 10.1038/* and the uniform 'Invalid DOI format' assertion. python3 plugins/omi-crossref-app/test_main.py → 30/30.
8b6cce3 to
149489a
Compare
|
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 #13983
Changes
models.py: validators strip query/doi/author, clamp max_results 1–10 (non-numeric → 5); ChatToolResponse requires exactly one of result/errormain.py: RequestValidationError → HTTP 200 ChatToolResponse envelope (raw 422 crashes the Omi chat agent); lifespan-pooled httpx.AsyncClient on app.state with polite User-Agent + per-request fallback; crossref_get rejects non-dict JSON; defensive _extract_title/_clean_field/_message_dict/_work_items helpers; hardened extract_year + clamptest_main.py(new): 30 hermetic stdlib tests — functional mini-pydantic executes real validators, controllable FakeAsyncClient transport seamchecks-manifest.yaml: crossref-validation-tests, local+ciVerification
Overlap note: this branch independently includes the httpx pooling from #14138 — whichever merges first, the other rebases cleanly.
/claim #13983 PayPal: [email removed]
Failure-Class: none