← Belső rendszer fejlesztők adatlapja

Skill · 1.0.0 verzió

Idő- és ütemezési tulajdonságok

Szabályozott órával vizsgál időfüggő szabályokat, lejárati és időzóna-szélső esetekkel.

time-scheduling-properties

Ezt a skillt használó csapattagok

Nézd meg, miben segít

Mikor hasznos?

Akkor használd, ha hónapvégén vagy óraátállításkor hibázik az előfizetés vagy ütemezés.

Miben segít neked?

  • Elválasztja az eltelt időt az időzónás naptári számítástól.
  • Pontos határidőt, szökőnapot és ismétlődő helyi órát generál.
  • Várakozás nélkül ellenőrzi a ciklusok folytonosságát és késői eseményt.

Például ezt kérheted

Teszteld a január 31-i havi megújítást és budapesti óraátállításkori hozzáférés-lejáratot vezérelt órával. Vezérelt órát léptess a lejárat pillanatára és közvetlenül utána. Valós várakozás nélkül ellenőrizd mindkét oldalon a megállapodott jogosultságot.

Részletes dokumentáció

Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.

Részletek…Összecsukás

Time & Scheduling Properties

Use this skill when testing logic that depends on timestamps, durations, expirations, billing cycles, renewal dates, grace periods, rate-limit windows, or timezone conversions.

Controlled Clock Discipline

  1. Never Rely on Wall-Clock sleep in Property Tests:
    • Inject an explicit clock interface (Clock / now()) or deterministic virtual timer so generated time jumps (advanceBy(ms), setTime(instant)) execute instantaneously and reproducibly.
  2. Separate Instant (UTC) from Calendar Arithmetic (ZonedDateTime):
    • Expirations, token TTLs, and rate-limit windows operate on monotonic elapsed instants.
    • Monthly billing anchors, daily report cutoffs, and business-hour SLAs operate on timezone-aware calendar dates.

Adversarial Temporal Generators

Weight timestamp and calendar generators to hit notorious temporal boundaries:

  • Exact Boundary Instants: $t = \text{expires_at} - 1\text{ ms}$, $t = \text{expires_at}$, $t = \text{expires_at} + 1\text{ ms}$.
  • Calendar Rollovers: Month-end anchoring from Jan 29/30/31 into February (both leap years like 2024-02-29 and non-leap years like 2025-02-28), quarter ends, and year boundaries (Dec 31 23:59:59.999Z).
  • Daylight Saving Time (DST) Transitions:
    • Spring-forward missing local hour (e.g., 02:00–02:59 in Europe/Budapest or America/New_York).
    • Fall-back repeated local hour where the same local wall time occurs twice with different UTC offsets.
  • Out-of-Order & Skewed Event Timestamps: Events arriving with occurred_at < processed_at or slight clock skew between nodes.

Core Temporal Invariants

  • Strict Expiry Cutoffs: Once the clock advances past expires_at (and any documented grace window), expired tokens, delegations, reservations, or promotional credits must never be accepted, even if an earlier check cached their validity.
  • Non-Overlapping & Gap-Free Billing Cycles: For any sequence of subscription renewals or usage windows $[t_0, t_1), [t_1, t_2), \dots, [t_{k-1}, t_k)$, adjacent periods must meet at the exact boundary ($t_i = t_i$) with zero double-billed overlap and zero unbilled gap.
  • Idempotent Scheduled Sweeps: Running an expiration, dunning, or accrual cron job multiple times at the same timestamp $t$ or across fine-grained vs. coarse-grained clock steps must produce the exact same state as running it once.

Checklist

  • Does the test drive time through an injected or virtual clock rather than real wall-clock delays?
  • Are exact boundary instants ($\text{cutoff} - 1$, $\text{cutoff}$, $\text{cutoff} + 1$), leap years, month-end rollovers (31 -> 28/29), and DST transitions generated?
  • Are recurring periods verified to be contiguous (no gaps and no overlaps)?
  • Are scheduled background sweeps verified to be idempotent when triggered repeatedly at or after the deadline?

Csomagban lévő fájlok 1

  • SKILL.md