Repository navigation
feat(odin): Report action status updates promptly (EDG-1036) - #589
Draft
vikramlc-cognite wants to merge 1 commit into
Draft
vikramlc-cognite wants to merge 1 commit into
vikramlc-cognite wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a debounced early check-in mechanism for action status updates in the unstable package. Instead of waiting for the next periodic check-in, queuing an action update now wakes the check-in loop early after a short debounce interval (1 second by default), allowing bursts of updates to be sent together. This is implemented using a child cancellation token (_wake_token) in CheckinWorker. A comprehensive suite of unit tests has been added to verify this behavior. There are no review comments, and I have no feedback to provide.
vikramlc-cognite
marked this pull request as draft
October 26, 2026 10:22
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## EDG-1032-checkin-resilience #589 +/- ##
===============================================================
+ Coverage 84.70% 84.75% +0.04%
===============================================================
Files 46 46
Lines 4746 4761 +15
===============================================================
+ Hits 4020 4035 +15
Misses 726 726
🚀 New features to boost your workflow:
|
Queuing an action update now wakes the periodic check-in loop, which checks in after a 1s debounce instead of waiting for the next 30s interval. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
vikramlc-cognite
force-pushed
the
EDG-1036-prompt-action-status
branch
from
November 2, 2026 12:00
ec0e902 to
7e3937f
Compare
This branch has not been deployed
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
Action status updates (
runningand the final status) are sent to the Integrations API about a second after they are queued, instead of on the next 30 s check-in.Type of change
What changed
checkin_worker.py:queue_action_updatewakes the periodic check-in loop; the loop waits a debounce (ACTION_UPDATE_DEBOUNCE_SECONDS = 1.0) and then flushes, so a burst of updates causes one extra check-in.CancellationTokenof the loop token, so real cancellation still wins and nothing is held under_lockor_flush_lock. It is dropped and recreated in__getstate__/__setstate__so the worker stays picklable.tests/test_unstable/test_early_checkin.py; CHANGELOG.Why it changed
runningonly reached Odin on the check-in after the work started, so actions showedpendingfor up to 30 s while already running, short actions never showedrunning, and final statuses lagged about 30 s.What to focus on during review
_lock, and the loop creates it before each flush.Test evidence
tests/test_unstable/test_early_checkin.py: 5 tests (early check-in within the debounce window, a burst of 50 updates gives one extra check-in, no update gives none, cancellation, queueing before the loop starts); run 3 times with no flakesuv run pytest tests/test_unstable: same 1 failed + 48 environment errors asmaster; passed count 274 -> 279ruff,mypy,pre-commit run --all-filespassRisks and unknowns
Rollout and rollback
Checklist