Commit 7e2e196
Add s.date schema helper for ISO 8601 date strings
Motivated by sample-run analysis (samples 36–40): sample 37
(git-author-stats) uses plain s.string for firstCommit/lastCommit date
fields. A dedicated s.date helper (format:"date", validated as
YYYY-MM-DD) makes the intent explicit and catches non-conforming
strings before they reach repair turns.
Changes:
- Add s.date to the s.* helpers: string schema with format:"date"
- Validate format:"date" in validateSchema with a clear YYYY-MM-DD
error message
- Update @file header comment to document the new helper
- Add 5 unit tests in src/rig.test.ts covering serialization,
acceptance, and rejection cases
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent fbc275d commit 7e2e196
2 files changed
Lines changed: 42 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
| 245 | + | |
244 | 246 | | |
245 | 247 | | |
246 | 248 | | |
| |||
2059 | 2061 | | |
2060 | 2062 | | |
2061 | 2063 | | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
2062 | 2069 | | |
2063 | 2070 | | |
2064 | 2071 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1466 | 1466 | | |
1467 | 1467 | | |
1468 | 1468 | | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
1469 | 1503 | | |
1470 | 1504 | | |
1471 | 1505 | | |
| |||
0 commit comments