okf-kit 0.12.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,132 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.14.0] - 2026-09-20
11
+
12
+ ### Changed
13
+
14
+ - `sources-fresh`'s re-stamp direction check (`compareRestampDirection`,
15
+ D-013) is now judged by `parseTimestampInstantMs` (D-016) instead of a
16
+ bare `Date.parse` fallback for a designator-less value; see the Fixed
17
+ entry below. This can turn an existing `--strict` run red: a
18
+ designator-less backwards re-stamp that previously passed silently is
19
+ now reported (`re-stamp moved backwards`).
20
+
21
+ ### Fixed
22
+
23
+ - `sources-fresh` treats a frontmatter `timestamp` string with no UTC
24
+ designator (`Z`) or numeric offset (e.g. `2026-09-17T07:36:36`)
25
+ consistently and timezone-invariantly across BOTH of its comparisons
26
+ (D-016). Previously the two comparisons disagreed: the re-stamp
27
+ direction check (`compareRestampDirection`) fell back to an
28
+ any-textual-change escape hatch for such a value (a genuine backwards
29
+ re-stamp between two designator-less timestamps silently passed as an
30
+ ordinary re-stamp), while the day-wide staleness comparison
31
+ (`getTimestampEpoch`) parsed it with `Date.parse` in the machine's
32
+ local timezone (the same repository content could read STALE on one
33
+ runner and clean on another, hours apart). Both now go through one
34
+ UTC-forcing parse (`parseTimestampInstantMs` in `src/util.ts`, shared
35
+ by `getTimestampEpoch` and `getTimestampEpochMs`): a designator-less
36
+ value is treated as UTC everywhere `sources-fresh` reads a `timestamp`
37
+ (Treatment A of the two considered, see the measurement below), so a
38
+ backwards designator-less re-stamp is now reported (`re-stamp moved
39
+ backwards`) exactly like a `Z`-suffixed one, and the day-wide
40
+ comparison no longer depends on `TZ`. D-016 supersedes D-013 for
41
+ `sources-fresh`'s direction check (a native YAML date still takes the
42
+ `Date#getTime()` branch and is unaffected); `sources-fresh-future`'s
43
+ designator-less skip notice (D-013) is untouched, since its clock-skew
44
+ allowance is minutes wide, too narrow to safely absorb an hours-wide
45
+ timezone shift, so it keeps skipping a designator-less timestamp with a
46
+ notice rather than forcing UTC on it (see the README's "Designator-less
47
+ timestamps" section for why the two rules differ). `parseTimestampInstantMs`
48
+ also trims the raw `timestamp` string before parsing (needed so the `Z`
49
+ it appends for a designator-less value lands at the end, not after
50
+ trailing whitespace); as a side effect, a whitespace-padded value that
51
+ previously read as `staleness not assessable: no valid timestamp` is
52
+ now assessed by both `sources-fresh` and `sources-fresh-future` the
53
+ same as its untrimmed form. A native YAML date (`!!timestamp`, no raw
54
+ string, already resolved to a fixed UTC instant by the YAML parser) was
55
+ already timezone-invariant and is unaffected. New tests pin timezone
56
+ invariance under both `TZ=UTC` and `TZ=Asia/Tokyo` for the direction
57
+ check and, separately, for the day-wide comparison
58
+ (`test/cli-staleness.test.ts`, subprocess-based, following the existing
59
+ D-013 pattern), plus a committed-path unit pin (`test/sources-fresh.test.ts`),
60
+ unit-level UTC-forcing and trim pins for `getTimestampEpoch`/
61
+ `getTimestampEpochMs` (`test/util.test.ts`), and a padded-value pin for
62
+ `sources-fresh-future` (`test/sources-fresh-future.test.ts`).
63
+
64
+ Measured by running the built CLI (`dist/cli.js check`) over every real
65
+ `docs/okf` bundle in this repository (test fixtures under
66
+ `packages/okf-kit/test/fixtures/` excluded as synthetic) -- the only
67
+ one is `packages/orchestrator-workflow/docs/okf`, whose six docs'
68
+ frontmatter timestamps are all `Z`-suffixed already. Ran both plain
69
+ `check --json` and `check --json --require-anchors`, each under
70
+ `TZ=UTC` and `TZ=Asia/Tokyo`:
71
+
72
+ | Config | Treatment A (parse as UTC, chosen) | Treatment B (designator required) |
73
+ |---|---|---|
74
+ | `check`, `TZ=UTC` | 0 errors, 0 warnings, 0 notices | 0 errors, 0 warnings, 0 notices |
75
+ | `check`, `TZ=Asia/Tokyo` | 0 errors, 0 warnings, 0 notices | 0 errors, 0 warnings, 0 notices |
76
+ | `check --require-anchors`, `TZ=UTC` | 0 errors, 0 warnings, 0 notices | 0 errors, 0 warnings, 0 notices |
77
+ | `check --require-anchors`, `TZ=Asia/Tokyo` | 0 errors, 0 warnings, 0 notices | 0 errors, 0 warnings, 0 notices |
78
+
79
+ Identical under both treatments and both timezones: the only real
80
+ bundle in this repository has no designator-less stamp to treat
81
+ differently, so no existing bundle verdict flips either way; Treatment
82
+ A is adopted because it keeps `sources-fresh` a single rule answering
83
+ the same "did this move forward" question for every `timestamp` shape
84
+ it accepts, closing the backwards-move gap without a second finding
85
+ class for the same value.
86
+
87
+ ## [0.13.0] - 2026-09-17
88
+
89
+ ### Changed
90
+
91
+ - `sources-fresh`'s re-stamp escape hatch now requires the new frontmatter
92
+ `timestamp` value to be a strictly LATER instant than the value it
93
+ replaced, on both the committed path (`restampedByOwnLastCommit`) and the
94
+ `--dirty-as-now` working-tree path (`dirtyDocRestampVerdict`). A commit
95
+ (or working-tree edit) that moves the stamp BACKWARDS no longer counts as
96
+ a re-verification: the affected sources stay STALE, and the doc gets one
97
+ additional `re-stamp moved backwards: timestamp <prev-iso> -> <new-iso>
98
+ <where> is not a re-verification` warning naming both instants. A rewrite
99
+ to the same instant in a different raw spelling (`...00Z` to
100
+ `...00.000Z`) also no longer counts as a re-stamp, correcting a known
101
+ limitation the README previously documented the other way; that case gets
102
+ its own `re-stamp did not move the timestamp forward: <prev-raw> was
103
+ rewritten as <new-raw> <where>, but both name the same instant (<iso>),
104
+ so this is not a re-verification` notice (not a warning, so `--strict` is
105
+ unaffected), guarded once per doc the same way the backwards warning is.
106
+ An unchanged, byte-identical timestamp value still gets neither: it was
107
+ never a re-stamp attempt. The comparison reads both instants at
108
+ MILLISECOND resolution (a new `getTimestampEpochMs` helper in
109
+ `src/util.ts`, used only here), so two re-stamps less than a second apart
110
+ are not misread as the same instant. Direction is judged only where both
111
+ values name the same instant on every machine: a value that cannot be
112
+ parsed to an instant at all, or one spelled without a UTC designator
113
+ (`2026-01-01T13:00:00`, which `Date.parse` resolves in the machine's own
114
+ timezone), falls back to comparing the raw values' identity exactly as
115
+ before this direction rule existed, so no direction verdict, and no
116
+ `--strict` exit code arising from one, can depend on the runner's `TZ`;
117
+ that holds for either side of the comparison, the new value and the one
118
+ it replaced alike. The rule's day-wide staleness comparison still
119
+ resolves a designator-less stamp in local time, unchanged by this
120
+ release, and a native YAML date (`!!timestamp`) needs no designator and
121
+ is judged normally. Tracker: agent-dx task `ccdf051b`.
122
+
123
+ - CI: the agent-dx `okf-anchor-guard` job (`.github/workflows/ci.yml`) and
124
+ `okf-staleness` job (`.github/workflows/okf-staleness.yml`)'s "Install
125
+ okf-kit" step now probes the pinned version with `npm view
126
+ okf-kit@<pin> version`, confirms a failed probe with a second,
127
+ package-level `npm view okf-kit versions --json` probe before deciding
128
+ anything, then installs the published pin, builds
129
+ `packages/okf-kit` from the PR tree when the pin is confirmed
130
+ unpublished and equal to `packages/okf-kit/package.json`'s version, or
131
+ fails loudly otherwise. Previously the step installed the pinned
132
+ version unconditionally with no fallback. See
133
+ `packages/orchestrator-workflow/docs/okf/log.md` for the full behavior
134
+ and the design considered and rejected along the way.
135
+
10
136
  ## [0.12.1] - 2026-09-15
11
137
 
12
138
  - The npm tarball now ships a `LICENSE` file matching the repo root LICENSE
package/README.md CHANGED
@@ -76,7 +76,7 @@ Every template doc except `benchmark-template.md` ships with `sources: [path/to/
76
76
  | `links-resolve` | error | Markdown links to other `.md` files in the bundle must resolve to a real file. Relative targets resolve against the containing file's directory; targets starting with `/` resolve against the bundle root. A relative target that climbs out of the bundle directory (`../outside.md`) and still resolves on disk is accepted; the rule checks resolution, not containment. |
77
77
  | `no-absolute-links` | warning | Link targets should not start with `/`. GitHub resolves a leading slash against the repository root, not the bundle root, so an absolute link 404s once the bundle is viewed outside its own repository. Use a same-directory relative link instead. |
78
78
  | `sources-shape` | error | Frontmatter `sources`, when present, must be a non-empty array of non-empty strings. With a repo root (explicit or auto-detected), each listed path (file or directory) must also exist under it. |
79
- | `sources-fresh` | warning / notice | For docs with a `sources` list and a repo root, flags a source path whose last git commit is newer than both the doc's `timestamp` and the doc file's own last re-stamping commit (re-stamp decided by comparing frontmatter `timestamp` values across that commit's first-parent boundary). With `--dirty-as-now`, a source with an uncommitted change is judged as of right now instead of its last commit. See "Staleness (sources-fresh)" below. |
79
+ | `sources-fresh` | warning / notice | For docs with a `sources` list and a repo root, flags a source path whose last git commit is newer than both the doc's `timestamp` and the doc file's own last re-stamping commit (re-stamp decided by comparing frontmatter `timestamp` values, read as instants at millisecond resolution, across that commit's first-parent boundary: the new value must be strictly LATER, a backwards move is not a re-stamp and is separately reported as a warning, a rewrite to the same instant is separately reported as a notice). With `--dirty-as-now`, a source with an uncommitted change is judged as of right now instead of its last commit. See "Staleness (sources-fresh)" below. |
80
80
  | `sources-fresh-future` | warning | For the same docs as `sources-fresh`, flags a `timestamp` later than the doc file's own last commit by more than a clock-skew allowance (default 10 minutes, `--future-skew-minutes`). Catches a local wall-clock time mistakenly written with a `Z`/UTC suffix. See "Staleness (sources-fresh)" below. |
81
81
  | `citations-resolve` | warning / notice | For docs with a repo root, flags a `` `path:N`/`path:N-M` `` citation (and its `` `:N` ``/`` -`M` ``/`` (`N`) `` continuations, and bare paragraph-bound short forms `:N-M`/`(N-M)`) whose target file is missing, whose range is inverted or exceeds the file, or whose start line is blank or (for a non-markdown target) only a closing brace. A full citation may also carry an optional `#anchor` (e.g. `` `CHANGELOG.md:50-144#0.24.0` ``), checked against the target's own structure/content instead of just its line numbers. A backtick-delimited `` `path:#heading` `` citation (`.md` targets only) resolves to a whole Markdown section instead of a line range, immune to every line-number shift above it; see "Heading-section citations" below. A short-form citation's range into a test file is also checked for a describe/it block boundary. `--require-anchors` opts into five additional checks; see "Anchor strictness (opt-in, `--require-anchors`)" below. See "Citation resolution (citations-resolve)" below. |
82
82
  | `prose-line-references` | (opt-in, `--prose-line-references`) warning / notice | Off by default. Flags a prose-embedded line reference outside `citations-resolve`'s own backtick grammar (`line N`, `lines N-M`, `lines N to M`) that is drifted, unresolvable, or ambiguous once bound to the nearest named file. `--prose-line-references-strict` additionally flags every such reference as a formatting policy violation. See "Prose line references (opt-in, `--prose-line-references`)" below. |
@@ -91,13 +91,15 @@ Pass `--repo-root` explicitly to pin a specific root (useful in CI when the bund
91
91
 
92
92
  ## Staleness (sources-fresh)
93
93
 
94
- `sources-fresh` compares each frontmatter `sources` entry's last git commit time against the doc's `timestamp`, and additionally against the doc file's own last commit time: a source committed at or before the doc file's last commit is treated as fresh even when the frontmatter `timestamp` is older, PROVIDED that same commit actually re-stamped the doc. "Re-stamped" is decided by VALUE, not by diff text: okf-kit reads the doc's frontmatter at that commit and in the commit's first parent, parses both, and compares the `timestamp` values -- they differ, or the doc did not exist in the parent at all (it was created there), and it counts as re-stamped. The lookup follows a rename, so `git mv`ing a doc is not a creation, and it reads trees rather than a patch, so a merge commit (including the `refs/pull/N/merge` ref CI checks out) is assessed like any other commit. That keeps squash-merge PRs honest: when a doc re-stamp lands in the same commit as its changed sources, the merge gives every source a commit time later than any pre-merge `timestamp`, which used to make such docs stale-on-arrival. It does NOT extend to a commit that merely happens to also touch the doc file -- a typo fix, a co-committed prose edit, a repo-wide formatter run -- without rewriting the stamp: that commit carries no verification claim, so staleness stands. "Created" is trusted only in a genuinely unshallow repository: in a shallow clone (`git clone --depth`), a commit with an empty parent list can simply be the boundary history was grafted onto, not the doc's real first commit, so this case gets the same not-assessable notice as any other unanswerable re-stamp question rather than an assumed pass (see "CI usage" below for the `fetch-depth: 0` remedy). The rule never blocks a doc that has no `sources`, and it never invents an error where git can't give a real answer:
94
+ `sources-fresh` compares each frontmatter `sources` entry's last git commit time against the doc's `timestamp`, and additionally against the doc file's own last commit time: a source committed at or before the doc file's last commit is treated as fresh even when the frontmatter `timestamp` is older, PROVIDED that same commit actually re-stamped the doc. "Re-stamped" is decided by VALUE, not by diff text: okf-kit reads the doc's frontmatter at that commit and in the commit's first parent, parses both, and compares the `timestamp` VALUES as parsed instants, read at millisecond resolution -- the doc did not exist in the parent at all (it was created there), or the commit's value is strictly LATER than the parent's, and it counts as re-stamped. A value that moves to an EARLIER instant is not a re-stamp, and is additionally reported as its own warning (`re-stamp moved backwards`) naming the previous and new instants. A value that is actually REWRITTEN to the SAME instant in a different raw spelling (adding milliseconds that round to nothing, or switching between a quoted string and a native YAML date) is likewise not a re-stamp, and is additionally reported as its own notice naming both raw spellings; an unchanged value (the frontmatter timestamp is byte-identical across the commit, the common case for a co-committed body edit or formatter run) gets neither the warning nor the notice, since it was never a re-stamp attempt at all. Direction is judged whenever BOTH sides resolve to an instant at all, including a `timestamp` string with no UTC designator or numeric offset -- see **Designator-less timestamps** for how that value is made timezone-invariant; only a side that cannot be parsed to an instant at all takes a raw-identity fallback instead. The lookup follows a rename, so `git mv`ing a doc is not a creation, and it reads trees rather than a patch, so a merge commit (including the `refs/pull/N/merge` ref CI checks out) is assessed like any other commit. That keeps squash-merge PRs honest: when a doc re-stamp lands in the same commit as its changed sources, the merge gives every source a commit time later than any pre-merge `timestamp`, which used to make such docs stale-on-arrival. It does NOT extend to a commit that merely happens to also touch the doc file -- a typo fix, a co-committed prose edit, a repo-wide formatter run -- without moving the stamp strictly forward: that commit carries no verification claim, so staleness stands. "Created" is trusted only in a genuinely unshallow repository: in a shallow clone (`git clone --depth`), a commit with an empty parent list can simply be the boundary history was grafted onto, not the doc's real first commit, so this case gets the same not-assessable notice as any other unanswerable re-stamp question rather than an assumed pass (see "CI usage" below for the `fetch-depth: 0` remedy). The rule never blocks a doc that has no `sources`, and it never invents an error where git can't give a real answer:
95
95
 
96
96
  | Situation | Severity | Message |
97
97
  |-----------|----------|---------|
98
98
  | A source path's last commit is newer than the doc's `timestamp` and the doc file's last commit | warning | `STALE: <path> changed <iso> after doc timestamp <iso>` |
99
99
  | A source path's last commit is newer than the doc's `timestamp`, at/before the doc file's last commit, AND that commit re-stamped the doc | (nothing) | fresh: doc and source landed together with a real re-stamp (or the doc was committed later, or created there) |
100
100
  | A source path's last commit is newer than the doc's `timestamp`, at/before the doc file's last commit, but that commit did NOT re-stamp the doc | warning | `STALE: <path> changed <iso> after doc timestamp <iso>` (co-commit with no re-stamp is not an exception) |
101
+ | Same, but that commit (or, under `--dirty-as-now`, the working tree) moved the `timestamp` value BACKWARDS to an EARLIER instant (when both values resolve to an instant at all; see **Designator-less timestamps**) | warning (STALE) + warning (extra) | the same `STALE: ...` warning above, PLUS one `re-stamp moved backwards: timestamp <prev-iso> -> <new-iso> <where> is not a re-verification` warning per doc |
102
+ | Same, but that commit (or, under `--dirty-as-now`, the working tree) rewrote the `timestamp` value to the SAME instant in a different raw spelling | warning (STALE) + notice (extra) | the same `STALE: ...` warning above, PLUS one `re-stamp did not move the timestamp forward: <prev-raw> was rewritten as <new-raw> <where>, but both name the same instant (<iso>), so this is not a re-verification` notice per doc |
101
103
  | A source path's last commit is newer than the doc's `timestamp`, at/before the doc file's last commit, and git could not be asked whether that commit re-stamped the doc | notice | `staleness not assessable: git could not read the doc's own last commit to decide whether it re-stamped the doc` (once per doc, never a STALE warning and never a silent pass) |
102
104
  | Same, but the repository is a shallow clone and the doc's last commit is the grafted history boundary (an empty parent list that is not really a root commit) | notice | `staleness not assessable: this is a shallow clone ... use fetch-depth: 0 ... to assess it` (once per doc) |
103
105
  | A source path exists but has no git history (untracked) | notice | `untracked by git, staleness unknown: <path>` |
@@ -109,15 +111,17 @@ STALE findings are warnings, so they are advisory by default; run with `--strict
109
111
 
110
112
  Known limitation: a `git log` call that fails for a reason other than "no history for this path" (for example a corrupt object or a transient git error) is reported the same way as a genuinely untracked path, the `untracked by git, staleness unknown` notice; okf-kit does not currently distinguish a real git failure from "no commits touch this path".
111
113
 
112
- Known limitation: the doc-commit comparison suppresses staleness for every source older than the doc file's last re-stamping commit, not only for sources from the same commit -- provided that commit is the one that rewrote the stamp. For a multi-source doc that means a re-stamp silences drift on every source changed before it, even ones that specific re-stamp did not itself verify. The frontmatter `timestamp` still governs sources changed after the doc's last commit. Also note: the check only looks at WHETHER the `timestamp` value changed, never at whether the new value is itself correct -- a hand-typed or deliberately backdated stamp still counts as a re-stamp (`sources-fresh-future` is the rule that catches an implausible value). "Changed" means the parsed frontmatter VALUE changed: a rewrite to the same instant in another representation (`...00Z` to `...00.000Z`) still counts as a re-stamp, since the raw string differs even though it names the same instant, while adding or removing quotes around an otherwise-unchanged value does NOT count, since YAML parsing already normalizes those away before the comparison ever sees them. And the comparison is against the FIRST parent only: a merge that takes the doc wholesale from its second parent is judged against the first-parent baseline, which is the baseline the pull request under review is measured against anyway.
114
+ Known limitation: the doc-commit comparison suppresses staleness for every source older than the doc file's last re-stamping commit, not only for sources from the same commit -- provided that commit is the one that moved the stamp strictly forward. For a multi-source doc that means a re-stamp silences drift on every source changed before it, even ones that specific re-stamp did not itself verify. The frontmatter `timestamp` still governs sources changed after the doc's last commit. Also note: the check only looks at WHETHER the `timestamp` value moved to a strictly LATER instant, never at whether the new value is itself plausible -- a hand-typed FORWARD-dated stamp still counts as a re-stamp (`sources-fresh-future` is the rule that catches an implausible future value), while a stamp moved BACKWARDS never does (it stays STALE and gets its own `re-stamp moved backwards` warning, see the table above), however the value was written. "Moved forward" means the parsed frontmatter VALUE, read as an instant at MILLISECOND resolution, is strictly greater: a rewrite to the same instant in another spelling (`...00Z` to `...00.000Z`) is neither forward nor backward, so it does NOT count as a re-stamp even though the raw string differs -- that case gets its own notice (see the table above), while an unchanged value gets neither. Adding or removing quotes around an otherwise-unchanged value likewise counts as neither, and never triggers the notice, since YAML parsing already normalizes those away before the comparison ever sees them. And the comparison is against the FIRST parent only: a merge that takes the doc wholesale from its second parent is judged against the first-parent baseline, which is the baseline the pull request under review is measured against anyway.
115
+
116
+ **Designator-less timestamps** (the one description of this handling; everything else in this README points here). A `timestamp` string spelled without a UTC designator (`Z`) or a numeric offset (`2026-01-01T13:00:00`) is, read raw, ambiguous: `Date.parse` resolves it in the MACHINE'S own timezone, so the identical repository content would read as one instant on a UTC runner and a different one on a UTC+9 laptop. `sources-fresh` closes that ambiguity by treating such a value as UTC EVERYWHERE it looks at a `timestamp`: in its own day-wide staleness comparison above (the plain `commitEpoch > timestampEpoch` check) just as much as in the re-stamp direction comparison this section is about. This applies to whichever side carries the ambiguity, the new value or the one it replaced, and it means a designator-less value is now judged for direction like any other value -- a backwards move is reported (`re-stamp moved backwards`) exactly as it would be for a `Z`-suffixed pair, it no longer passes silently. A numeric offset (`+02:00`) is unambiguous and parsed as itself, and so is a native YAML date (`!!timestamp`), which carries no designator because it needs none: the parser already resolved it to a fixed instant (YAML 1.1: a zone-less `!!timestamp` is UTC, not local time). Only a value that cannot be parsed to an instant AT ALL (missing, blank, or a string `Date.parse` rejects even when trimmed of surrounding whitespace and with a `Z` appended; the raw value is trimmed before either rule reads it, so a whitespace-padded stamp is assessed exactly like its unpadded form) falls back to the pre-direction-rule behavior of asking only whether the raw value CHANGED -- any textual change counts as a re-stamp, and neither the backwards warning nor the same-instant notice can fire. `sources-fresh-future`'s clock-skew check makes a different call for the SAME ambiguity: its allowance is minutes wide, too narrow to safely absorb an hours-wide timezone shift, so it SKIPS a designator-less timestamp with a notice instead of forcing UTC on it (see that rule's table below) -- `sources-fresh`'s own thresholds are day-wide, wide enough that forcing UTC is both consistent and safe. See `parseTimestampInstantMs`'s doc comment in `src/util.ts` and `compareRestampDirection`'s in `src/rules/sources-fresh.ts` for the exact behavior.
113
117
 
114
118
  **Two-branch squash interaction:** the rule follows one decision procedure, never a catalog of merge shapes, and the procedure is what to read a squash-merge scenario against, not a list of named cases:
115
119
 
116
120
  1. **The doc's last commit.** `git log -1 -- <doc>` under git's default history simplification: a merge whose result for the doc path is identical to one of its parents is skipped, and the walk continues on that side to the real content-changing commit instead; only a merge that changed the doc against every parent is itself returned. The epoch lookup and the re-stamp check below both start from this same resolved commit.
117
121
  2. **The epoch gate.** A source whose own last commit is at or before the resolved doc commit is judged by step 3; a source committed after the resolved doc commit skips step 3 and is judged by the frontmatter `timestamp` alone: STALE whenever the source change also postdates that stamp (the normal case, since nothing the doc showed as of its last commit could reflect a change that had not happened yet), fresh in the rare case that the stamp itself is later than the source change, because the frontmatter comparison is the first thing the rule evaluates.
118
- 3. **The re-stamp check (`restampedByOwnLastCommit`).** Compare the resolved commit's parsed frontmatter `timestamp` VALUE against its value in that SAME commit's first parent (rename-aware); a difference, or the doc being created there, counts as re-stamped.
122
+ 3. **The re-stamp check (`restampedByOwnLastCommit`).** Compare the resolved commit's parsed frontmatter `timestamp` VALUE against its value in that SAME commit's first parent (rename-aware); a value strictly LATER than the parent's, or the doc being created there, counts as re-stamped -- an earlier or equal value does not.
119
123
 
120
- One sentence for the outcome: a source reads fresh when its own last commit is at or before the doc's resolved last commit and that commit re-stamped the value, or when the source's own last commit is at or before the frontmatter `timestamp`; every other assessable case is STALE (the notice outcomes in the table above are neither fresh nor STALE).
124
+ One sentence for the outcome: a source reads fresh when its own last commit is at or before the doc's resolved last commit and that commit moved the `timestamp` value strictly forward (or created the doc), or when the source's own last commit is at or before the frontmatter `timestamp`; every other assessable case is STALE, including a backwards or same-instant "re-stamp" (the not-assessable and no-valid-timestamp notices are neither fresh nor STALE; the backwards warning and the same-instant notice accompany a STALE verdict, they do not replace it).
121
125
 
122
126
  The one consequence that follows for a branch merging a trunk carrying a squash: the squash re-dates every source it touched to the merge instant, and steps 1-3 can only ever see the MERGING branch's own resolved doc commit, never the trunk's route to that squash. So after such a merge, a clean verdict is not evidence the branch's doc was verified against the re-dated source (the known limitation above already says a re-stamp silences drift on sources it never itself checked, and step 3 only asks whether the value moved, never what it verified); a STALE verdict means the branch's resolved doc commit is older than the re-dated source, or newer but carrying no re-stamp of its own. Which of the two the rule reports depends only on where the branch's resolved doc commit falls relative to the squash (steps 1 and 2), never on who edited what:
123
127
 
@@ -136,7 +140,7 @@ The one consequence that follows for a branch merging a trunk carrying a squash:
136
140
 
137
141
  Three smaller behaviors worth knowing. A `sources` entry spelled `.` or `./` (the repo root itself) is dirty whenever ANY path in the work tree is dirty -- it is matched by containment, since `git status` never reports the root as an entry of its own. `--repo-root` may name a SUBDIRECTORY of the repository: `git status` reports dirty paths relative to the repository's top level, and `git show <rev>:<path>` reads a blob by a top-level-relative path too, so the rule respells every path it hands to either (via `git rev-parse --show-prefix`, read once per run) before matching a dirty path or reading a doc's committed value; dirty-path detection and both re-stamp rescues (the working-tree one here and the committed co-commit one above) then behave under a subdirectory root exactly as under the top level, and a same-named doc at the top level is never read in the subdirectory doc's place. And if git cannot be read at all (`status` failing, output past the cap, git missing), `check` emits one bundle-level `sources-fresh` notice reading "`--dirty-as-now` not applied: git status could not be read, judging by committed history only", and both rules fall back to committed history; the flag never reports a silent all-clear it did not actually verify.
138
142
 
139
- The flag also carries a working-tree analogue of the doc-commit re-stamp rescue described above, evaluated against that same virtual commit: a doc re-stamped LOCALLY (its on-disk frontmatter `timestamp` value differs from the value committed at `HEAD` -- a change in EITHER direction, including a backwards move, counts -- and the doc file itself is dirty; an untracked doc counts as re-stamped too, the working-tree equivalent of "the doc being created there") rescues a dirty source exactly like a real re-stamp landing in the same commit does. Without this, bumping a doc's `timestamp` locally and re-running `check --dirty-as-now` could still report STALE, purely because a few seconds pass between writing the new timestamp and running the check -- defeating the point of the recommended invocation below. A doc that is dirty for some OTHER reason (a body edit that leaves the `timestamp` value unchanged) is not rescued: that case still reports STALE, same as before. Reading the doc's committed value distinguishes a genuinely untracked doc (no entry for it at `HEAD` at all -- always a re-stamp) from a real git failure reading an EXISTING `HEAD` blob (a corrupt object, an unreadable blob): only the former is treated as "created"; the latter falls through to the ordinary `staleness not assessable` notice instead of being silently guessed either way.
143
+ The flag also carries a working-tree analogue of the doc-commit re-stamp rescue described above, evaluated against that same virtual commit: a doc re-stamped LOCALLY rescues a dirty source exactly like a real re-stamp landing in the same commit does, judged by the SAME direction rule: the on-disk frontmatter `timestamp` value must be a strictly LATER instant, at millisecond resolution, than the value committed at `HEAD`, and the doc file itself must be dirty for any of this to apply. A backwards move does not count and gets one `re-stamp moved backwards` warning naming the previous and new instants (the source stays STALE); a rewrite to the same instant in a different raw spelling does not count either and gets one `did not move the timestamp forward` notice instead (also STALE); an untracked doc counts as re-stamped, the working-tree equivalent of "the doc being created there". Without the rescue itself, bumping a doc's `timestamp` locally and re-running `check --dirty-as-now` could still report STALE, purely because a few seconds pass between writing the new timestamp and running the check -- defeating the point of the recommended invocation below. A doc that is dirty for some OTHER reason (a body edit that leaves the `timestamp` value unchanged) is not rescued: that case still reports STALE, same as before. Reading the doc's committed value distinguishes a genuinely untracked doc (no entry for it at `HEAD` at all -- always a re-stamp) from a real git failure reading an EXISTING `HEAD` blob (a corrupt object, an unreadable blob): only the former is treated as "created"; the latter falls through to the ordinary `staleness not assessable` notice instead of being silently guessed either way.
140
144
 
141
145
  **Recommended pre-commit invocation**, matching the "re-verify, bump `timestamp`, then commit" discipline above -- run this on the working tree BEFORE committing an edit to any file a bundle lists as a `sources` entry, so a doc that needs re-stamping is caught before the commit that would otherwise make it stale in CI:
142
146
 
@@ -154,7 +158,8 @@ If it reports a doc STALE, re-verify that doc against its current `sources` and
154
158
  | Source edited, doc left alone (not re-stamped) | exit 1, `sources-fresh` STALE |
155
159
  | Source edit and doc re-stamp committed TOGETHER, flag OFF | exit 0, clean (the committed-history co-commit rescue, unaffected by this flag) |
156
160
  | Doc dirty for an unrelated reason (a body edit, `timestamp` value unchanged), source edited | exit 1, `sources-fresh` STALE -- not rescued |
157
- | Doc re-stamped on disk to a value BEFORE the one committed at `HEAD` (a backwards move), source edited | exit 0, clean -- still counts as a re-stamp (see above) |
161
+ | Doc re-stamped on disk to a value BEFORE the one committed at `HEAD` (a backwards move), source edited (when both values resolve to an instant at all; see **Designator-less timestamps** under "Staleness (sources-fresh)") | exit 1, `sources-fresh` STALE, PLUS one `re-stamp moved backwards: timestamp <prev-iso> -> <new-iso> in the working tree is not a re-verification` warning -- a backwards move is NOT a re-verification (see above) |
162
+ | Doc re-stamped on disk to the SAME instant as the one committed at `HEAD`, just in a different raw spelling, source edited | exit 1, `sources-fresh` STALE, PLUS one `re-stamp did not move the timestamp forward: ...` notice -- a rewrite that never moves the instant is NOT a re-verification either (see above) |
158
163
  | Source edit committed ALONE, the doc's re-stamp left uncommitted in the working tree | exit 0, clean locally -- but CI is RED (`sources-fresh` STALE) until that re-stamp is committed too |
159
164
 
160
165
  That last row is the one shape where a clean local run does NOT imply a clean CI run, and it is inherent to the model rather than a gap to be fixed: the flag judges the content in YOUR WORKING TREE, while CI judges only what you actually pushed. Commit the source edit without its doc re-stamp and CI sees a source newer than the doc's committed `timestamp`, exactly as it should. The remedy is the one this section already recommends: commit the re-stamp, in the same commit as the source edit or its own.
@@ -182,7 +187,7 @@ The skew allowance defaults to 10 minutes (600 seconds), absorbing the ordinary
182
187
 
183
188
  **The measure-after-commit discipline both rules enforce:** re-verify the doc against its sources, THEN bump `timestamp` to the real instant of that verification (`new Date().toISOString()` or equivalent, never a hand-written value), THEN commit -- committing without re-stamping is what `sources-fresh` catches, and hand-writing a local time with a `Z` suffix it doesn't have is what `sources-fresh-future` catches.
184
189
 
185
- **Why the UTC-designator gate exists:** a bare local datetime string (no `Z`, no numeric offset) parses under `Date.parse` in the machine's OWN timezone, so the same frontmatter value would compare differently on a UTC+2 laptop than on a UTC CI runner -- unusable against a default allowance measured in minutes. A numeric offset (`+02:00`, `-0500`) is unambiguous and IS assessed normally (`Date.parse` already normalizes it to a real UTC instant); only a fully bare datetime is skipped. `sources-fresh`'s own thresholds are days wide, so this ambiguity doesn't practically matter there and the gate applies only to `sources-fresh-future`.
190
+ **Why a bare datetime is skipped here:** this rule's clock-skew allowance is minutes wide, too narrow to safely absorb the hours a timezone can shift a designator-less value by, so it skips such a value with a notice rather than guess. `sources-fresh` faces the identical ambiguity in its own comparisons and makes the opposite call: its thresholds are day-wide, so it forces UTC on a designator-less value instead of skipping it. See **Designator-less timestamps** under "Staleness (sources-fresh)" for the full rationale and why the two rules land on different responses to the same edge case.
186
191
 
187
192
  **What these two rules catch, precisely, and what they don't:** a source path committed after the doc's `timestamp` (`sources-fresh`'s base case); a source and the doc co-committed together where that commit did NOT re-stamp the doc (`sources-fresh`'s narrowed co-commit exception, see "Staleness (sources-fresh)" above); and a local wall-clock time hand-written with a `Z`/UTC suffix it doesn't actually have (`sources-fresh-future`). What they do NOT catch: a doc-only prose edit that leaves `sources` untouched and the `timestamp` stale -- neither rule has a source-side signal to compare against in that case, so it is not mechanically assessable and stays a reviewer judgment call, the same as before this pair of rules existed.
188
193
 
@@ -320,7 +325,7 @@ This is advisory: don't fail the build on warnings unless you pass `--strict`. U
320
325
  with:
321
326
  fetch-depth: 0
322
327
  - name: OKF bundle check
323
- run: npx okf-kit@0.12.1 check path/to/bundle
328
+ run: npx okf-kit@0.14.0 check path/to/bundle
324
329
  ```
325
330
 
326
331
  Pin the version: an unpinned `npx okf-kit` picks up new rules on their release day, which turns an unrelated PR red.
@@ -2,7 +2,7 @@ import fs from "node:fs";
2
2
  import path from "node:path";
3
3
  import { parseFrontmatter } from "../bundle.js";
4
4
  import { runGit as defaultRunGit } from "../git.js";
5
- import { getRawTimestampString, getTimestampEpoch, getTimestampIdentity, getValidSources, hasUtcDesignator, } from "../util.js";
5
+ import { getRawTimestampString, getTimestampEpoch, getTimestampEpochMs, getTimestampIdentity, getValidSources, hasUtcDesignator, } from "../util.js";
6
6
  const RULE_ID = "sources-fresh";
7
7
  const FUTURE_RULE_ID = "sources-fresh-future";
8
8
  /**
@@ -15,7 +15,7 @@ const FUTURE_RULE_ID = "sources-fresh-future";
15
15
  export const DEFAULT_FUTURE_SKEW_SECONDS = 600;
16
16
  export const sourcesFreshRule = {
17
17
  id: RULE_ID,
18
- description: "Frontmatter `sources` paths must not have a last-commit time newer than the doc's `timestamp`, unless the doc's own last commit lands at/after the source's and that same commit actually re-stamped the doc: the doc's parsed frontmatter `timestamp` VALUE at that commit differs from its value in the commit's first parent (rename-aware; creating the doc counts as re-stamping it). Creation is trusted only in a genuinely unshallow repository: in a shallow clone, a commit with no parents can simply be where history was cut off, not a real root commit, so it gets the same `not assessable` notice instead of being assumed created. When git cannot answer the question at all, the doc gets a `not assessable` notice instead of either a STALE warning or a silent pass.",
18
+ description: "Frontmatter `sources` paths must not have a last-commit time newer than the doc's `timestamp`, unless the doc's own last commit lands at/after the source's and that same commit actually re-stamped the doc: the doc's parsed frontmatter `timestamp` VALUE at that commit is strictly LATER than its value in the commit's first parent (rename-aware; creating the doc counts as re-stamping it). A commit that moves the stamp BACKWARDS is not a re-stamp: the affected sources stay STALE, and the doc additionally gets a `re-stamp moved backwards` warning naming the previous and new values. Creation is trusted only in a genuinely unshallow repository: in a shallow clone, a commit with no parents can simply be where history was cut off, not a real root commit, so it gets the same `not assessable` notice instead of being assumed created. When git cannot answer the question at all, the doc gets a `not assessable` notice instead of either a STALE warning or a silent pass.",
19
19
  run(ctx) {
20
20
  const findings = [];
21
21
  const docsWithSources = getDocsWithSources(ctx);
@@ -131,13 +131,18 @@ export const sourcesFreshRule = {
131
131
  return restampMemo;
132
132
  restampMemo =
133
133
  ctx.dirtyAsNow && isDirtyForShared(ctx, git, repoRoot, repoRelDocPath)
134
- ? dirtyDocRestampVerdict(git, repoRoot, repoRelDocPath, getTimestampIdentity(doc.frontmatter.parsed), showPrefixFor)
134
+ ? dirtyDocRestampVerdict(git, repoRoot, repoRelDocPath, doc.frontmatter.parsed, showPrefixFor)
135
135
  : restampedByOwnLastCommit(git, repoRoot, repoRelDocPath, () => isShallowRepoShared(ctx, git, repoRoot), showPrefixFor);
136
136
  return restampMemo;
137
137
  };
138
138
  // At most one "not assessable" notice per doc, however many of its
139
- // sources hit the unanswerable re-stamp question.
139
+ // sources hit the unanswerable re-stamp question. Likewise at most
140
+ // one "moved backwards" warning per doc, and at most one "same
141
+ // instant" notice per doc (D-009) -- see the isStale branch below --
142
+ // independent of each other and of the not-assessable notice.
140
143
  let notAssessableReported = false;
144
+ let backwardsReported = false;
145
+ let sameInstantReported = false;
141
146
  for (const source of sources) {
142
147
  // A missing path on disk is sources-shape's job to report; avoid a
143
148
  // duplicate/confusing finding here.
@@ -166,25 +171,60 @@ export const sourcesFreshRule = {
166
171
  // it fresh would be a silent pass.
167
172
  const docCommitEpoch = docCommitEpochFor();
168
173
  if (docCommitEpoch !== null && docCommitEpoch >= commitEpoch) {
169
- const verdict = restampFor();
170
- if (verdict === "restamped") {
174
+ const result = restampFor();
175
+ if (result.verdict === "restamped") {
171
176
  isStale = false;
172
177
  }
173
- else if (verdict === "unknown" ||
174
- verdict === "unknown-shallow-root") {
178
+ else if (result.verdict === "unknown" ||
179
+ result.verdict === "unknown-shallow-root") {
175
180
  if (!notAssessableReported) {
176
181
  notAssessableReported = true;
177
182
  findings.push({
178
183
  ruleId: RULE_ID,
179
184
  severity: "notice",
180
185
  file: doc.relPath,
181
- message: verdict === "unknown-shallow-root"
186
+ message: result.verdict === "unknown-shallow-root"
182
187
  ? "staleness not assessable: this is a shallow clone (`git clone --depth`), so git cannot tell whether the doc's earliest available commit really created it or is just where history was cut off -- use `fetch-depth: 0` (or an unshallow checkout) to assess it"
183
188
  : "staleness not assessable: git could not read the doc's own last commit to decide whether it re-stamped the doc",
184
189
  });
185
190
  }
186
191
  continue;
187
192
  }
193
+ else if (result.backwards && !backwardsReported) {
194
+ // Not restamped (isStale stays true, reported as the usual
195
+ // STALE warning below), PLUS one extra warning per doc
196
+ // naming the doc and both instants: a backwards move is not
197
+ // a re-verification and must not blend silently into the
198
+ // ordinary STALE wording (AC-002).
199
+ backwardsReported = true;
200
+ const locationPhrase = result.backwards.location === "working-tree"
201
+ ? "in the working tree"
202
+ : "in the doc's last commit";
203
+ findings.push({
204
+ ruleId: RULE_ID,
205
+ severity: "warning",
206
+ file: doc.relPath,
207
+ message: `re-stamp moved backwards: timestamp ${result.backwards.previousIso} -> ${result.backwards.newIso} ${locationPhrase} is not a re-verification`,
208
+ });
209
+ }
210
+ else if (result.sameInstant && !sameInstantReported) {
211
+ // Not restamped (isStale stays true, reported as the usual
212
+ // STALE warning below), PLUS one extra NOTICE per doc: the
213
+ // value was rewritten but never moved forward, so it carries
214
+ // no verification claim either, but it is not a mistake in
215
+ // the same sense a backwards move is -- a notice, not a
216
+ // warning, so --strict is unaffected (D-009).
217
+ sameInstantReported = true;
218
+ const rewriteLocationPhrase = result.sameInstant.location === "working-tree"
219
+ ? "in the working tree"
220
+ : "in the doc's last commit";
221
+ findings.push({
222
+ ruleId: RULE_ID,
223
+ severity: "notice",
224
+ file: doc.relPath,
225
+ message: `re-stamp did not move the timestamp forward: ${result.sameInstant.previousValue} was rewritten as ${result.sameInstant.newValue} ${rewriteLocationPhrase}, but both name the same instant (${result.sameInstant.instantIso}), so this is not a re-verification`,
226
+ });
227
+ }
188
228
  }
189
229
  }
190
230
  if (isStale) {
@@ -577,13 +617,14 @@ function commitEpochWithDirtyAsNow(ctx, git, repoRoot, relPath, actualEpoch) {
577
617
  * `restampedByOwnLastCommit`'s co-commit check, used in its place (see
578
618
  * `restampFor` in the rule above) whenever the doc itself is dirty. The
579
619
  * virtual commit's implicit "first parent" is simply HEAD, so this compares
580
- * the doc's CURRENT (working-tree) parsed `timestamp` identity -- already
581
- * read from disk by the caller, since `BundleDoc` always reflects the
582
- * working tree, dirty or not -- against the value committed at HEAD for the
583
- * same path. Any change of value, in EITHER direction (including a
584
- * backwards re-stamp), counts as re-stamped, mirroring the committed
585
- * rescue's "changed, not corrected" semantics documented on
586
- * `restampedByOwnLastCommit` below.
620
+ * the doc's CURRENT (working-tree) parsed `timestamp` value -- already read
621
+ * from disk by the caller, since `BundleDoc` always reflects the working
622
+ * tree, dirty or not -- against the value committed at HEAD for the same
623
+ * path. Per D-004, only a value that moves STRICTLY LATER than the one
624
+ * committed at HEAD counts as re-stamped; a backwards move is
625
+ * `not-restamped` and flagged via `compareRestampDirection`'s `backwards`
626
+ * field (`location: "working-tree"`), mirroring the committed rescue's
627
+ * direction rule documented on `restampedByOwnLastCommit` below.
587
628
  *
588
629
  * Distinguishes a genuinely untracked/new doc (no entry for this path at
589
630
  * HEAD at all -- `git ls-tree HEAD -- <path>` succeeds with EMPTY output,
@@ -596,25 +637,30 @@ function commitEpochWithDirtyAsNow(ctx, git, repoRoot, relPath, actualEpoch) {
596
637
  * rather than being silently treated the same as "created". `git ls-tree`
597
638
  * itself failing (an unborn HEAD, git unavailable) is likewise `unknown`.
598
639
  */
599
- function dirtyDocRestampVerdict(git, repoRoot, repoRelDocPath, onDiskTimestamp, showPrefix) {
640
+ function dirtyDocRestampVerdict(git, repoRoot, repoRelDocPath, onDiskParsed, showPrefix) {
600
641
  // A pathspec (`--`), cwd-relative: stays in the root-relative frame.
601
642
  const treeEntry = git(["ls-tree", "-z", "HEAD", "--", repoRelDocPath], repoRoot);
602
643
  if (treeEntry === null)
603
- return "unknown";
644
+ return { verdict: "unknown" };
604
645
  if (treeEntry === "")
605
- return "restamped";
646
+ return { verdict: "restamped" };
606
647
  const prefix = showPrefix();
607
648
  if (prefix === null)
608
- return "unknown";
649
+ return { verdict: "unknown" };
609
650
  const committed = showBlob(git, repoRoot, "HEAD", toTopLevelPath(prefix, repoRelDocPath));
610
651
  if (committed === null)
611
- return "unknown";
612
- const committedStamp = getTimestampIdentity(parseFrontmatter(committed).frontmatter.parsed);
613
- return committedStamp !== onDiskTimestamp ? "restamped" : "not-restamped";
652
+ return { verdict: "unknown" };
653
+ return compareRestampDirection(onDiskParsed, parseFrontmatter(committed).frontmatter.parsed, "working-tree");
614
654
  }
615
655
  function epochToIso(epochSeconds) {
616
656
  return new Date(epochSeconds * 1000).toISOString();
617
657
  }
658
+ /** Like `epochToIso`, but for a millisecond epoch (`getTimestampEpochMs`,
659
+ * D-008) -- used only by `compareRestampDirection`'s `backwards` and
660
+ * `sameInstant` results. */
661
+ function epochMsToIso(epochMs) {
662
+ return new Date(epochMs).toISOString();
663
+ }
618
664
  /**
619
665
  * Per-run cache of a doc's own REAL (committed) last-commit epoch, keyed by
620
666
  * the `BundleContext` instance so `sources-fresh`'s doc-commit comparison
@@ -673,10 +719,121 @@ function isShallowRepoShared(ctx, git, repoRoot) {
673
719
  shallowRepoCache.set(ctx, isShallow);
674
720
  return isShallow;
675
721
  }
722
+ /**
723
+ * How the same-instant notice names ONE side's frontmatter value: its raw
724
+ * spelling, quoted, so the reader sees the two different strings that
725
+ * resolve to the one instant. A native `Date` has no raw spelling to quote
726
+ * (`getRawTimestampString` returns undefined), so it is named by shape plus
727
+ * the instant it resolved to -- which is what makes the string-to-date
728
+ * rewrite readable as the distinct change it is rather than as one value
729
+ * printed twice.
730
+ */
731
+ function describeTimestampValue(parsed, epochMs) {
732
+ const raw = getRawTimestampString(parsed);
733
+ return raw === undefined
734
+ ? `a native YAML date naming ${epochMsToIso(epochMs)}`
735
+ : `"${raw}"`;
736
+ }
737
+ /**
738
+ * Decides the value-comparison branch of a restamp verdict from two parsed
739
+ * frontmatter values: `beforeParsed` (the older side: the first parent's
740
+ * committed value, or the value committed at HEAD for the dirty path) and
741
+ * `currentParsed` (the newer side: the commit's own value, or the on-disk
742
+ * working-tree value for the dirty path).
743
+ *
744
+ * D-004: a re-stamp only counts when the new value is STRICTLY LATER than
745
+ * the value it replaced -- comparing PARSED INSTANTS, never raw strings, so
746
+ * a squash that re-dates sources (and the doc) to the merge instant still
747
+ * passes (later than any pre-merge stamp) while a genuinely backdated
748
+ * re-stamp does not. D-008: that comparison reads both instants at
749
+ * MILLISECOND resolution (`getTimestampEpochMs`), not the whole-second
750
+ * floor `getTimestampEpoch` uses for every other caller in this file, so a
751
+ * genuine forward move of a few hundred milliseconds (two re-stamps inside
752
+ * the same second) is never misread as the same instant. Three outcomes:
753
+ *
754
+ * - new instant > old instant: `restamped` (a real re-verification).
755
+ * - new instant < old instant: `not-restamped`, AND flagged via
756
+ * `backwards` -- a backwards move is never a re-verification and is
757
+ * additionally reported as its own WARNING by the caller.
758
+ * - new instant === old instant, at millisecond resolution: `not-restamped`
759
+ * always (nothing was certified newer). Additionally flagged via
760
+ * `sameInstant` (D-009) ONLY when the raw VALUE was actually rewritten
761
+ * to a different representation of that same instant (switching between
762
+ * a quoted string and a native YAML date, or adding milliseconds that
763
+ * round to nothing -- decided by `getTimestampIdentity`, since two equal
764
+ * instants can still have differently-spelled raw values) -- the caller
765
+ * reports THAT case as its own NOTICE (not a warning, so `--strict` is
766
+ * unaffected) rather than silently folding it into the ordinary STALE
767
+ * wording. A byte-identical value (the common case: a co-committed body
768
+ * edit or formatter run that never touches the stamp at all) was never a
769
+ * re-stamp ATTEMPT, so it gets neither `backwards` nor `sameInstant` --
770
+ * there is nothing to notice.
771
+ *
772
+ * When EITHER side's `timestamp` cannot be parsed to an instant AT ALL
773
+ * (missing, blank, or a string `Date.parse` rejects even with a `Z`
774
+ * appended), direction cannot be judged: this falls back to today's
775
+ * pre-D-004 behaviour of comparing the two values' raw IDENTITY
776
+ * (`getTimestampIdentity`) instead of guessing a direction -- any textual
777
+ * change still counts as `restamped`, exactly as before this decision
778
+ * existed, and never triggers `backwards` or `sameInstant` (there is no
779
+ * direction to report either way). A side spelled without a UTC designator
780
+ * (`2026-01-01T13:00:00`: no `Z`, no numeric offset) is NOT such a case:
781
+ * `getTimestampEpochMs` (via `parseTimestampInstantMs` in `src/util.ts`)
782
+ * forces UTC for it, so it resolves to the SAME instant on every machine
783
+ * and IS judged for direction like any other comparable value (D-016). See
784
+ * the README's "Staleness (sources-fresh)" section, "Designator-less
785
+ * timestamps", for the full rationale.
786
+ */
787
+ function compareRestampDirection(currentParsed, beforeParsed, location) {
788
+ const currentEpochMs = getTimestampEpochMs(currentParsed);
789
+ const beforeEpochMs = getTimestampEpochMs(beforeParsed);
790
+ if (currentEpochMs === undefined || beforeEpochMs === undefined) {
791
+ const currentStamp = getTimestampIdentity(currentParsed);
792
+ const beforeStamp = getTimestampIdentity(beforeParsed);
793
+ return {
794
+ verdict: currentStamp !== beforeStamp ? "restamped" : "not-restamped",
795
+ };
796
+ }
797
+ if (currentEpochMs > beforeEpochMs)
798
+ return { verdict: "restamped" };
799
+ if (currentEpochMs < beforeEpochMs) {
800
+ return {
801
+ verdict: "not-restamped",
802
+ backwards: {
803
+ previousIso: epochMsToIso(beforeEpochMs),
804
+ newIso: epochMsToIso(currentEpochMs),
805
+ location,
806
+ },
807
+ };
808
+ }
809
+ // Same instant. An UNCHANGED value (byte-identical frontmatter, the
810
+ // common case: a co-committed body edit or formatter run that never
811
+ // touches the doc's timestamp at all) reports nothing extra here -- it
812
+ // was never a re-stamp ATTEMPT, so there is nothing to notice. Only a
813
+ // value that was actually rewritten to a DIFFERENT raw representation of
814
+ // the same instant (getTimestampIdentity differs) gets the D-009 notice:
815
+ // that is the case someone touched the stamp but the instant never
816
+ // actually moved.
817
+ const currentStamp = getTimestampIdentity(currentParsed);
818
+ const beforeStamp = getTimestampIdentity(beforeParsed);
819
+ if (currentStamp === beforeStamp)
820
+ return { verdict: "not-restamped" };
821
+ return {
822
+ verdict: "not-restamped",
823
+ sameInstant: {
824
+ previousValue: describeTimestampValue(beforeParsed, beforeEpochMs),
825
+ newValue: describeTimestampValue(currentParsed, currentEpochMs),
826
+ instantIso: epochMsToIso(currentEpochMs),
827
+ location,
828
+ },
829
+ };
830
+ }
676
831
  /**
677
832
  * Whether `doc`'s own last commit actually re-stamped it, decided by
678
833
  * comparing the doc's PARSED FRONTMATTER `timestamp` VALUE at that commit
679
- * against its value in the commit's FIRST PARENT. A doc created by that
834
+ * against its value in the commit's FIRST PARENT (see
835
+ * `compareRestampDirection`: the new value must be strictly LATER, not
836
+ * merely different, D-004). A doc created by that
680
837
  * commit (or by a genuine root commit of an unshallow repository) counts as
681
838
  * re-stamped: its stamp arrived with it. In a SHALLOW clone (`git clone
682
839
  * --depth`), the doc's last commit can have an EMPTY parent list purely
@@ -688,9 +845,10 @@ function isShallowRepoShared(ctx, git, repoRoot) {
688
845
  *
689
846
  * This is what narrows `sources-fresh`'s co-commit staleness exception: a
690
847
  * commit that merely happens to also touch the doc file (a typo fix, a
691
- * repo-wide formatter run, a rename) without changing the stamp carries no
692
- * verification claim and must NOT suppress staleness; only a commit that
693
- * actually rewrote the stamp (or created the doc) does.
848
+ * repo-wide formatter run, a rename) without moving the stamp strictly
849
+ * forward carries no verification claim and must NOT suppress staleness;
850
+ * only a commit that actually moved the stamp to a later instant (or
851
+ * created the doc) does.
694
852
  *
695
853
  * WHY VALUES AND NOT DIFF TEXT. An earlier version of this check scanned
696
854
  * `git log -1 -p -- <doc>` for a `^\+timestamp:` line. Scanning diff TEXT is
@@ -712,13 +870,13 @@ function isShallowRepoShared(ctx, git, repoRoot) {
712
870
  * an invisible false-positive STALE. Both trees are perfectly readable
713
871
  * via `git show`, merge or not.
714
872
  *
715
- * Its limits, stated rather than hidden: this answers "did the value
716
- * change", never "is the new value right". A hand-typed or backdated stamp
717
- * still counts as a re-stamp (`sources-fresh-future` is the rule that
718
- * catches an implausible value), and comparing against only the FIRST parent
719
- * means a merge that takes its doc content wholesale from the second parent
720
- * is judged against the first-parent baseline, which is the same baseline
721
- * the PR under review is measured against.
873
+ * Its limits, stated rather than hidden: this answers "did the value move
874
+ * strictly forward", never "is the new value plausible". A hand-typed
875
+ * forward-dated stamp still counts as a re-stamp (`sources-fresh-future` is
876
+ * the rule that catches an implausible future value), and comparing against
877
+ * only the FIRST parent means a merge that takes its doc content wholesale
878
+ * from the second parent is judged against the first-parent baseline, which
879
+ * is the same baseline the PR under review is measured against.
722
880
  *
723
881
  * Spends at most 4 git processes and returns early before most of them: 1
724
882
  * for the commit + parents, 1 for the rename-aware name-status lookup
@@ -734,10 +892,10 @@ function restampedByOwnLastCommit(git, repoRoot, repoRelDocPath, isShallowRepo,
734
892
  // to a parent resolves to the real content-changing commit on that side.
735
893
  const head = git(["log", "-1", "--format=%H%n%P", "--", repoRelDocPath], repoRoot);
736
894
  if (head === null)
737
- return "unknown";
895
+ return { verdict: "unknown" };
738
896
  const [sha, parentLine] = head.split("\n");
739
897
  if (!sha)
740
- return "unknown";
898
+ return { verdict: "unknown" };
741
899
  const parents = (parentLine ?? "").split(" ").filter((p) => p !== "");
742
900
  // An empty parent list means "the doc arrived with the repo's first
743
901
  // commit, stamp and all" ONLY in a genuinely unshallow repository. In a
@@ -749,7 +907,7 @@ function restampedByOwnLastCommit(git, repoRoot, repoRelDocPath, isShallowRepo,
749
907
  // staleness. isShallowRepo() is checked here, not unconditionally at the
750
908
  // top of this function, so an unshallow repo never pays for it.
751
909
  if (parents.length === 0) {
752
- return isShallowRepo() ? "unknown-shallow-root" : "restamped";
910
+ return { verdict: isShallowRepo() ? "unknown-shallow-root" : "restamped" };
753
911
  }
754
912
  const firstParent = parents[0];
755
913
  // From here on everything git reports or takes is in the top-level frame
@@ -757,24 +915,23 @@ function restampedByOwnLastCommit(git, repoRoot, repoRelDocPath, isShallowRepo,
757
915
  // against, and both `<rev>:<path>` blob reads.
758
916
  const prefix = showPrefix();
759
917
  if (prefix === null)
760
- return "unknown";
918
+ return { verdict: "unknown" };
761
919
  const topLevelDocPath = toTopLevelPath(prefix, repoRelDocPath);
762
920
  const previous = previousPathIn(git, repoRoot, firstParent, sha, topLevelDocPath);
763
921
  if (previous.kind === "unknown")
764
- return "unknown";
922
+ return { verdict: "unknown" };
765
923
  if (previous.kind === "created")
766
- return "restamped";
924
+ return { verdict: "restamped" };
767
925
  const current = showBlob(git, repoRoot, sha, topLevelDocPath);
768
926
  if (current === null)
769
- return "unknown";
927
+ return { verdict: "unknown" };
770
928
  const before = showBlob(git, repoRoot, firstParent, previous.path);
771
929
  if (before === null)
772
- return "unknown";
773
- const currentStamp = getTimestampIdentity(parseFrontmatter(current).frontmatter.parsed);
774
- const beforeStamp = getTimestampIdentity(parseFrontmatter(before).frontmatter.parsed);
775
- // Both undefined (no parseable stamp on either side) compares equal, i.e.
776
- // "not re-stamped" -- nothing was rewritten, so nothing is claimed.
777
- return currentStamp !== beforeStamp ? "restamped" : "not-restamped";
930
+ return { verdict: "unknown" };
931
+ // Both undefined (no parseable stamp on either side) compares equal in
932
+ // compareRestampDirection's identity fallback, i.e. "not re-stamped" --
933
+ // nothing was rewritten, so nothing is claimed.
934
+ return compareRestampDirection(parseFrontmatter(current).frontmatter.parsed, parseFrontmatter(before).frontmatter.parsed, "commit");
778
935
  }
779
936
  /**
780
937
  * Where the doc lived in `parentSha`, so its previous revision can be read
@@ -1 +1 @@
1
- {"version":3,"file":"sources-fresh.js","sourceRoot":"","sources":["../../src/rules/sources-fresh.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,GACjB,MAAM,YAAY,CAAC;AASpB,MAAM,OAAO,GAAG,eAAe,CAAC;AAChC,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAE/C,MAAM,CAAC,MAAM,gBAAgB,GAAS;IACpC,EAAE,EAAE,OAAO;IACX,WAAW,EACT,6vBAA6vB;IAC/vB,GAAG,CAAC,GAAG;QACL,MAAM,QAAQ,GAAc,EAAE,CAAC;QAE/B,MAAM,eAAe,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAChD,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,QAAQ,CAAC;QAElD,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;YAClB,sEAAsE;YACtE,mEAAmE;YACnE,qEAAqE;YACrE,oEAAoE;YACpE,mEAAmE;YACnE,oEAAoE;YACpE,oBAAoB;YACpB,QAAQ,CAAC,IAAI,CAAC;gBACZ,MAAM,EAAE,OAAO;gBACf,QAAQ,EAAE,QAAQ;gBAClB,IAAI,EAAE,EAAE;gBACR,OAAO,EAAE,+CAA+C;aACzD,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,MAAM,Q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M,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;IAC9D,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACzB,IAAI,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACrD,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAC9B,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAC9B,CAAC,IAAI,CAAC,CAAC;YACP,IAAI,OAAO,KAAK,eAAe,EAAE,CAAC;gBAChC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;YAC5C,CAAC;YACD,SAAS;QACX,CAAC;QACD,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACxB,CAAC,IAAI,CAAC,CAAC;QACP,IAAI,CAAC,KAAK,eAAe;YAAE,SAAS;QACpC,IAAI,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACvD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;IACjD,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;AACjD,CAAC"}
package/dist/util.d.ts CHANGED
@@ -18,58 +18,96 @@ export declare function getValidSources(parsed: unknown): string[] | undefined;
18
18
  * (core) schema resolves timestamp scalars to strings, but a YAML 1.1
19
19
  * `!!timestamp` tag (or a caller constructing frontmatter programmatically)
20
20
  * can hand back a native `Date`, and that should be assessed rather than
21
- * degrade to the no-valid-timestamp notice.
21
+ * degrade to the no-valid-timestamp notice. A designator-less STRING is
22
+ * parsed via `parseTimestampInstantMs`, i.e. as UTC, so this epoch never
23
+ * depends on the machine's local timezone (D-016).
22
24
  */
23
25
  export declare function getTimestampEpoch(parsed: unknown): number | undefined;
26
+ /**
27
+ * Like `getTimestampEpoch`, but at MILLISECOND resolution instead of
28
+ * floored to the second. Used ONLY by `compareRestampDirection` (D-008):
29
+ * flooring to whole seconds would treat two distinct re-stamps less than a
30
+ * second apart (`...00.000Z` -> `...00.500Z`) as the SAME instant, which is
31
+ * wrong for a comparison whose whole job is deciding "strictly later or
32
+ * not" (a genuine forward move at that resolution must read as
33
+ * `restamped`, not as the D-009 same-instant notice). Every OTHER
34
+ * `getTimestampEpoch` caller keeps calling that function unchanged: their
35
+ * thresholds (days, not milliseconds) make the distinction this function
36
+ * exists for immaterial there, so there was no reason to touch them. Read
37
+ * as an instant at millisecond resolution, exactly like `getTimestampEpoch`
38
+ * otherwise -- same `Date` vs. string handling, same undefined cases, same
39
+ * UTC-forcing treatment of a designator-less string (D-016).
40
+ */
41
+ export declare function getTimestampEpochMs(parsed: unknown): number | undefined;
24
42
  /**
25
43
  * The frontmatter `timestamp`'s raw string form, or undefined when it is
26
44
  * absent, blank, or not a string -- notably, a native `Date` instance (see
27
45
  * `getTimestampEpoch`'s doc comment) returns undefined here too, since a
28
- * `Date`'s `getTime()` is always UTC-unambiguous and carries none of the
29
- * local-timezone risk `hasUtcDesignator` exists to catch. Used only by
30
- * `sources-fresh-future`'s UTC-designator gate; `sources-fresh` itself has
31
- * no need for the raw string, only the resolved epoch.
46
+ * `Date`'s `getTime()` already names one instant on every machine, so
47
+ * there is no raw spelling left for a caller to inspect. Callers:
48
+ * `hasUtcDesignator` (`sources-fresh-future`'s clock-skew check, and
49
+ * `parseTimestampInstantMs`'s UTC-forcing decision, D-016), and
50
+ * `describeTimestampValue`, which names each side's raw spelling in the
51
+ * same-instant notice.
32
52
  */
33
53
  export declare function getRawTimestampString(parsed: unknown): string | undefined;
34
54
  /**
35
55
  * Whether an ISO-ish timestamp string carries an explicit UTC designator
36
- * (`Z`) or a numeric UTC offset (`+02:00`, `-0500`) at its end. A timestamp
37
- * with neither ("2026-01-01T00:00:00", "2026-01-01 00:00:00") parses in
38
- * the machine's LOCAL timezone under `Date.parse`, which would make
39
- * `sources-fresh-future`'s clock-skew comparison swing by hours depending
40
- * on which machine runs the check -- not usable for a check whose default
41
- * allowance is only 10 minutes. A numeric offset, unlike a bare local
42
- * time, is unambiguous: `Date.parse`/`Date#getTime()` already normalizes
43
- * it to a real UTC instant, so no extra conversion is needed here beyond
44
- * recognizing it as present. `sources-fresh`'s own thresholds are in
45
- * days, wide enough that this ambiguity doesn't practically matter there,
46
- * so this helper is deliberately NOT applied to that rule's comparison.
56
+ * (`Z`) or a numeric UTC offset (`+02:00`, `-0500`) at its end. A string
57
+ * with neither ("2026-01-01T00:00:00", "2026-01-01 00:00:00") is resolved
58
+ * by `Date.parse` in the machine's LOCAL timezone; a string with either
59
+ * already names a real UTC instant, so nothing beyond recognizing it is
60
+ * needed here.
61
+ *
62
+ * Two callers consult this predicate, and they respond to the same
63
+ * ambiguity in two different ways (D-016): `sources-fresh-future`'s
64
+ * clock-skew check SKIPS a designator-less timestamp entirely (a notice,
65
+ * not a warning) rather than compare it -- that allowance is minutes wide,
66
+ * too narrow to safely absorb a multi-hour timezone shift. `sources-fresh`
67
+ * instead FORCES UTC for it (`parseTimestampInstantMs`), for both its
68
+ * day-wide staleness comparison and its re-stamp direction comparison
69
+ * (`compareRestampDirection`) -- its thresholds are day-wide, so treating
70
+ * the value as UTC everywhere is both consistent and safe. Which rule takes
71
+ * which approach, and why, is written down once: see the README's
72
+ * "Designator-less timestamps" paragraph under "Staleness (sources-fresh)".
47
73
  */
48
74
  export declare function hasUtcDesignator(raw: string): boolean;
49
75
  /**
50
76
  * A canonical identity string for the frontmatter `timestamp` VALUE, or
51
77
  * undefined when the key is absent, blank, or not a scalar this tool
52
- * understands. Two docs (or two revisions of one doc) are "stamped the same"
53
- * iff this returns the same value for both.
78
+ * understands. Two docs (or two revisions of one doc) are "stamped the
79
+ * same" iff this returns the same value for both.
80
+ *
81
+ * `compareRestampDirection` (sources-fresh) consults it in exactly two
82
+ * places, both of them comparing identities rather than instants:
83
+ *
84
+ * - as its FALLBACK, when direction cannot be judged at all: either side
85
+ * unparseable to an instant even after `getTimestampEpochMs` forces UTC
86
+ * for a designator-less string (D-016). With nothing comparable to
87
+ * order, the question becomes "did the raw value change", and any
88
+ * textual change counts as `restamped` -- see that function's doc
89
+ * comment for the full three-way split.
90
+ * - when both sides DO resolve to an instant and name the SAME one,
91
+ * to tell a rewrite (a different spelling of that one instant, e.g.
92
+ * `2026-01-01T00:00:00Z` to `2026-01-01T00:00:00+00:00`, which gets
93
+ * the D-009 notice) from a byte-identical value (never a re-stamp
94
+ * attempt, so it gets nothing).
54
95
  *
55
- * Used by `sources-fresh` to decide whether a commit actually re-stamped a
56
- * doc, by comparing the doc's frontmatter at that commit against its
57
- * frontmatter in the commit's first parent. Comparing VALUES, not diff text,
58
- * is what makes the test immune to the three shapes a diff-text scan gets
59
- * wrong: a `timestamp:` line inside a fenced YAML example in the doc BODY (it
60
- * is not the frontmatter key, so it never reaches this function at all), a
61
- * rename (the two revisions are read by path, not from a diff header), and a
62
- * merge commit (whose combined-diff output is empty while its trees are
63
- * perfectly readable).
96
+ * Comparing VALUES, not diff text, is what makes the identity test immune
97
+ * to the three shapes a diff-text scan gets wrong: a `timestamp:` line
98
+ * inside a fenced YAML example in the doc BODY (it is not the frontmatter
99
+ * key, so it never reaches this function at all), a rename (the two
100
+ * revisions are read by path, not from a diff header), and a merge commit
101
+ * (whose combined-diff output is empty while its trees are perfectly
102
+ * readable).
64
103
  *
65
- * The `date:`/`string:` prefixes keep the two YAML shapes distinguishable: a
66
- * `!!timestamp`-tagged scalar resolving to a native `Date` and a plain string
67
- * are different frontmatter, so rewriting one into the other counts as a
68
- * re-stamp rather than silently comparing equal. Deliberately NOT normalized
69
- * to an epoch: this is an identity test ("did the value change"), not a
70
- * chronological one, so re-writing `2026-01-01T00:00:00Z` as
71
- * `2026-01-01T00:00:00+00:00` counts as a re-stamp -- the author touched the
72
- * stamp. Whether the new value is CORRECT is a separate question this
73
- * function deliberately does not answer (see the README's known limitations).
104
+ * The `date:`/`string:` prefixes keep the two YAML shapes distinguishable:
105
+ * a `!!timestamp`-tagged scalar resolving to a native `Date` and a plain
106
+ * string are different frontmatter, so rewriting one into the other counts
107
+ * as a changed identity here. Deliberately NOT normalized to an epoch:
108
+ * this is an identity test ("did the raw value change"), not a
109
+ * chronological one. Whether the new value is CORRECT is a separate
110
+ * question this function deliberately does not answer (see the README's
111
+ * known limitations).
74
112
  */
75
113
  export declare function getTimestampIdentity(parsed: unknown): string | undefined;
package/dist/util.js CHANGED
@@ -22,6 +22,34 @@ export function getValidSources(parsed) {
22
22
  sources.every((s) => typeof s === "string" && s.trim() !== "");
23
23
  return isValidShape ? sources : undefined;
24
24
  }
25
+ /**
26
+ * Parses a frontmatter `timestamp` STRING to milliseconds since the epoch,
27
+ * forcing UTC interpretation whenever the string carries no UTC designator
28
+ * (`Z`) or numeric offset (`hasUtcDesignator`, D-016). `Date.parse` resolves
29
+ * a designator-less string ("2026-01-01T13:00:00") in the machine's LOCAL
30
+ * timezone by default, which would make every caller that reads a
31
+ * `timestamp` through this function -- `sources-fresh`'s own day-wide
32
+ * staleness comparison AND its re-stamp direction comparison
33
+ * (`compareRestampDirection` in `src/rules/sources-fresh.ts`) -- read the
34
+ * IDENTICAL frontmatter differently depending on where `okf-kit check`
35
+ * happens to run. Appending `Z` before parsing makes the resolved instant a
36
+ * property of the STRING, not of `TZ`, for every comparison in this
37
+ * package, not just some of them. A string that already carries a
38
+ * designator is parsed unchanged: `Date.parse` already resolves it
39
+ * correctly on every machine. See the README's "Staleness (sources-fresh)"
40
+ * section, "Designator-less timestamps", for the full rationale and the one
41
+ * case this does NOT cover (a value that is not parseable to an instant at
42
+ * all). The raw string is trimmed before either check: the `Z` this
43
+ * function appends for a designator-less value must land at the very end,
44
+ * not after trailing whitespace, so a whitespace-padded value is parsed
45
+ * the same as its untrimmed form (both `hasUtcDesignator` and `Date.parse`
46
+ * would otherwise treat the padding as part of the value).
47
+ */
48
+ function parseTimestampInstantMs(raw) {
49
+ const trimmed = raw.trim();
50
+ const ms = Date.parse(hasUtcDesignator(trimmed) ? trimmed : `${trimmed}Z`);
51
+ return Number.isNaN(ms) ? undefined : ms;
52
+ }
25
53
  /**
26
54
  * Returns the frontmatter `timestamp` as a Unix epoch (seconds), or
27
55
  * undefined when absent, not a Date/string, or not parseable as a date.
@@ -30,7 +58,9 @@ export function getValidSources(parsed) {
30
58
  * (core) schema resolves timestamp scalars to strings, but a YAML 1.1
31
59
  * `!!timestamp` tag (or a caller constructing frontmatter programmatically)
32
60
  * can hand back a native `Date`, and that should be assessed rather than
33
- * degrade to the no-valid-timestamp notice.
61
+ * degrade to the no-valid-timestamp notice. A designator-less STRING is
62
+ * parsed via `parseTimestampInstantMs`, i.e. as UTC, so this epoch never
63
+ * depends on the machine's local timezone (D-016).
34
64
  */
35
65
  export function getTimestampEpoch(parsed) {
36
66
  if (!isRecord(parsed))
@@ -42,19 +72,46 @@ export function getTimestampEpoch(parsed) {
42
72
  }
43
73
  if (typeof timestamp !== "string" || timestamp.trim() === "")
44
74
  return undefined;
45
- const ms = Date.parse(timestamp);
46
- if (Number.isNaN(ms))
75
+ const ms = parseTimestampInstantMs(timestamp);
76
+ return ms === undefined ? undefined : Math.floor(ms / 1000);
77
+ }
78
+ /**
79
+ * Like `getTimestampEpoch`, but at MILLISECOND resolution instead of
80
+ * floored to the second. Used ONLY by `compareRestampDirection` (D-008):
81
+ * flooring to whole seconds would treat two distinct re-stamps less than a
82
+ * second apart (`...00.000Z` -> `...00.500Z`) as the SAME instant, which is
83
+ * wrong for a comparison whose whole job is deciding "strictly later or
84
+ * not" (a genuine forward move at that resolution must read as
85
+ * `restamped`, not as the D-009 same-instant notice). Every OTHER
86
+ * `getTimestampEpoch` caller keeps calling that function unchanged: their
87
+ * thresholds (days, not milliseconds) make the distinction this function
88
+ * exists for immaterial there, so there was no reason to touch them. Read
89
+ * as an instant at millisecond resolution, exactly like `getTimestampEpoch`
90
+ * otherwise -- same `Date` vs. string handling, same undefined cases, same
91
+ * UTC-forcing treatment of a designator-less string (D-016).
92
+ */
93
+ export function getTimestampEpochMs(parsed) {
94
+ if (!isRecord(parsed))
95
+ return undefined;
96
+ const timestamp = parsed.timestamp;
97
+ if (timestamp instanceof Date) {
98
+ const ms = timestamp.getTime();
99
+ return Number.isNaN(ms) ? undefined : ms;
100
+ }
101
+ if (typeof timestamp !== "string" || timestamp.trim() === "")
47
102
  return undefined;
48
- return Math.floor(ms / 1000);
103
+ return parseTimestampInstantMs(timestamp);
49
104
  }
50
105
  /**
51
106
  * The frontmatter `timestamp`'s raw string form, or undefined when it is
52
107
  * absent, blank, or not a string -- notably, a native `Date` instance (see
53
108
  * `getTimestampEpoch`'s doc comment) returns undefined here too, since a
54
- * `Date`'s `getTime()` is always UTC-unambiguous and carries none of the
55
- * local-timezone risk `hasUtcDesignator` exists to catch. Used only by
56
- * `sources-fresh-future`'s UTC-designator gate; `sources-fresh` itself has
57
- * no need for the raw string, only the resolved epoch.
109
+ * `Date`'s `getTime()` already names one instant on every machine, so
110
+ * there is no raw spelling left for a caller to inspect. Callers:
111
+ * `hasUtcDesignator` (`sources-fresh-future`'s clock-skew check, and
112
+ * `parseTimestampInstantMs`'s UTC-forcing decision, D-016), and
113
+ * `describeTimestampValue`, which names each side's raw spelling in the
114
+ * same-instant notice.
58
115
  */
59
116
  export function getRawTimestampString(parsed) {
60
117
  if (!isRecord(parsed))
@@ -66,17 +123,23 @@ export function getRawTimestampString(parsed) {
66
123
  }
67
124
  /**
68
125
  * Whether an ISO-ish timestamp string carries an explicit UTC designator
69
- * (`Z`) or a numeric UTC offset (`+02:00`, `-0500`) at its end. A timestamp
70
- * with neither ("2026-01-01T00:00:00", "2026-01-01 00:00:00") parses in
71
- * the machine's LOCAL timezone under `Date.parse`, which would make
72
- * `sources-fresh-future`'s clock-skew comparison swing by hours depending
73
- * on which machine runs the check -- not usable for a check whose default
74
- * allowance is only 10 minutes. A numeric offset, unlike a bare local
75
- * time, is unambiguous: `Date.parse`/`Date#getTime()` already normalizes
76
- * it to a real UTC instant, so no extra conversion is needed here beyond
77
- * recognizing it as present. `sources-fresh`'s own thresholds are in
78
- * days, wide enough that this ambiguity doesn't practically matter there,
79
- * so this helper is deliberately NOT applied to that rule's comparison.
126
+ * (`Z`) or a numeric UTC offset (`+02:00`, `-0500`) at its end. A string
127
+ * with neither ("2026-01-01T00:00:00", "2026-01-01 00:00:00") is resolved
128
+ * by `Date.parse` in the machine's LOCAL timezone; a string with either
129
+ * already names a real UTC instant, so nothing beyond recognizing it is
130
+ * needed here.
131
+ *
132
+ * Two callers consult this predicate, and they respond to the same
133
+ * ambiguity in two different ways (D-016): `sources-fresh-future`'s
134
+ * clock-skew check SKIPS a designator-less timestamp entirely (a notice,
135
+ * not a warning) rather than compare it -- that allowance is minutes wide,
136
+ * too narrow to safely absorb a multi-hour timezone shift. `sources-fresh`
137
+ * instead FORCES UTC for it (`parseTimestampInstantMs`), for both its
138
+ * day-wide staleness comparison and its re-stamp direction comparison
139
+ * (`compareRestampDirection`) -- its thresholds are day-wide, so treating
140
+ * the value as UTC everywhere is both consistent and safe. Which rule takes
141
+ * which approach, and why, is written down once: see the README's
142
+ * "Designator-less timestamps" paragraph under "Staleness (sources-fresh)".
80
143
  */
81
144
  export function hasUtcDesignator(raw) {
82
145
  return /(?:Z|[+-]\d{2}:?\d{2})$/i.test(raw.trim());
@@ -84,28 +147,40 @@ export function hasUtcDesignator(raw) {
84
147
  /**
85
148
  * A canonical identity string for the frontmatter `timestamp` VALUE, or
86
149
  * undefined when the key is absent, blank, or not a scalar this tool
87
- * understands. Two docs (or two revisions of one doc) are "stamped the same"
88
- * iff this returns the same value for both.
150
+ * understands. Two docs (or two revisions of one doc) are "stamped the
151
+ * same" iff this returns the same value for both.
152
+ *
153
+ * `compareRestampDirection` (sources-fresh) consults it in exactly two
154
+ * places, both of them comparing identities rather than instants:
155
+ *
156
+ * - as its FALLBACK, when direction cannot be judged at all: either side
157
+ * unparseable to an instant even after `getTimestampEpochMs` forces UTC
158
+ * for a designator-less string (D-016). With nothing comparable to
159
+ * order, the question becomes "did the raw value change", and any
160
+ * textual change counts as `restamped` -- see that function's doc
161
+ * comment for the full three-way split.
162
+ * - when both sides DO resolve to an instant and name the SAME one,
163
+ * to tell a rewrite (a different spelling of that one instant, e.g.
164
+ * `2026-01-01T00:00:00Z` to `2026-01-01T00:00:00+00:00`, which gets
165
+ * the D-009 notice) from a byte-identical value (never a re-stamp
166
+ * attempt, so it gets nothing).
89
167
  *
90
- * Used by `sources-fresh` to decide whether a commit actually re-stamped a
91
- * doc, by comparing the doc's frontmatter at that commit against its
92
- * frontmatter in the commit's first parent. Comparing VALUES, not diff text,
93
- * is what makes the test immune to the three shapes a diff-text scan gets
94
- * wrong: a `timestamp:` line inside a fenced YAML example in the doc BODY (it
95
- * is not the frontmatter key, so it never reaches this function at all), a
96
- * rename (the two revisions are read by path, not from a diff header), and a
97
- * merge commit (whose combined-diff output is empty while its trees are
98
- * perfectly readable).
168
+ * Comparing VALUES, not diff text, is what makes the identity test immune
169
+ * to the three shapes a diff-text scan gets wrong: a `timestamp:` line
170
+ * inside a fenced YAML example in the doc BODY (it is not the frontmatter
171
+ * key, so it never reaches this function at all), a rename (the two
172
+ * revisions are read by path, not from a diff header), and a merge commit
173
+ * (whose combined-diff output is empty while its trees are perfectly
174
+ * readable).
99
175
  *
100
- * The `date:`/`string:` prefixes keep the two YAML shapes distinguishable: a
101
- * `!!timestamp`-tagged scalar resolving to a native `Date` and a plain string
102
- * are different frontmatter, so rewriting one into the other counts as a
103
- * re-stamp rather than silently comparing equal. Deliberately NOT normalized
104
- * to an epoch: this is an identity test ("did the value change"), not a
105
- * chronological one, so re-writing `2026-01-01T00:00:00Z` as
106
- * `2026-01-01T00:00:00+00:00` counts as a re-stamp -- the author touched the
107
- * stamp. Whether the new value is CORRECT is a separate question this
108
- * function deliberately does not answer (see the README's known limitations).
176
+ * The `date:`/`string:` prefixes keep the two YAML shapes distinguishable:
177
+ * a `!!timestamp`-tagged scalar resolving to a native `Date` and a plain
178
+ * string are different frontmatter, so rewriting one into the other counts
179
+ * as a changed identity here. Deliberately NOT normalized to an epoch:
180
+ * this is an identity test ("did the raw value change"), not a
181
+ * chronological one. Whether the new value is CORRECT is a separate
182
+ * question this function deliberately does not answer (see the README's
183
+ * known limitations).
109
184
  */
110
185
  export function getTimestampIdentity(parsed) {
111
186
  if (!isRecord(parsed))
package/dist/util.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,aAAa,CAAC,MAAe;IAC3C,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,SAAS,IAAI,MAAM,CAAC;AACjD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,MAAe;IAC7C,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;QAAE,OAAO,SAAS,CAAC;IAC7C,MAAM,OAAO,GAAI,MAAkC,CAAC,OAAO,CAAC;IAC5D,MAAM,YAAY,GAChB,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QACtB,OAAO,CAAC,MAAM,GAAG,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAe;IAClD,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,SAAS,CAAC;IACxC,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACnC,IAAI,SAAS,YAAY,IAAI,EAAE,CAAC;QAC9B,MAAM,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC;QAC/B,OAAO,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;IACrD,CAAC;IACD,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE;QAC1D,OAAO,SAAS,CAAC;IACnB,OAAO,UAAU,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC;AACtC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "okf-kit",
3
- "version": "0.12.1",
3
+ "version": "0.14.0",
4
4
  "description": "CLI that validates OKF v0.1 knowledge bundles for structural correctness",
5
5
  "type": "module",
6
6
  "bin": {