Repository navigation
fix(operator-queue): one malformed entry no longer stops answer delivery to its agent (#3313) - #3333
Merged
Merged
Conversation
…ery to its agent (#3313) A list/object `id` reached the unguarded `in open_by_rid` (and the write-back's `in response_map`) and raised out of `_sync_agent`; a list/object `priority` raised in `_clamp_ingested_item` (breaking its never-raises contract) and in `_comparable_priority` via `changed_fields`. `_poll_cycle`'s gather(return_exceptions=True) then dropped the error unlogged, so the agent's answers stopped being written back every 5 s with nothing in the logs. - Non-string id: held as invalid_id when pending, skipped otherwise, before any lookup; skipped in the write-back loop (it names no row). - Priority: isinstance-guarded in the clamp and _comparable_priority (-> medium). - Per-agent sync exceptions from the gather are logged with the agent name. Tests: the three TestUnhashableEntryValues strict-xfails are unmarked, and new test_3313_operator_queue_sync_error_logged drives the real _poll_cycle. With the fix reverted, all five went red (unhashable id, priority rewrite, clamp list/object, gather logging). Fixes #3313 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
One malformed entry in an agent's operator-queue file (a list or object where
idorpriorityshould be a scalar) raisedTypeErrorout of_sync_agent._poll_cycle'sgather(return_exceptions=True)dropped it unlogged, so no operator answers reached that agent while the entry was there, and nothing showed in the logs.id: checked before any lookup. A pending entry is held asinvalid_id(the same treatment as the create-side shape check); any other status is skipped. Every other entry for that agent still syncs.id, a site the issue didn't list. It now skips non-string ids, which can never name a row.priority:_clamp_ingested_itemand_comparable_prioritycheck it's a string before the set lookup; a list or object becomesmedium. The clamp's never-raises contract holds again.Tests
test_ec_operator_queue_edges.py::TestUnhashableEntryValues: three strict-xfail markers removed.test_3313_operator_queue_sync_error_logged.pydrives the real_poll_cyclewith two agents, one of whose syncs raises.operator_queue_service: 1645 passed, 11 xfailed (other issues' markers).Fixes #3313
🤖 Generated with Claude Code