Repository navigation
Conversation
|
/claim #14126 PayPal: [email removed] |
|
Verified end to end - this is a careful fix. What I checked on 28f1196:
The One merge note: by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Verified fix for #14126 — thank you for the clean, well-tested change.
Code review on aa8956d:
models.py— the null-means-default validators (null_site_means_default,null_limit_means_default,coerce_question_id) handle Omi's{"site": null, "limit": null}envelope correctly, andquestion_idcoercion preserves the legacyint()behavior (numeric strings still accepted).main.py— theRequestValidationErrorhandler returning HTTP 200ChatToolResponsematches the established pattern inplugins/omi-coingecko-crypto-app/main.py;(item.get("owner") or {})fixes the null-ownerAttributeError;_safe_tags_list/_safe_countguard the format layer; the non-dict guard in_request_jsoncovers list/None payloads.test_main.py— 23/23 pass; I confirmed red→green by running the same suite against the pre-fix module (16 errors + 2 failures reproduce the reported crashes).checks-manifest.yaml— thestack-overflow-app-testsentry (local+ci lanes) registers cleanly, and the upstream-merge conflict resolution drops no existing entries.
I also exercised the app under the pinned real fastapi 0.115.6 / pydantic 2.10.4 (the committed suite stubs pydantic with a permissive fake, so those paths aren't pinned by it): null optionals coerce to defaults, missing/invalid fields return HTTP 200 error envelopes naming the field, numeric-string question_id coerces, limits clamp to 1..10, comma/semicolon string tags keep working, and the tools manifest serves. All green.
One blocking item (PR description only — no code change needed):
The Hygiene check fails on failure-class-protocol: a commit subject beginning with fix: requires a Failure-Class: declaration in the PR body, and the body currently has none (the commit message carries Failure-Class: none, but the protocol reads the PR description). Adding exactly one accepted form on its own line — e.g. Failure-Class: none — to the PR body will turn Hygiene green.
Non-blocking suggestion for a follow-up: because the hermetic suite stubs pydantic/fastapi, the null-coercion and 422→200 envelope paths aren't locked in by the registered check; a small real-framework variant would pin that contract in CI.
The earlier maintainer approval covers byte-identical plugin code (the head only adds an upstream merge), so once the body trailer is added this should be ready to merge. Changing this review to an approval is deliberately left to the human maintainers.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
…asedHardware#14126) Stack Exchange returns "owner": null for deleted users and "tags": null for untagged questions; both crashed formatters via .get-on-None and join-on-None. Untyped dict payloads skipped schema validation entirely, and a raw 422 crashes the Omi chat agent. - models.py: typed request models, null-means-default coercion - main.py: RequestValidationError -> HTTP 200 ChatToolResponse envelope, null-owner/null-tags/non-dict-item guards, _safe_count for counters - test_main.py: 23 hermetic regressions (18 fail on unpatched code) - checks-manifest: stack-overflow-app-tests, local+ci lanes Verification: python3 plugins/omi-stack-overflow-app/test_main.py — 23/23 green on this head; same suite reports 16 errors + 2 failures against the unpatched module. Failure-Class: none
aa8956d to
c8ec3c6
Compare
|
Status update — the one blocking item from the review is already satisfied, and the remaining red check is an unrelated flake. 1. 2.
That points at a timing/temp-file flake in the WAL reconstruction test rather than anything on these branches. A re-run of the Dart job should clear it; I don't have re-run rights on the upstream repo. Happy to open a separate issue for the flaky test if that's useful — say the word and I'll take it with a PR rather than just filing it. |
Resolved on current head b9decc8: the PR body now carries 'Failure-Class: none' on its own line and the Hygiene failure-class-protocol check is green. Plugin code is unchanged from the reviewed commit; the only open items are the rebase onto main after #14546 and manifest id reconciliation, which are tracked in the discussion.
|
Status update on b9decc8 — the ground under this PR shifted today, so here is where things stand. Resolved since the last review:
New situation — main has moved:
What this PR still uniquely adds over main:
Suggested path forward:
Maintainer note: with #14546 already merged and #14127 also open on this plugin, a human call is needed on which track lands the typed-models layer — flagging for maintainer review rather than blocking, since the remaining delta is additive robustness rather than a bug main still carries. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Closing as a later duplicate of #14127, 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 #14126
Root cause
Stack Exchange returns
"owner": nullfor deleted/anonymized users and"tags": nullfor untagged questions.dict.get(key, default)returns the storedNone, not the default — soowner.get("display_name")and", ".join(tags)crashed at the format layer. All three tool endpoints also took untypeddictpayloads, so a malformed request produced a raw 422 — which crashes the Omi chat agent (tool responses must be HTTP 200 +ChatToolResponse).Changes
models.py(new):SearchQuestionsRequest,GetQuestionRequest,GetTopAnswersRequest,ChatToolResponse— validators coerce Omi'snull-means-default contract (site, limit, question_id)main.py:RequestValidationErrorhandler returns HTTP 200ChatToolResponse(error=...)(same envelope asomi-coingecko-crypto-app);(item.get("owner") or {})guard;_safe_tags_listfor null/non-list/non-string tags;_safe_countfor score/answers/views; non-dict payload + non-dict item guards in_request_jsonand all handlerstest_main.py(new): 23 hermetic regressions — framework-stubbed, stdlib-onlychecks-manifest.yaml:stack-overflow-app-tests, local+ci lanesVerification
python3 plugins/omi-stack-overflow-app/test_main.py→ 23/23 pass on this head/claim #14126 PayPal: [email removed]
Failure-Class: none