mirror of
https://github.com/stablyai/orca.git
synced 2026-10-23 08:03:39 +00:00
style: cut the new rationale comments to one line
AGENTS.md asks for concise non-obvious comments, one line where possible. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
Neil
co-authored by
Claude Opus 5
parent
d7581d1485
commit
e3110a095c
@@ -201,9 +201,7 @@ describe('automation schedules', () => {
|
||||
})
|
||||
|
||||
it('runs a bare start value with a step through the end of its field', () => {
|
||||
// Why: `5/15` is the shorthand every cron editor and Quartz read as
|
||||
// "from 5, every 15" — 5,20,35,50. Dropping the step silently turned it
|
||||
// into a single value, so the automation ran hourly instead.
|
||||
// Why: `5/15` means 5,20,35,50; dropping the step made the automation hourly.
|
||||
const anchor = new Date('2026-05-01T00:00:00').getTime()
|
||||
const runs: number[] = []
|
||||
let cursor = anchor
|
||||
|
||||
@@ -150,10 +150,7 @@ function parseCronField(args: {
|
||||
end = parseCronNumber(endPart, args.names ?? null, args.field)
|
||||
} else {
|
||||
start = parseCronNumber(rangePart, args.names ?? null, args.field)
|
||||
// Why: `5/15` is the shorthand for `5-<max>/15` that Quartz and every cron
|
||||
// editor read as "from 5, every 15". Ending at `start` kept the value and
|
||||
// dropped the step, which no cron dialect does — the automation then ran
|
||||
// once per field cycle instead of on the interval the user wrote.
|
||||
// Why: `5/15` is the `5-<max>/15` shorthand; ending at `start` dropped the step.
|
||||
end = stepPart === undefined ? start : args.max
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user