fix(dashboard-api): tolerate evicted unresolved attempts during pixel chat result retrieval - #5699
Closed
vaibhavsrv wants to merge 1 commit into
Closed
vaibhavsrv wants to merge 1 commit into
vaibhavsrv wants to merge 1 commit into
Conversation
… chat result retrieval
Collaborator
|
Thanks for this contribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this matters
In
ods/extensions/services/dashboard-api/routers/pixel.py,pixel_chat_result(...)queries durable attempt receipts for an owner via_result_state(store, key). If an attempt's state is"unresolved"(for example, after a worker crash or process restart), the handler callspixel_chat_activity(...)to check whether the underlying run reached a terminal state, marks it interrupted viastore.finish(key, "interrupted"), and re-queries the attempt row withrow = store.get(key).If the attempt row was evicted by retention policies, store capacity bounds, or concurrently purged between the terminal transition and
store.get(key),rowbecomesNone. The handler subsequently attempted to evaluateevents = b"" if row["state"] == "active" else ..., which raised an unhandledTypeError: 'NoneType' object is not subscriptableand failed the endpoint with HTTP 500.This surgical fix guards
rowfollowing the unresolved terminal reconciliation check, returning{"state": "unknown", "events": ""}if the attempt row is no longer present in the store.Validation
pixel.py; baseline crashed withTypeError: 'NoneType' object is not subscriptable.{"state": "unknown", "events": ""}; all 20 chat result tests pass cleanly.pixel chat result suites: 20 passed. New-test syntax and diff checks pass; new regressions wired into test suite.Overlap check
fix(pixel-teams): stream UTF-8 chunks incrementally without splitting multi-byte sequences): Addresses agent team SSE streaming decoder; zero overlap with chat result retrieval inpixel.py.fix(pixel-settings): convert decode and protocol failures to unsafe-settings-source): Hardens settings coordinator source parsing; zero overlap with chat results store.fix(pixel-settings): reject active token limits exceeding provider capacity): Enforces capability invariants incontract.py; zero overlap with chat result handlers.fix(dashboard-api): tolerate evicted or missing attempts during pixel chat cancel): Hardenedpixel_chat_cancelagainst missing attempts; this PR complements that protection forpixel_chat_result.Risk / AI disclosure
AI-assisted investigation, implementation and CLI regressions. This strengthens missing-row null-safety in the chat result endpoint and does not alter store semantics or contract formats. Independent human review and platform/runtime qualification remain gates. No running configuration, deployment or upstream merge changed.
Follow-up integration evidence
Composed with #5698 at
35ec0d4e0without conflicts. Production and test diffs passed together; result store and cancellation checks remain intact.Backlog composition was local-only (production/test diffs, excluding workflow/Makefile wiring); it is not an upstream merge or independent human approval. Declared live-review gates remain open.