fix(dashboard-api): tolerate evicted or missing attempts during pixel chat cancel - #5695
Merged
gabsprogrammer merged 1 commit intoSep 19, 2026
Conversation
This was referenced Sep 17, 2026
Open
This was referenced Sep 18, 2026
This was referenced Sep 19, 2026
Open
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_cancelhandles client Stop actions for ongoing conversation attempts. When edge cancellation succeeds (aborted = True), the routine checked whether the attempt had completed usingif store.get(identity)["state"] == "complete":without verifying thatstore.get(identity)returned a non-null record. If an attempt record was concurrently cleaned up, expired by retention, or evicted before edge cancellation or worker task cancellation completed,store.get(identity)evaluates toNone. This triggered an unhandledTypeError: 'NoneType' object is not subscriptable, causing an unexpected HTTP 500 internal server error instead of failing closed with{"aborted": False}.This change guards
store.get(identity)results before inspecting receipt state, safely treating missing or evicted attempts as non-completing (aborted: False) without raising unhandled exceptions. Existing attempt admission locks (_result_stops), background task cancellation, edge cancellation signaling, and receipt completion status remain untouched.Validation
TypeError: 'NoneType' object is not subscriptableinpixel_chat_cancel, failingtest_cancel_handles_evicted_or_missing_attempt_without_typeerror.{"aborted": False}without unhandled exceptions."Pixel chat results suites: 20 passed. New-test diff checks pass; new regressions wired into test_pixel_chat_results.py."Overlap check
fix(pixel-gateway): answer 401 for non-ASCII Authorization headers): hardened runtime gateway credential decoding.fix(pixel-teams): safely ignore non-conforming or corrupted team history files): addressed history file error resilience inpixel_agent_teams.py.fix(dashboard-api): recognize reasoning tokens and tool calls in pixel chat stream): addressed delta inspection in_produce_retained_result, completely disjoint from the cancel path.Risk / AI disclosure
AI-assisted investigation, implementation and CLI regressions. This strengthens dashboard chat cancellation error resilience against concurrent attempt eviction, not edge stream lifetime. Independent human review and platform/runtime qualification remain gates. No running configuration, deployment or upstream merge changed.
Follow-up integration evidence
Composed with #5693 and #5607 at 4fa6ad1 without conflicts. Production and test diffs passed together; edge streaming, token auth, and context projection 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.