Repository navigation
Enforce no-LLM widgets; job_runs records interrupted runs and downtime misfires - #39
Merged
Merged
Conversation
…ot depend on the model
…s rows become interrupted, and downtime fires are recorded as misfired
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.
The last two open items from the whole-project review.
Widgets cannot reach the model (enforced, not just claimed).
Runtimeboundapp._llmon every app, so a widget could callapp.llm()despite the positioning that the dashboard works with every tier dead.run_widgetnow sets theIN_WIDGETContextVar aroundwidget.fn()(reset via its token in afinally);App.llm()raisesLLMNotAllowedInWidgetError, which names the rule and the alternative (compute in a job/tool, have the widget read the result). The error becomes the widget's error card and the provider is never called. Tasks andapp.to_threadwork spawned by the widget inherit the block. No suite app or example widget called the model.job_runsno longer has gaps.runningrow at start and updates it in place to its outcome (one run, one row). A job killed mid-run therefore leaves evidence.start(), before anything is scheduled, leftoverrunningrows becomeinterrupted. Onlyserve()starts the scheduler, and it does so under the exclusivedata_dir/.dudamel.lock.misfiredrow per job with the count (capped at "1000+"). The window runs from the job's latest recorded run to startup. The in-memory job store recomputes next fires from "now", so APScheduler's ownEVENT_JOB_MISSEDcould never see these fires, and the two windows don't overlap. Cron jobs count with the zone-carrying trigger; interval jobs count whole intervals.statusis a freeString(32), andfinished_atis nullable.Full suite: 1162 passed locally; the new scheduler/widget tests are stable across 15 consecutive runs. Known unrelated flake:
test_mcp_reconnect.pyfails when several pytest processes run concurrently (reported by the test-health review; tracked separately).