Repository navigation
mia-data: split the poller, simplify the job builders and the checks - #48
Merged
Merged
Conversation
… split - poll.py: run_poll walks issues and PRs; deliver_label, wake_dataset_workflow and pass_status_without_snippet each handle one item and fail alone. Same behaviour, same log lines; the poll tests in test_mia_workflows cover it. - jobspec builders take the submit activity's JobArgs instead of unpacking it into up to twelve positional parameters; binding.yaml / record.yaml are module constants since every workspace uses those names. - cmd_check's csub policy check becomes _csub_problems with _mount_problems and _queue_problems; config._finish calls five named checks. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Oct 15, 2026
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
Structural cleanup of the mia-data hotspots ruff's complexity rules flagged. No behaviour change intended; the poll and replay tests pass unchanged.
mia_data/poll.py(new): thepollactivity's body, asrun_pollplus one function per job:deliver_label(a human label on a dataset issue becomes a signal, or is removed with a reason),wake_dataset_workflow(a changed snippet PR signalspr_update),pass_status_without_snippet(PRs with no snippet get themia-data/cropsstatus).Activities.polldelegates.activities.pyloses ~100 lines;pollwas 17 branches.JobArgs.crop_jobwent from 12 positional parameters to(cfg, args, snapshot, existing);smoke_job,verify_jobandmatch_joblikewise. The activity already had every value inargs; the builders were unpacking it.binding.yamlandrecord.yamlare now module constants, since every workspace uses those names.mia check's csub policy check is_csub_problems,_mount_problemsand_queue_problemsat module level instead of one 20-branch closure. Messages unchanged (the CLI tests assert on them).Config._finishcalls five named checks (_check_github,_resolve_paths,_check_limits,_check_agent,_check_network).Still above the complexity line and left alone on purpose:
run_test_prandpublishare long but linear;check_bindingis a validator whose branches are the rules;cmd_checkis now a list of small closures.Test plan
pixi run lint,pixi run typecheckcleanpixi run test: 367 passed, including poll and replay tests🤖 Generated with Claude Code
@StephanPreibisch