docs: M5d-2 checklist: given-test lifetimes and cron AND
session_slot and the scheduler tests held a temporary JSON Value across statements (E0716). Cron now pins DOM and DOW as AND, which the given tests had not. Gate counts from task 04 on move up by one. Co-Authored-By: Grok 4.6 <noreply@x.ai>
This commit is contained in:
@@ -165,28 +165,29 @@ If `is_multiple_of` is not in scope on `u32` in this toolchain, use `value % n =
|
||||
target compiles.
|
||||
- [ ] **3. The module.** Write `cron.rs` from the skeleton. Add `pub mod cron;` to `lib.rs`
|
||||
where rustfmt will put it. `cargo check -p loopd` prints no error and no warning.
|
||||
- [ ] **4. The tests.** `cargo test -p loopd --test cron`: every test passes, 10 tests.
|
||||
- [ ] **4. The tests.** `cargo test -p loopd --test cron`: every test passes, 11 tests.
|
||||
- [ ] **5. Check.** `git diff --stat` lists `crates/loopd/src/cron.rs` and
|
||||
`crates/loopd/src/lib.rs`.
|
||||
- [ ] **6. Run the gate.** `cargo fmt --all`, then `make gate`, timeout 600000 ms. Last line
|
||||
`gate: ok`. Test count **1536** (1526 before, plus 10).
|
||||
`gate: ok`. Test count **1537** (1526 before, plus 11).
|
||||
- [ ] **7. Log and commit.** Task cell `M5d2/04-loopd-cron`. Stage with
|
||||
`git add crates/loopd docs/implementer-log.md Cargo.lock`, then commit as `AGENTS.md` says.
|
||||
|
||||
## Done when
|
||||
|
||||
- `make gate` prints `gate: ok` with 1536 tests.
|
||||
- `make gate` prints `gate: ok` with 1537 tests.
|
||||
- `git diff HEAD~1 --stat` lists only `crates/loopd/src/cron.rs`, `crates/loopd/src/lib.rs`,
|
||||
`crates/loopd/tests/cron.rs` and the log.
|
||||
|
||||
## Stop and report if
|
||||
|
||||
- The branch check fails; step 2 differs; `cargo check` warns; a test fails; the gate count is
|
||||
not 1536; you add a dependency; you treat DOM and DOW as OR; you accept `@daily` or a sixth
|
||||
not 1537; you add a dependency; you treat DOM and DOW as OR; you accept `@daily` or a sixth
|
||||
field; `cron.rs` exceeds 500 lines.
|
||||
|
||||
## What the given tests pin
|
||||
|
||||
`0 7 * * *` matches that minute only; `* * * * *` matches; `*/5` is multiples from 0; `0-10`
|
||||
is inclusive; Sunday is 0 on 2026-10-04; the 1st of the month; four or six fields error;
|
||||
is inclusive; Sunday is 0 on 2026-10-04; the 1st of the month; DOM and DOW are AND
|
||||
(`0 7 1 * 0` matches 2026-11-01, not 2026-10-04 or 2026-10-01); four or six fields error;
|
||||
minute 60, hour 24, DOW 7 error; `@daily` errors; `Display` names the schedule.
|
||||
|
||||
Reference in New Issue
Block a user