Skip to content

refactor: split cron.py into cron_service owners behind its facade - #14615

Merged
bolichen97 merged 1 commit into
mainfrom
refactor/b11-cron-service
Sep 29, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
refactor/b11-cron-service

Conversation

@bolichen97

@bolichen97 bolichen97 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Give each responsibility of the cron scheduler its own module, so changing one cron rule no longer means working inside a 7,377-line file, while every cron behavior, stored byte and import stays exactly as it is.

src/kiro_crew/cron.py held the whole cron subsystem in one file: the job record, the schedule and timezone math, the crons.json format and lock, field validation, run claims, run deadlines, the store readers kirocrew doctor and the dashboard use, cron folders, and the 5,126-line CronService itself. A change to any one of these meant loading, reviewing and conflicting on all of them.

Why it matters

Cron is one of the busiest files in the repository: more than a dozen open pull requests touch it, and each one has to be read against every unrelated rule the file carries. A contributor or an agent looking for "where does next-run math live" or "what may a crons.json record hold" has to search the whole file, and nothing marks which code owns which rule. Giving each rule one home makes those changes smaller, easier to review, and less likely to collide.

Not a goal

  • Changing any cron behavior: schedules, timezone and DST handling, skip dates, jitter, run claims, retries, auto-pause, reaping, cancellation, delivery or alerts.
  • Changing the crons.json format, error texts, log channel, or any import path callers use today.
  • Moving the reaper and cancel() teardown, the run lifecycle or the store transactions out of CronService; repository guards scan cron.py for them, and the kill mechanics already live in process_identity.
  • Refactoring cron_script.py, cron_history.py, cron_inflight.py or cron_trigger.py, which are already single-owner modules and are left untouched.
  • Editing read-only guard tests, baselines, CI files, or docs this change does not own.

What changed (motivation → approach → change)

Each cron responsibility now lives in one small module, so a change to one scheduling rule touches one file instead of the 7,377-line cron.py, and nothing the scheduler does changes.

Owner in src/kiro_crew/cron_service/ Owns
schedule.py next-run math, the due decision, jitter bands, next wake, schedule rendering, timezone resolution, parse_time_string
model.py CronSchedule, CronJob and its auto-pause bookkeeping
identity.py a run's session key, its stability, member-memory capture and dispatch
claims.py RunClaims: storing, fencing, taking and releasing a run claim, plus run generations
execution.py the wake budget and its allowances, a finished run's terminal record
store.py the crons.json codec, cron_store_lock, the store error types and record predicates
fields.py what a valid job and a valid update are
readers.py the store readers that work with no scheduler running
folders.py cron folder definitions

cron.py still defines CronService, which composes these owners and keeps the live state, the run lifecycle, every store transaction, the loop-stall breaker and the reaper and cancel() teardown. The moved code is copied as is: 142 of the 160 definitions are unchanged. The other 18 are 17 service methods that now call an owner, plus referenced_skill_names, which takes a skill key's last segment with rpartition("/") so the portability scan does not read that separator as a path.

cron.py stays the import and patch surface. It is a plain module that binds every function, class and constant it used to define, as the owner's own object. Eight names that tests patch on kiro_crew.cron are read by moved code, so the owners read those eight through kiro_crew.cron on each call, and a patch there still reaches them. The claim fences move from CronService onto RunClaims, which CronService._runs holds; _claims, _reaped_jobs and _cancelled_jobs still read through it. Four things stay in cron.py because read-only guards scan or pin that file: the reaper and cancel() kill path, the two run-deadline sums, the one session-key parser, and the doctor's two store readers. The loop-stall classifier in stall_attribution.py counts a frame in cron_service/ as the cron surface, as it counts one in cron.py, so a stall inside moved code keeps its attribution. The dashboard spec's Cron section records the new owner map.

Backwards compatibility

Compatible: every function, class and constant kiro_crew.cron defined still resolves there as the same object, patches on kiro_crew.cron still reach the moved code, and the saved crons.json bytes are pinned against the pre-split module. The only names that moved are five private CronService claim-fence methods (_holds_claim, _release_claim, _take_claim, _finish_taken_claim, _next_run_generation) and _run_generations, now RunClaims members; a writer sweep on origin/main @ f54747d finds no caller outside the cron tests this change updates.

Tests

  • test/test_cron_refactor_contract.py (new) pins the facade: every name the module defined still resolves as the owner's object, CronService keeps every member callers reach, each of the eight seams reaches its reader and undoes cleanly (nested monkeypatch, and mock.patch with and without create=True), no owner imports the facade at import time or reads a seam bare, the saved crons.json content for the shipped fixtures (normalized to LF, with a case that forces the CRLF a Windows save writes) and a record carrying every field, and 32 schedule-math goldens across both 2026 DST changes.
  • test/test_cron_refactor_readers.py (new) characterizes the store readers and run-identity helpers.
  • A contract case pins that a stall frame in cron_service/ (POSIX and Windows spellings) still classifies as the cron surface.
  • Both new files also pass against the pre-split source, so they describe the code as it was, and a deliberate mutation of one seam read and one key order fails six of their cases.
  • Nine existing cron test files now reach the claim fences through RunClaims; their assertions are unchanged.

Local evidence on Python 3.12, workers capped at three: the owned cron manifest, with main's test_cron_apps_secret_mask.py, passes 2,233 with 3 skipped, the 76 new cases included; the read-only dashboard, MCP, doctor and guard oracles pass 6,632 with 11 skipped, unmodified; the tests main changed since this branch first opened pass 3,871 with 8 skipped, unmodified; 194 repository-wide scanner suites pass 15,179; mypy, docs-lint, Semgrep (CI's rule set, on this diff) and the prepare-pr script gates pass. scripts/local-gate.py --dry-run selects 2,519 backend and 1,444 frontend related files, over the shared-host ceiling, so those targeted sets ran instead; this change touches nothing under website/.

Shared files

Three lines outside this scope's own files, each edited under an explicit, entry-scoped grant from the campaign coordinator; nothing else in those files changed:

  • src/kiro_crew/stall_attribution.py:49 -- the _SURFACE_RULES "cron" entry gains the /kiro_crew/cron_service/ path fragment; test/test_stall_attribution.py passes unmodified.
  • docs/system-specs/common/code-style.md:26 -- the "Cron limits" row names the owners that now define those constants (cron_service/store.py, fields.py, model.py, schedule.py; the reaper intervals stay in cron.py).
  • docs/system-specs/common/injected-messages.md:516 -- the [Previous run result ...] envelope row names its emitter, build_cron_session_context in cron_service/identity.py.

Manual verification

Built the wheel and installed it into a fresh virtual environment: every kiro_crew.cron_service module imports from site-packages, an owner imports and runs before kiro_crew.cron is loaded, CronService round-trips a job through add, reload, update and remove, CronService.create works on a running loop, and the installed kirocrew cron add / cron list write and read a version-2 store.

Related Issues

no linked issue: a structural refactor of the cron subsystem with no behavior change.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@bolichen97
bolichen97 requested a review from a team as a code owner September 28, 2026 04:02
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 593fdfe7556c6dc16f6680675b4517ddfc205f69 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Verify none of the ~dozen open cron PRs patch the six moved private claim-fence names — the writer sweep only covered origin/main @ f54747d.

[DESIGN-REVIEWED] 593fdfe

Description read

[DESCRIPTION-READ] cc219c0227b38af105520266896300c49077e37041739fec1ba7dcc0e6a29912

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 593fdfe7556c6dc16f6680675b4517ddfc205f69 and found no blocking issues.

This comment is updated in place on each push.

Review details

FINDING -- src/kiro_crew/cron_service/identity.py:105 -- Function-local from kiro_crew.execution_context import ... defers import failures until cron execution -> Fix: move the imports at lines 105–106 and 132–138 to module scope.
[GPT-REVIEWED] 593fdfe

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 593fdfe7556c6dc16f6680675b4517ddfc205f69: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 593fdfe7556c6dc16f6680675b4517ddfc205f69 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Verify the eight-seam list is exhaustive: a kiro_crew.cron.<name> patch target outside it that moved code imports directly would detach silently.

What this change ships

Inventory (8 items) — 8 justified

Intent: split the 7,377-line cron.py into single-responsibility owner modules while every behavior, stored byte and import path stays identical — a MOVE (refactor), not a fix or addition.

  1. Cron responsibilities now live in nine cron_service/ owner modules; CronService stays in cron.py — justified
  2. kiro_crew.cron still resolves every old name as the same object (facade re-exports) — justified
  3. Eight test-patched names are re-read through the facade at call time, so existing patches (25 sites, 7 pre-existing test files counted) still land — justified
  4. Claim fences regrouped onto RunClaims at CronService._runs; five private methods renamed, nine test files re-pointed — justified
  5. Loop stalls in cron_service/ frames still attribute to "cron" (one _SURFACE_RULES fragment) — justified
  6. referenced_skill_names spells last-segment via rpartition — behavior-identical, declared — justified
  7. Two new test files pin the facade, seams, store bytes and schedule goldens — justified
  8. Three spec/doc rows updated in the same commit (AGENTS.md same-commit rule) — justified

[FIRST-PRINCIPLES-REVIEWED] 593fdfe

Description read

[DESCRIPTION-READ] 640bf549cb374956d915323a2839033c80240952ffc5d725b9c44e089b9d61f5

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@bolichen97

Copy link
Copy Markdown
Contributor Author

CodeQL: needs-a-decision for a maintainer. The two "new" high py/clear-text-logging-sensitive-data alerts on this head are pre-existing alerts that this PR only moves to new line numbers.

Alert This head main Statement (unchanged)
#883 cron.py:2194 cron.py:4545, open since 2026-09-12 logger.info("Removed cron job %s", job_id)
#905 cron.py:2789 cron.py:5140, open since 2026-09-18 logger.info("%s cron job %s", ..., job_id)

Neither line is inside a changed hunk. The check body itself says alerts not introduced by the PR can be reported when "the code changes were too large", which fits a diff this size.

The path CodeQL reports (python analysis 1849129046) starts at a variable named secrets in mcp_cron.py:2915. That value goes through an f-string into a tool result. A test helper then parses a job id out of that result (test/test_mcp_cron_caller_identity.py:69-128) and passes it back into the cron tools, and it ends at the job_id log arguments above. A job id is not a secret, and the path only connects through test code. I have not changed the log lines to get around the rule, because that would change behavior.

Question for a maintainer: dismiss #883 and #905 as false positives (they are open on main as well), or say which other route you want.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed 593fdfe7556c6dc16f6680675b4517ddfc205f69 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 593fdfe

Verdict parsed from the review's SHA-scoped output markers for commit 593fdfe7556c6dc16f6680675b4517ddfc205f69.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 593fdfe7556c6dc16f6680675b4517ddfc205f69: <one-sentence reason>

@bolichen97
bolichen97 force-pushed the refactor/b11-cron-service branch from b0f11ab to 34d5ac5 Compare September 28, 2026 04:42
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 28, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author
  • span=cf543cfd1b2b Migrate the facade patch targets so the seam reads become direct imports

rebutted: disproportional to this PR's frozen goal. The eight seams exist because read-only tests owned by other scopes (for example test_parse_time_string_tz.py, test_admission_gate.py, test_context.py, test_config_timezone_snapshot.py, test_slack_cron_remove_audit.py) patch kiro_crew.cron.<name>, and this PR's Not-a-goal excludes editing tests it does not own.
The indirection is bounded, not open-ended: test_cron_refactor_contract.py pins the owners so that they read exactly these eight names through the facade and never read one bare.
Once those owners move their patch targets, the pinned set can shrink to zero in the same change, so the follow-up belongs to them and does not need to happen here.

@bolichen97
bolichen97 enabled auto-merge (squash) September 28, 2026 15:40
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 28, 2026
The 7,377-line cron.py held the job record, the schedule evaluator, the
crons.json format and lock, field validation, run claims, run deadline
terms, the serviceless store readers and cron folders beside the service
itself. Each now has one owner module under cron_service/, moved
verbatim, and CronService composes them: it keeps the live state, the
run lifecycle, every store transaction, the loop-stall breaker and the
reaper and cancel() teardown.

cron.py stays the import and patch surface. It is a plain module that
binds every function, class and constant it defined as the owner's own
object, and the eight names tests patch there that moved code reads are
read by the owners through kiro_crew.cron on each call, so a patch still
reaches them. The claim fences move onto RunClaims; CronService._claims
reads through it. The reaper kill path, the two run-deadline sums, the
session-key parser and the doctor's two store readers stay in cron.py,
where repository guards scan or pin them. The loop-stall classifier counts a frame in cron_service/ as
the cron surface, as it counts one in cron.py, so a stall in moved code
keeps its attribution.

The crons.json bytes, schedule math and every existing test are
unchanged; owned tests that reached a claim fence directly now use
RunClaims. The dashboard spec records the owner map, and the code-style
and injected-messages rows that located moved code in cron.py now name
its owner.
@bolichen97
bolichen97 force-pushed the refactor/b11-cron-service branch from 34d5ac5 to 593fdfe Compare September 29, 2026 02:05
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in src/kiro_crew/cron.py (#14510) and the cron tests since this head went green (cd783d2 -> f54747d); CI re-running.

What the rebase carries. The only upstream change inside moved code was #14510's teardown lease/ownership gate in CronService._sigkill_sessions / _sigkill_session and its imports. That code never left cron.py, and it is ported verbatim. #13273 (cron child apps-tree mask) touches only cron_script.py, which this PR does not change, and its tests.

One placement change the rebase required. Main's new test/test_cli_doctor_refactor_facade.py pins job_pause_state_from_disk and unhealthy_jobs_from_disk to the kiro_crew.cron module. Both are defined in cron.py again, with main's exact text, and are no longer in cron_service/readers.py. The spec's module map says so.

Two doc rows that located moved code in cron.py now name its owner:

  • code-style.md "Cron limits"
  • injected-messages.md [Previous run result ...]

Proof, per file. For every file, the change from the previous head 34d5ac57e to this head equals main's own change cd783d223 -> f54747d62 in 1,182 of 1,187 files. The five exceptions are exactly the placement change and the two doc rows:

  • cron.py
  • cron_service/readers.py
  • learn-cron-dashboard.md
  • code-style.md
  • injected-messages.md

An AST comparison against main's cron.py gives 142 definitions identical, 18 delegating, and 5 claim fences on RunClaims.

Local gates on this head (Python 3.12, 3 workers):

Set Result
Owned cron tests + test_cron_apps_secret_mask.py 2,233 passed, 3 skipped
Read-only dashboard/MCP/doctor/guard oracles 6,632 passed, 11 skipped
Tests main changed since cd783d223 that reach cron, runtime ownership or the doctor 3,871 passed, 8 skipped
Repository-wide scanner suites 194 suites: 15,179 passed, 121 skipped
mypy clean, 1,913 files
Semgrep 1.78, CI's rule set on this diff 247 rules, 26 files, 0 findings
docs-lint and the prepare-pr script gates pass

Every upstream test passes unmodified.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 29, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author
  • span=5b4f36e401f3 Function-local execution_context imports in cron_service/identity.py

rebutted: moved verbatim; the deferred imports are the existing contract, not new code.
resolve_cron_memory and bind_cron_memory are AST-identical to main's cron.py:1857 and :1884, which import function-locally the same way.
Hoisting them changes import-time behaviour, the thing this PR's frozen goal excludes: importing kiro_crew.execution_context loads 78 kiro_crew modules, so import kiro_crew.cron and every cron_service owner would pay that eagerly.
The failure mode is not new either: a broken execution_context already surfaced at cron dispatch before this PR.
Moving these imports is a separate behaviour change for its own PR.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Sep 29, 2026
@buluoray

Copy link
Copy Markdown
Contributor

Reviewed at 593fdfe7556c6dc16f6680675b4517ddfc205f69, on the merge ref against main 2e09b10304 (0 commits behind). I checked that the split is a pure move by comparing ASTs against origin/main:src/kiro_crew/cron.py, not by reading the description. I found no behaviour change and nothing blocking.

[code-reviewer] 🟢 [Tests]: one schedule golden depends on the croniter version, not on this refactor
test/test_cron_refactor_contract.py:703-713 has the case ("30 2 * * *", America/New_York, now=1772953200.0, expected_due=False). That instant is 2026-03-08 03:00 EDT, the first minute after the US spring-forward gap. With croniter 6.2.4 installed, CronService._is_due returns True on main and on this head alike, because croniter.match treats the skipped 02:30 as matching 03:00. So the golden holds only under setup.cfg:37's croniter>=2.0,<3 pin, which is what CI runs. Consequence: when someone later bumps croniter, this test goes red and reads like a cron-refactor regression when the dependency is what changed. Fix (optional, non-blocking): add a comment on that row saying it records croniter-2.x DST-gap semantics, or drop the DST-gap case from the move-contract goldens and pin it in a croniter-specific test.

Verified clean, for the record

  • Moved definitions: I compared every one of the 79 old top-level definitions by normalised AST (docstrings stripped) with its new home. 63 are identical. The other 16 differ only by name → seams.name for the eight declared patch seams, plus referenced_skill_names' tok.split('/')[-1] → tok.rpartition('/')[2], which gives the same result for every string. None are missing.

  • CronService: the extracted bodies are identical to main. That covers build_job (vs _build_job, same parameters and defaults), apply_job_update (the whole validation-and-apply block of _update_job_locked, text-identical), compute_jitter, is_due (including skip_dates in the job timezone and the same-UTC-minute refire guard), next_wake_secs, close_run (every drift and retry-pair rebinding, the result_produced gate, the shallow-copy terminal record with its generation), apply_run_record (the at-job enabled/user_paused propagation for fired and fire-time-denied one-shots, auto_paused, the result stamps, the retry telemetry), store_digest, encode_store/job_record (same key order, so the stored bytes are unchanged) and decode_jobs (per-entry KeyError/TypeError isolation; decode errors still propagate into _load's unchanged try).

  • RunClaims: holds, release, take(expected=), finish_taken and next_generation are line-for-line the old _holds_claim, _release_claim, _take_claim, _finish_taken_claim and _next_run_generation. claim, attach_task, discard_finished and running_since also match their old versions.

  • Unchanged CronService methods: one-shot deletion, missed-run/tick scan, persistence and locking (_file_lock, _save, _sync, cron_store_lock, the *_locked cores, _merge_terminal_state_locked, _tick_scan_locked), the reaper and cancel() are unchanged apart from the _runs.* delegation.

  • Facade patches: I scanned every test and in-package test for patch("kiro_crew.cron.X"), setattr/patch.object on any alias of the module, and direct attribute assignment. That found 19 distinct patched names. Owners read eight of them: datetime, get_local_tz, published_config_timezone, cron_expr_matches, config_dir, _record_is_enabled, sel and _JOB_TIMEOUT_SECS. They always read those through seams.X, never bare (AST scan of every function body under cron_service/). The other patched names fall into three groups:

    • time.time, random.uniform, cron_script.kill_running_process and KiroCrewConfig.load are attribute patches on shared module/class objects, so they take effect everywhere.
    • _DEFAULT_DIR, admission_check, kill_verified_process, emit_counter, _REAPER_* and KiroCrewConfig are read only by code that stayed in cron.py.
    • job_agent_names_from_disk is imported from the facade at call time by doctor_checks/agents.py:186.

    The patch-surface concern the First-Principles bot raised is therefore addressed.

  • Mutation checks:

    • Changing parse_time_string to read get_local_tz() bare turns 5 tests red: test_parse_time_string_tz.py ×2 and three contract-seam tests. So the seam guard is load-bearing.
    • Dropping not stored.taken from RunClaims.holds turns 3 claim/cancel/reaper tests red.
    • I restored both files afterwards.
  • Imports: all 52 names imported from kiro_crew.cron across src/ and test/ still resolve. Names that were bound only as imports in the old module (croniter, ZoneInfo, get_description, json, uuid, …) are no longer on the facade, but no caller or patch references them. The owners import only modules listed above themselves, and the facade is imported lazily inside functions, so there is no import-time cycle.

  • Module-level state: none is duplicated. _DEFAULT_DIR and _loop_safety_warned stay only in cron.py, owners define no locks or singletons, and every owner that logs uses logging.getLogger("kiro_crew.cron"), so caplog(logger="kiro_crew.cron") and log configuration keyed on that name still see the moved messages.

  • stall_attribution and guards: the stall rule now also matches /kiro_crew/cron_service/. The reaper kill path stays in cron.py, and cron_service/ contains no pid, kill or getpgid use, so test_process_identity_structural.py still scans the right file. I found no CI, semgrep or lint config that scopes rules by the kiro_crew/cron.py path.

  • Tests: I ran 132 cron-touching test files at this head: 7177 passed and 40 failed. For the failures outside the new contract file, I re-ran those four test files on main 2e09b10304: 39 failed there too, all environment failures (no yaml in subprocesses, no cron descriptor, onboarding import-order subprocesses). The only failure unique to this head is the croniter-6 DST golden above, and main returns the same value for that input. CI (croniter<3) is 85 pass / 12 skipped.

  • Bot findings: GPT's function-local execution_context imports in identity.py are a true observation but not a defect. resolve_cron_memory and bind_cron_memory are AST-identical to main's versions, which import the same way, and hoisting the imports would change import-time behaviour. The author's rebuttal holds. The CodeQL clear-text-logging alerts are on unchanged logger.info(... job_id) lines that are also open on main.

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I checked this at head 593fdfe7556c. The full evidence is in my review comment above.

The cron_service owners import the kiro_crew.cron facade lazily for every name a test patches (execution.py:143, fields.py:151, folders.py:32, model.py:300), so no patch becomes a silent no-op. An AST comparison of all 79 old definitions found 63 identical and 16 changed only by that indirection. Jitter, skip_dates, timezone, one-shot deletion, the store's locking and the next-run/missed-run logic are text-identical to main. Mutations confirm the tests cover this: an owner reading a patched name directly turned 5 tests red, and removing the claim-fence check turned 3 red. One 🟢 note, not blocking: one schedule golden depends on the installed croniter version.

@bolichen97
bolichen97 merged commit 655b89f into main Sep 29, 2026
102 of 103 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants