← Zurück zu ERP-Systembauer
Entdecke, wie der Skill hilft
Zeit- und Planungseigenschaften
Testet zeitabhängige Regeln mit kontrollierten Uhren und gezielten Kalender-, Ablauf- und Zeitzonenfällen.
time-scheduling-properties
Teammitglieder mit diesem Skill
Wann ist der Skill hilfreich?
Nutze diesen Skill bei Monatsende- oder Zeitumstellungsfehlern in Abos und Planung.
Wobei hilft er dir?
- Trennt verstrichene Dauer von zeitzonenbezogener Kalenderrechnung.
- Generiert genaue Grenzen, Schalttage sowie fehlende oder doppelte Ortsstunden.
- Prüft lückenlose Zyklen und verspätete Ereignisse ohne reale Wartezeiten.
Das könntest du fragen
Teste Monatsverlängerung ab 31. Januar und Zugangsablauf bei Budapester Zeitumstellung mit deterministischen Uhren. Setze die kontrollierte Uhr genau auf Ablauf und unmittelbar danach. Prüfe die vereinbarte Berechtigung beidseits der Grenze ohne echte Wartezeit.
Ausführliche Dokumentation
Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.
Weniger anzeigen
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
- Never Rely on Wall-Clock
sleepin 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.
- Inject an explicit clock interface (
- 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-29and non-leap years like2025-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:59inEurope/BudapestorAmerica/New_York). - Fall-back repeated local hour where the same local wall time occurs twice with different UTC offsets.
- Spring-forward missing local hour (e.g.,
- Out-of-Order & Skewed Event Timestamps: Events arriving with
occurred_at < processed_ator 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?
Enthaltene Dateien 1
SKILL.md
