Repository navigation
Conversation
The tool assumed a dict body whose items were objects with string fields and\nnumeric timestamps. A non-dict body, a non-list items member, an entry that is\nnot an object, a string tags member or an out-of-range timestamp raised an\nunhandled error instead of a readable tool message.
…anifest Repository rules require deterministic plugin tests to be registered in .github/checks-manifest.yaml with a local and ci lane, otherwise the suite never executes in CI. Add a shared hermetic runner for plugin suites that drive the real FastAPI app.
kodjima33
left a comment
There was a problem hiding this comment.
Stack-overflow-app malformed-payload fix: root cause + tests but diff is 340 lines, exceeds 300-line scope gate = 3/5. Approve only.
Git-on-my-level
left a comment
There was a problem hiding this comment.
Verified from this side, with one blocking issue in the test runner.
Parser hardening — verified correct. I ran your suite against the pre-fix main.py: 13 malformed-payload tests crash there ('str' object has no attribute 'get' from _request_json's old contract and non-dict owner, TypeError from datetime.fromtimestamp("not-a-timestamp"), and a string tags value iterated per-character into Tags: p, y, t, h, o, n). On this head all 16 pass, and the well-formed outputs are identical before/after — the happy path is preserved as described. _format_date's bool/out-of-range handling, _safe_tags_list, and the non-dict fallbacks in _format_question/_format_answer all check out on read-through as well.
Blocking: scripts/run-plugin-hermetic-tests.sh fails before running a single test. The uv path pins fastapi/httpx/pydantic/starlette but then invokes python -m pytest:
$ bash scripts/run-plugin-hermetic-tests.sh plugins/omi-stack-overflow-app
No module named pytest # exit 1, zero tests executed
(reproduced in a clean layout with exactly the script's pinned wheels — pytest is simply not in pinned_deps; the venv fallback has the same gap since it only checks for fastapi/httpx.)
This matters because .github/checks-manifest.yaml routes the new stack-overflow-app-tests check through this script, and the Hygiene lane executes manifest checks on main pushes — the PR's checks are empty right now, so the lane would go red on the first push to main after merge. The verification line in the description ("pytest ... -> 18 passed", also 16 tests in the file) was evidently run directly with pytest rather than through the shipped script.
Two one-step fixes, either works:
- add a pinned
pytestentry topinned_deps, or - follow the existing
scripts/run-plugin-coingecko-tests.shpattern: aunittest.main()test file driven with plainpython, no pytest dependency.
Seeing @kodjima33's approval on this head — the request above is scoped only to the runner script; the app code changes are good to go from my side.
Automated maintainer-assistant feedback; final merge decisions rest with 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.
Review feedback: the runner switched to `python -m pytest` but pinned_deps never gained pytest, so the uv path exited 1 with "No module named pytest" before running a single test; the venv fallback had the same gap because it only probed for fastapi/httpx. Pin pytest==8.4.1 (matching the repo-wide version) and probe for it in the venv path.
|
Thanks for the thorough verification. Fixed in
Good catch on the Hygiene lane going red on the first main push, that is exactly the failure this removes. |
|
@Git-on-my-level The blocking item from your review is fixed in the latest commit.
The non-blocking notes are covered too: the description no longer claims a 500 (the parent returned 200 with a generic error), and the redundant per-request timeout was dropped since the shared client already sets it. Could you re-run the check on the current head? |
Resolves the CONFLICTING state on BasedHardware#14334. The only conflict was .github/checks-manifest.yaml, where main added mobile-event-registry and this branch added stack-overflow-app-tests at the same position. The file is an append-only registry, so both entries are kept; YAML parses and both ids are present. Constraint: the manifest is a shared registry every PR appends to, so the resolution must retain main's new entry rather than take either side wholesale. Rejected: Taking the branch side of the manifest hunk | it would silently drop main's mobile-event-registry check from the registry. Confidence: high Scope-risk: narrow Directive: If this file conflicts again, keep both hunks; the entries are independent and order is not significant. Tested: yaml.safe_load parses (228 checks); both stack-overflow-app-tests and mobile-event-registry present; python -m pytest plugins/omi-stack-overflow-app/test_main.py -q -> 16 passed. Not-tested: The full CI matrix, which the PR's own checks will exercise.
|
@Git-on-my-level The merge conflict that had this PR at The only conflicted file was Verified after resolving:
The blocking item from your earlier review ( |
Resolved on current head 46c9794 and verified by execution: pytest==8.4.1 is now pinned in the runner's pinned_deps and the venv fallback probes for it; running the shipped entry point end-to-end passes 18 tests with exit 0. The original concern was the runner exiting with 'No module named pytest' before executing any test.
|
Follow-up verification on 46c9794 — the blocking runner issue from my earlier review is resolved, and this time I confirmed it by execution rather than read-through. Runner fix verified. Merge resolution verified. Two non-blocking nits, take or leave:
The parser hardening in Automated maintainer-assistant feedback; final merge decisions rest with the human maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Withdrawing this one — it is superseded by #14546, which landed on main today. I re-fetched main after noticing the PR had gone back to
That leaves no unique contribution here, so keeping it open would only produce a redundant merge and a needless conflict for whoever reviews it. Closing it is the honest outcome rather than re-pushing a conflict resolution for work that already landed by another route. What still stands from this branch and is not on main: the Thanks to whoever reviewed it earlier; the two reviews were accurate, and the upstream fix is the better one. |
|
Hey @xyjk0511 👋 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! |
The Stack Exchange tools assumed a dict body whose
itemswere objects with string fields and numeric timestamps. A non-dict body, a non-listitemsmember, an entry that is not an object, a stringtagsmember, or an out-of-range timestamp raised an unhandled error instead of a readable tool message.Normalize at the parse boundary:
_request_jsonrejects non-dict bodies, callers filteritemsto objects,_safe_tags_listaccepts only a list, and_format_daterejects booleans and unparseable values. Well-formed responses render exactly as before.Verification:
python3 -m pytest plugins/omi-stack-overflow-app/ -q-> 18 passed.Failure-Class: none