Revise PR #317: the durable-cron test passes with do_fire deleted, and the helper is still a reimplementation with the wrong times - #323
Conversation
…ewline, one helper in scripts
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Warning Review limit reached
Next review available in: 12 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| raise SystemExit( | ||
| "FAIL: could not read the crontab (`crontab -l` exited " | ||
| f"{proc.returncode}: {proc.stderr.strip() or 'no stderr'}).\n" | ||
| f"Running as user: {getpass.getuser()!r}." |
There was a problem hiding this comment.
[CRITICAL]: getpass is used but never imported
getpass.getuser() is called on lines 82 and 98, but getpass is not in the import block. When crontab -l or crontab - fails, this raises NameError before the intended SystemExit can be raised, masking the real error.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| output = proc.stdout + proc.stderr | ||
| # The log-fallback writes to ~/.taos-team/resume_fire.log | ||
| log_path = str(Path.home() / ".taos-team" / "resume_fire.log") | ||
| log_marker = "fired" in Path(log_path).read_text() if Path(log_path).exists() else False |
There was a problem hiding this comment.
[WARNING]: Test reads from ~/.taos-team/resume_fire.log without ensuring a clean state
On line 254, the test checks for "fired" in the log file. If a previous test run or invocation left a "fired" entry in the log, this test could pass even when the current subprocess invocation doesn't actually write to the log, producing a false positive.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (3 files)
Fix these issues in Kilo Cloud Reviewed by step-3.7-flash · Input: 84.7K · Output: 9.9K · Cached: 382.5K |
Review: BLOCKED
The single commit I did not take the branch identity as sufficient on its own. Every blocker was re-measured on this tree, not inherited from the previous review. A. Still a 142-line reimplementation, and still the wrong shapeSame reset time into both, derive only:
B. The one required test still has zero coverage
log_path = str(Path.home() / ".taos-team" / "resume_fire.log")
log_marker = "fired" in Path(log_path).read_text() if Path(log_path).exists() else False
record_exists = "[RESUME DUE]" in output or log_markerMeasured on this box just now: that log holds 24 lines, all 24 containing "fired". The right side of the C. Still bare
|
…and sandbox every do_fire test (#337) Fifth attempt on the chain tsk-ehwpsg -> tsk-tizzua -> tsk-5rpuw5 -> tsk-7xt72j -> tsk-y62mpe, and the first to revise anything: diff against the predecessor branch exec/tsk-7xt72j is 38 files / +3950 -447, where #323's was empty. Blockers A-E from tsk-y62mpe, each re-measured: A. scripts/resume_arm_time.py is now the 752-line canonical helper. On reset 2026-08-18T05:00:00.310776+00:00 it emits 7 5 18 8 * and 17 5 18 8 * (date-pinned one-shots), byte-identical to the canonical ~/.taos-fleet-tools copy (md5 7c54e86e) and matching the live armed crons. B. test_do_fire_runs_as_subprocess asserts the exact armed_at token rather than the bare word "fired", reads the log from a redirected HOME, and invokes /usr/bin/python3 rather than sys.executable. C. Both emitted cron lines name /usr/bin/python3 explicitly; no bare python3 outside the shebang. D. All four do_fire callers are sandboxed behind a fake crontab on PATH and HOME redirected to tmp_path. The shim reads stdin raw, avoiding the $(cat) trap that bit this chain twice. E. getpass is imported. Red-first, proven independently: the new test file copied UNCHANGED onto the blocked tree exec/tsk-7xt72j (md5 308be4d9 identical on both) gives 7 failed, against 7 passed here. Every blocker has a test that goes red on the unfixed code. Suite on the trial merge: 1550 passed, 12 skipped. Baseline 1543 plus exactly the 7 new tests, reconciled against what the diff touched. All three gates clean, no conflict markers. Known limitation, carded as tsk-bse2el and not fixed here: the helper hardcodes /home/jay/.taos-fleet-tools/resume_arm_time.py at lines 506, 507 and 542, pinned by the test at 143-144, so the merged repo copy emits crontab lines invoking a file outside the repo. It is the first /home/jay under scripts/ (master has none); scripts/ is not packaged, since pyproject scopes packaging to include = ["taosmd*"]. The ~/.taos-team symlink is deliberately left pointing at the fleet-tools copy until that is fixed, so the symlink and the emitted crontab lines cannot disagree. Review: #337 (comment)
CARD TITLE (intent, not commit subject): Revise PR #317: the durable-cron test passes with do_fire deleted, and the helper is still a reimplementation with the wrong times
Autonomous build of board card tsk-7xt72j.
Files:
scripts/check_deleted_symbols.py | 142 +-------
scripts/normalise_handle_gate.py | 120 ++-----
scripts/resume_arm_time.py | 143 ++++++++
tests/test_a2a.py | 2 +-
tests/test_deleted_symbols.py | 360 ---------------------
tests/test_normalise_handle_gate.py | 291 +++++------------
tests/test_resume_arm_time.py | 263 +++++++++++++++
14 files changed, 529 insertions(+), 837 deletions(-)