okf-kit 0.13.0 → 0.15.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,89 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.15.0] - 2026-09-25
11
+
12
+ ### Added
13
+
14
+ - `docs-for <bundleDir> <path>...` subcommand: reverse lookup listing every bundle doc whose frontmatter `sources` claims one of the given paths (exact match, or containment under a `sources` entry that is a directory), with human and `--json` output. Resolves `sources` entries the same way `check`'s `sources-shape` rule does (`path.join(repoRoot, source)`, shared via a new `resolveRepoPath` helper), so both agree on what counts as a source, including a leading-slash spelling. A given path, relative or absolute, is resolved by one rule (`path.resolve(repoRoot, path)`, normalized, then checked for containment in `--repo-root`); a path outside `--repo-root` is a usage error rather than a silent empty result. See the README's "Reverse lookup (`docs-for`)" section.
15
+
16
+ ## [0.14.0] - 2026-09-20
17
+
18
+ ### Changed
19
+
20
+ - `sources-fresh`'s re-stamp direction check (`compareRestampDirection`,
21
+ D-013) is now judged by `parseTimestampInstantMs` (D-016) instead of a
22
+ bare `Date.parse` fallback for a designator-less value; see the Fixed
23
+ entry below. This can turn an existing `--strict` run red: a
24
+ designator-less backwards re-stamp that previously passed silently is
25
+ now reported (`re-stamp moved backwards`).
26
+
27
+ ### Fixed
28
+
29
+ - `sources-fresh` treats a frontmatter `timestamp` string with no UTC
30
+ designator (`Z`) or numeric offset (e.g. `2026-09-17T07:36:36`)
31
+ consistently and timezone-invariantly across BOTH of its comparisons
32
+ (D-016). Previously the two comparisons disagreed: the re-stamp
33
+ direction check (`compareRestampDirection`) fell back to an
34
+ any-textual-change escape hatch for such a value (a genuine backwards
35
+ re-stamp between two designator-less timestamps silently passed as an
36
+ ordinary re-stamp), while the day-wide staleness comparison
37
+ (`getTimestampEpoch`) parsed it with `Date.parse` in the machine's
38
+ local timezone (the same repository content could read STALE on one
39
+ runner and clean on another, hours apart). Both now go through one
40
+ UTC-forcing parse (`parseTimestampInstantMs` in `src/util.ts`, shared
41
+ by `getTimestampEpoch` and `getTimestampEpochMs`): a designator-less
42
+ value is treated as UTC everywhere `sources-fresh` reads a `timestamp`
43
+ (Treatment A of the two considered, see the measurement below), so a
44
+ backwards designator-less re-stamp is now reported (`re-stamp moved
45
+ backwards`) exactly like a `Z`-suffixed one, and the day-wide
46
+ comparison no longer depends on `TZ`. D-016 supersedes D-013 for
47
+ `sources-fresh`'s direction check (a native YAML date still takes the
48
+ `Date#getTime()` branch and is unaffected); `sources-fresh-future`'s
49
+ designator-less skip notice (D-013) is untouched, since its clock-skew
50
+ allowance is minutes wide, too narrow to safely absorb an hours-wide
51
+ timezone shift, so it keeps skipping a designator-less timestamp with a
52
+ notice rather than forcing UTC on it (see the README's "Designator-less
53
+ timestamps" section for why the two rules differ). `parseTimestampInstantMs`
54
+ also trims the raw `timestamp` string before parsing (needed so the `Z`
55
+ it appends for a designator-less value lands at the end, not after
56
+ trailing whitespace); as a side effect, a whitespace-padded value that
57
+ previously read as `staleness not assessable: no valid timestamp` is
58
+ now assessed by both `sources-fresh` and `sources-fresh-future` the
59
+ same as its untrimmed form. A native YAML date (`!!timestamp`, no raw
60
+ string, already resolved to a fixed UTC instant by the YAML parser) was
61
+ already timezone-invariant and is unaffected. New tests pin timezone
62
+ invariance under both `TZ=UTC` and `TZ=Asia/Tokyo` for the direction
63
+ check and, separately, for the day-wide comparison
64
+ (`test/cli-staleness.test.ts`, subprocess-based, following the existing
65
+ D-013 pattern), plus a committed-path unit pin (`test/sources-fresh.test.ts`),
66
+ unit-level UTC-forcing and trim pins for `getTimestampEpoch`/
67
+ `getTimestampEpochMs` (`test/util.test.ts`), and a padded-value pin for
68
+ `sources-fresh-future` (`test/sources-fresh-future.test.ts`).
69
+
70
+ Measured by running the built CLI (`dist/cli.js check`) over every real
71
+ `docs/okf` bundle in this repository (test fixtures under
72
+ `packages/okf-kit/test/fixtures/` excluded as synthetic) -- the only
73
+ one is `packages/orchestrator-workflow/docs/okf`, whose six docs'
74
+ frontmatter timestamps are all `Z`-suffixed already. Ran both plain
75
+ `check --json` and `check --json --require-anchors`, each under
76
+ `TZ=UTC` and `TZ=Asia/Tokyo`:
77
+
78
+ | Config | Treatment A (parse as UTC, chosen) | Treatment B (designator required) |
79
+ |---|---|---|
80
+ | `check`, `TZ=UTC` | 0 errors, 0 warnings, 0 notices | 0 errors, 0 warnings, 0 notices |
81
+ | `check`, `TZ=Asia/Tokyo` | 0 errors, 0 warnings, 0 notices | 0 errors, 0 warnings, 0 notices |
82
+ | `check --require-anchors`, `TZ=UTC` | 0 errors, 0 warnings, 0 notices | 0 errors, 0 warnings, 0 notices |
83
+ | `check --require-anchors`, `TZ=Asia/Tokyo` | 0 errors, 0 warnings, 0 notices | 0 errors, 0 warnings, 0 notices |
84
+
85
+ Identical under both treatments and both timezones: the only real
86
+ bundle in this repository has no designator-less stamp to treat
87
+ differently, so no existing bundle verdict flips either way; Treatment
88
+ A is adopted because it keeps `sources-fresh` a single rule answering
89
+ the same "did this move forward" question for every `timestamp` shape
90
+ it accepts, closing the backwards-move gap without a second finding
91
+ class for the same value.
92
+
10
93
  ## [0.13.0] - 2026-09-17
11
94
 
12
95
  ### Changed
package/README.md CHANGED
@@ -89,16 +89,44 @@ If the bundle is not inside a git work tree (or `git` is unavailable), repo-root
89
89
 
90
90
  Pass `--repo-root` explicitly to pin a specific root (useful in CI when the bundle and the code it documents live in different checkouts) or to opt out of the ambient repo (point it at the bundle directory itself to disable both checks' access to the rest of the repo).
91
91
 
92
+ ## Reverse lookup (`docs-for`)
93
+
94
+ `okf-kit docs-for <bundleDir> <path>...` answers the opposite question from `check`: given one or more paths, which bundle docs claim them as `sources`? Useful for a slicer or CI step that needs to know which knowledge-bundle docs are affected by a set of changed files, without reimplementing frontmatter parsing.
95
+
96
+ ```bash
97
+ # which docs claim src/foo.ts (or a directory it lives under) as a source?
98
+ okf-kit docs-for path/to/bundle src/foo.ts src/bar/
99
+
100
+ # JSON output for tooling
101
+ okf-kit docs-for path/to/bundle src/foo.ts --json
102
+
103
+ # explicit repo root, like `check` (auto-detected via `git rev-parse --show-toplevel` when omitted)
104
+ okf-kit docs-for path/to/bundle src/foo.ts --repo-root /path/to/repo
105
+ ```
106
+
107
+ **Population and matching:** `docs-for` looks at the exact same docs `sources-shape`/`sources-fresh` do -- every doc whose frontmatter `sources` is a validly-shaped (non-empty array of non-empty strings) list; a doc with no `sources` key, or a malformed one, contributes no matches (that shape error is `check`'s job to report, not this command's). A given `<path>` argument matches a doc's `sources` entry when, after resolving both against `--repo-root` (exactly as `check`'s `sources-shape` resolves `sources` entries, see below):
108
+
109
+ - the two paths are identical, or
110
+ - the `sources` entry resolves to a path that is a DIRECTORY on disk, and the given path resolves to that directory itself or anything underneath it.
111
+
112
+ There is no glob support: a `sources` entry is a plain path everywhere else in this package (`sources-shape`'s existence check is a bare `fs.existsSync`, never glob expansion), so `docs-for` matches nothing wider than what `check` already validates against. A `sources` entry that does not exist on disk (already flagged by `sources-shape`) can only match by exact string equality, never by directory containment, since there is nothing to inspect there.
113
+
114
+ **Resolution:** every `sources` entry is resolved with `path.join(repoRoot, source)`, exactly as `check`'s `sources-shape` rule resolves it -- a leading slash in the frontmatter spelling (`/src/foo.ts`) is repo-relative, not filesystem-absolute, so `check` and `docs-for` always agree on what a given `sources` entry points at. A given `<path>` argument, relative or absolute, is resolved by ONE rule regardless of spelling: `path.resolve(repoRoot, path)` (a relative argument joins onto `repoRoot`; an absolute one is used as-is, exactly as `path.resolve` treats a second absolute argument). Either way, a leading `./` and a trailing slash are normalized away before comparing, on both the given path and the `sources` entry. A resolved given path that lies outside `--repo-root` -- an absolute path elsewhere on disk (including `--repo-root`'s own parent), or a relative `../` escape -- is a usage error (exit 2), never a silent empty result. `--repo-root` itself, given directly as a `<path>` argument, is accepted (not an error); it only matches a `sources` entry that itself resolves to `--repo-root` (`.` or `./`). The containment check compares path spellings, not real paths: an absolute `<path>` that reaches the repo through a different spelling (a symlinked checkout, or macOS `/tmp` versus `/private/tmp`) is rejected as outside. An auto-detected repo root is git's resolved `--show-toplevel`, so prefer relative `<path>` arguments, or use that same spelling.
115
+
116
+ **Output:** text output is one line per matching doc, bundle-relative path (the same convention `check`'s own findings use), followed by the `sources` entries of its that matched (`doc.md: src/foo.ts, src/bar/`); an empty result says so explicitly rather than printing nothing. `--json` gives `{ bundleDir, matches: [{ doc, sources: [...] }] }`, one entry per matching doc, sorted by `doc`, each entry's `sources` deduplicated and sorted; `bundleDir` is the ABSOLUTE, machine-bound path `docs-for` resolved the bundle directory argument to (not repo-relative), so a consumer that stores the JSON output should not expect it to be portable across machines or checkouts. **Exit codes:** 0 whether or not anything matched; 2 for a usage error (unknown/missing bundle directory, no `<path>` arguments given, no repo root determinable, or a given path outside `--repo-root`, relative or absolute).
117
+
118
+ **Symlinked directory sources:** a `sources` entry that is a symlink to a directory is followed (`fs.statSync`, not `fs.lstatSync`), so it is treated as a directory and containment is checked against ITS OWN spelling: a given path underneath the symlink's spelling matches, but the same file addressed through the real directory's path does not (and vice versa) -- the two spellings are never treated as equivalent. This mirrors how `sources-fresh`'s own `git log` pathspec lookup only ever sees the spelling actually committed in frontmatter.
119
+
92
120
  ## Staleness (sources-fresh)
93
121
 
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 only where BOTH sides name the same instant on every machine; a side that does not takes a raw-identity fallback instead of a verdict that depends on `TZ` (see **Designator gate**). 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:
122
+ `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
123
 
96
124
  | Situation | Severity | Message |
97
125
  |-----------|----------|---------|
98
126
  | 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
127
  | 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
128
  | 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 are direction-comparable; see **Designator gate**) | 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 |
129
+ | 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
130
  | 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 |
103
131
  | 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) |
104
132
  | 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) |
@@ -113,7 +141,7 @@ Known limitation: a `git log` call that fails for a reason other than "no histor
113
141
 
114
142
  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
143
 
116
- **Designator gate** (the one description of this gate; everything else in this README points here). Direction is judged only when BOTH sides name the same instant on every machine. Two cases fall short of that, and both fall 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. First, a side that cannot be parsed to an instant at all (missing, blank, or a string `Date.parse` rejects). Second, a side spelled without a UTC designator (`2026-01-01T13:00:00`: no `Z`, no numeric offset), which `Date.parse` resolves in the MACHINE'S own timezone -- judged directly, one repository would read as re-stamped on a UTC runner and as moved backwards on a UTC+9 laptop, so the fallback is what keeps the direction verdict a property of the repository rather than of `TZ`. The gate applies to whichever side carries the ambiguity, the new value or the one it replaced. A numeric offset (`+02:00`) is unambiguous and IS judged normally, 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. The same test gates `sources-fresh-future`'s clock-skew check, whose allowance is minutes wide, narrower than the hours a timezone shifts; what stays UNGATED is `sources-fresh`'s own day-wide staleness comparison, where a few hours are immaterial and gating them would turn a harmless ambiguity into a skipped check. See `compareRestampDirection`'s doc comment in `src/rules/sources-fresh.ts` for the fallback's exact behavior.
144
+ **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.
117
145
 
118
146
  **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:
119
147
 
@@ -158,7 +186,7 @@ If it reports a doc STALE, re-verify that doc against its current `sources` and
158
186
  | Source edited, doc left alone (not re-stamped) | exit 1, `sources-fresh` STALE |
159
187
  | Source edit and doc re-stamp committed TOGETHER, flag OFF | exit 0, clean (the committed-history co-commit rescue, unaffected by this flag) |
160
188
  | Doc dirty for an unrelated reason (a body edit, `timestamp` value unchanged), source edited | exit 1, `sources-fresh` STALE -- not rescued |
161
- | Doc re-stamped on disk to a value BEFORE the one committed at `HEAD` (a backwards move), source edited (when both values are direction-comparable; see **Designator gate** 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) |
189
+ | 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
190
  | 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) |
163
191
  | 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 |
164
192
 
@@ -187,7 +215,7 @@ The skew allowance defaults to 10 minutes (600 seconds), absorbing the ordinary
187
215
 
188
216
  **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.
189
217
 
190
- **Why a bare datetime is skipped here:** it is the same gate `sources-fresh` applies to its re-stamp direction comparison; of the comparisons in either rule, only `sources-fresh`'s day-wide staleness comparison stays ungated. See **Designator gate** under "Staleness (sources-fresh)" for what the gate tests, which values pass it, and why.
218
+ **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.
191
219
 
192
220
  **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.
193
221
 
@@ -325,7 +353,7 @@ This is advisory: don't fail the build on warnings unless you pass `--strict`. U
325
353
  with:
326
354
  fetch-depth: 0
327
355
  - name: OKF bundle check
328
- run: npx okf-kit@0.13.0 check path/to/bundle
356
+ run: npx okf-kit@0.15.0 check path/to/bundle
329
357
  ```
330
358
 
331
359
  Pin the version: an unpinned `npx okf-kit` picks up new rules on their release day, which turns an unrelated PR red.
package/dist/cli.js CHANGED
@@ -5,6 +5,7 @@ import process from "node:process";
5
5
  import { pathToFileURL } from "node:url";
6
6
  import { Command, CommanderError } from "commander";
7
7
  import { loadBundle } from "./bundle.js";
8
+ import { renderDocsForJson, renderDocsForText, runDocsFor, } from "./docs-for.js";
8
9
  import { UsageError } from "./errors.js";
9
10
  import { detectRepoRoot } from "./git.js";
10
11
  import { formatInitSummary, runInit } from "./init.js";
@@ -119,6 +120,34 @@ program
119
120
  process.exit(2);
120
121
  }
121
122
  });
123
+ program
124
+ .command("docs-for <bundleDir> <paths...>")
125
+ .description("List every bundle doc whose frontmatter `sources` claims one of the given paths (relative or absolute, resolved against --repo-root; a path outside it is a usage error)")
126
+ .option("-r, --repo-root <path>", "Repo root the given paths and each doc's `sources` entries are resolved against (auto-detected via " +
127
+ "`git rev-parse --show-toplevel` from the bundle dir when omitted)")
128
+ .option("-j, --json", "Output matches as JSON")
129
+ .exitOverride()
130
+ .action((bundleDir, paths, opts) => {
131
+ try {
132
+ const result = runDocsFor(bundleDir, paths, {
133
+ repoRoot: opts.repoRoot,
134
+ });
135
+ const output = opts.json
136
+ ? renderDocsForJson(result)
137
+ : renderDocsForText(result);
138
+ process.stdout.write(output);
139
+ process.exit(0);
140
+ }
141
+ catch (err) {
142
+ if (err instanceof UsageError) {
143
+ process.stderr.write(`okf-kit: ${err.message}\n`);
144
+ process.exit(2);
145
+ }
146
+ const msg = err instanceof Error ? err.message : String(err);
147
+ process.stderr.write(`okf-kit: ${msg}\n`);
148
+ process.exit(2);
149
+ }
150
+ });
122
151
  program
123
152
  .command("init [dir]")
124
153
  .description("Scaffold a starter OKF v0.1 knowledge bundle (default target: docs/okf)")
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGhE,OAAO,EAAE,UAAU,EAAE,CAAC;AA8DtB,MAAM,UAAU,QAAQ,CACtB,SAAiB,EACjB,UAAwB,EAAE;IAE1B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CA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YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAC1C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAyB,CAAC;QACrD,OAAO,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC"}
@@ -0,0 +1,75 @@
1
+ import type { RunGit } from "./types.js";
2
+ export interface DocsForOptions {
3
+ repoRoot?: string;
4
+ /** Test-only override for git access; production code shells out to the real `git` binary. */
5
+ runGit?: RunGit;
6
+ }
7
+ /** One bundle doc whose `sources` matched at least one given path, and which of its sources matched. */
8
+ export interface DocsForMatch {
9
+ /** Bundle-relative path, forward-slash separated (same convention as `Finding.file`). */
10
+ doc: string;
11
+ /** The doc's own `sources` entries that matched at least one given path, sorted, deduplicated. */
12
+ sources: string[];
13
+ }
14
+ export interface DocsForResult {
15
+ bundleDir: string;
16
+ matches: DocsForMatch[];
17
+ }
18
+ /**
19
+ * `okf-kit docs-for <bundleDir> <path>...`: which bundle docs claim a given
20
+ * path (relative or absolute, resolved against repoRoot) as a `sources`
21
+ * entry, directly.
22
+ *
23
+ * Reuses the IDENTICAL `sources` population `sources-shape`/`sources-fresh`
24
+ * assess (`getDocsWithSources`, shape-validated via `getValidSources`): a
25
+ * doc with no `sources` key, or a malformed one, contributes no matches
26
+ * here either -- that shape error is `sources-shape`'s job to report, not
27
+ * this command's.
28
+ *
29
+ * Matching a `sources` entry against a given path:
30
+ * - exact match: the given path resolves to the exact same path the
31
+ * `sources` entry resolves to.
32
+ * - directory containment: when the `sources` entry resolves to a path
33
+ * that is a DIRECTORY on disk, a given path resolving underneath it also
34
+ * matches -- the same population `sources-fresh` assesses staleness for
35
+ * via a directory pathspec (see that rule's git-log lookup). A `sources`
36
+ * entry that does not exist on disk (already flagged by `sources-shape`)
37
+ * can only match by exact string equality, never by containment, since
38
+ * there is nothing to `fs.statSync` there.
39
+ *
40
+ * No glob support: `sources` entries are plain paths here exactly as they
41
+ * are everywhere else in this package (`sources-shape`'s existence check is
42
+ * a bare `fs.existsSync`, never a glob expansion), so `docs-for` matches the
43
+ * same population `check` already validates against and nothing wider.
44
+ *
45
+ * `sources` entries are resolved EXACTLY as `check`'s `sources-shape` rule
46
+ * resolves them (`resolveRepoPath`, `path.join(repoRoot, source)`): an
47
+ * entry spelled with a leading slash (`/src/foo.ts`) is repo-relative, not
48
+ * filesystem-absolute, so `check` and `docs-for` agree on what it points
49
+ * at.
50
+ *
51
+ * A given `<path>` argument, relative or absolute, is resolved by ONE rule
52
+ * regardless of spelling: `path.resolve(repoRoot, path)` (a relative
53
+ * argument joins onto `repoRoot`; an absolute one is used as-is, exactly
54
+ * as `path.resolve` treats a second absolute argument), normalized (a
55
+ * leading `./` and a trailing slash disappear), then checked for
56
+ * containment in `repoRoot`. A path that resolves outside `repoRoot` --
57
+ * an absolute path elsewhere on disk (including `repoRoot`'s own parent),
58
+ * or a relative `../` escape -- is a usage error (exit 2), not a silent
59
+ * empty result: `path.resolve`'s ordinary "an absolute second argument
60
+ * wins" behavior would otherwise let a stray absolute path quietly escape
61
+ * `repoRoot` and report no matches instead of failing loudly. `repoRoot`
62
+ * itself, given directly, is accepted (not an error); it only matches a
63
+ * `sources` entry that itself resolves to `repoRoot` (`.` or `./`).
64
+ */
65
+ export declare function runDocsFor(bundleDir: string, paths: string[], options?: DocsForOptions): DocsForResult;
66
+ /**
67
+ * Text output: one doc per line (bundle-relative path, matching `check`'s
68
+ * own `Finding.file` convention), followed by the `sources` entries of its
69
+ * that matched, so a human can see WHICH source claim(s) pulled the doc in
70
+ * without switching to `--json`. "no matches" is reported explicitly rather
71
+ * than as silent empty output, mirroring `renderText`'s own "clean, no
72
+ * findings" line in report.ts.
73
+ */
74
+ export declare function renderDocsForText(result: DocsForResult): string;
75
+ export declare function renderDocsForJson(result: DocsForResult): string;
@@ -0,0 +1,156 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import { loadBundle } from "./bundle.js";
4
+ import { UsageError } from "./errors.js";
5
+ import { detectRepoRoot } from "./git.js";
6
+ import { getDocsWithSources } from "./rules/sources-fresh.js";
7
+ import { resolveRepoPath } from "./util.js";
8
+ /**
9
+ * `okf-kit docs-for <bundleDir> <path>...`: which bundle docs claim a given
10
+ * path (relative or absolute, resolved against repoRoot) as a `sources`
11
+ * entry, directly.
12
+ *
13
+ * Reuses the IDENTICAL `sources` population `sources-shape`/`sources-fresh`
14
+ * assess (`getDocsWithSources`, shape-validated via `getValidSources`): a
15
+ * doc with no `sources` key, or a malformed one, contributes no matches
16
+ * here either -- that shape error is `sources-shape`'s job to report, not
17
+ * this command's.
18
+ *
19
+ * Matching a `sources` entry against a given path:
20
+ * - exact match: the given path resolves to the exact same path the
21
+ * `sources` entry resolves to.
22
+ * - directory containment: when the `sources` entry resolves to a path
23
+ * that is a DIRECTORY on disk, a given path resolving underneath it also
24
+ * matches -- the same population `sources-fresh` assesses staleness for
25
+ * via a directory pathspec (see that rule's git-log lookup). A `sources`
26
+ * entry that does not exist on disk (already flagged by `sources-shape`)
27
+ * can only match by exact string equality, never by containment, since
28
+ * there is nothing to `fs.statSync` there.
29
+ *
30
+ * No glob support: `sources` entries are plain paths here exactly as they
31
+ * are everywhere else in this package (`sources-shape`'s existence check is
32
+ * a bare `fs.existsSync`, never a glob expansion), so `docs-for` matches the
33
+ * same population `check` already validates against and nothing wider.
34
+ *
35
+ * `sources` entries are resolved EXACTLY as `check`'s `sources-shape` rule
36
+ * resolves them (`resolveRepoPath`, `path.join(repoRoot, source)`): an
37
+ * entry spelled with a leading slash (`/src/foo.ts`) is repo-relative, not
38
+ * filesystem-absolute, so `check` and `docs-for` agree on what it points
39
+ * at.
40
+ *
41
+ * A given `<path>` argument, relative or absolute, is resolved by ONE rule
42
+ * regardless of spelling: `path.resolve(repoRoot, path)` (a relative
43
+ * argument joins onto `repoRoot`; an absolute one is used as-is, exactly
44
+ * as `path.resolve` treats a second absolute argument), normalized (a
45
+ * leading `./` and a trailing slash disappear), then checked for
46
+ * containment in `repoRoot`. A path that resolves outside `repoRoot` --
47
+ * an absolute path elsewhere on disk (including `repoRoot`'s own parent),
48
+ * or a relative `../` escape -- is a usage error (exit 2), not a silent
49
+ * empty result: `path.resolve`'s ordinary "an absolute second argument
50
+ * wins" behavior would otherwise let a stray absolute path quietly escape
51
+ * `repoRoot` and report no matches instead of failing loudly. `repoRoot`
52
+ * itself, given directly, is accepted (not an error); it only matches a
53
+ * `sources` entry that itself resolves to `repoRoot` (`.` or `./`).
54
+ */
55
+ export function runDocsFor(bundleDir, paths, options = {}) {
56
+ if (!fs.existsSync(bundleDir) || !fs.statSync(bundleDir).isDirectory()) {
57
+ throw new UsageError(`Bundle directory does not exist: ${bundleDir}`);
58
+ }
59
+ if (paths.length === 0) {
60
+ throw new UsageError("docs-for requires at least one <path> argument");
61
+ }
62
+ const resolvedBundleDir = path.resolve(bundleDir);
63
+ const repoRoot = options.repoRoot
64
+ ? path.resolve(options.repoRoot)
65
+ : detectRepoRoot(resolvedBundleDir, options.runGit);
66
+ if (!repoRoot) {
67
+ throw new UsageError("docs-for could not determine a repo root (pass --repo-root; auto-detection via " +
68
+ "`git rev-parse --show-toplevel` found no enclosing git work tree)");
69
+ }
70
+ const ctx = loadBundle(resolvedBundleDir, repoRoot, options.runGit);
71
+ const docsWithSources = getDocsWithSources(ctx);
72
+ const givenAbsPaths = paths.map((p) => resolveGivenPath(repoRoot, p));
73
+ const matches = [];
74
+ for (const { doc, sources } of docsWithSources) {
75
+ const matchedSources = new Set();
76
+ for (const source of sources) {
77
+ const sourceAbs = stripTrailingSep(resolveRepoPath(repoRoot, source));
78
+ let sourceIsDir = false;
79
+ try {
80
+ sourceIsDir = fs.statSync(sourceAbs).isDirectory();
81
+ }
82
+ catch {
83
+ sourceIsDir = false;
84
+ }
85
+ for (const given of givenAbsPaths) {
86
+ if (given === sourceAbs) {
87
+ matchedSources.add(source);
88
+ }
89
+ else if (sourceIsDir && isWithinDirectory(sourceAbs, given)) {
90
+ matchedSources.add(source);
91
+ }
92
+ }
93
+ }
94
+ if (matchedSources.size > 0) {
95
+ matches.push({
96
+ doc: doc.relPath,
97
+ sources: [...matchedSources].sort(),
98
+ });
99
+ }
100
+ }
101
+ matches.sort((a, b) => a.doc.localeCompare(b.doc));
102
+ return { bundleDir: resolvedBundleDir, matches };
103
+ }
104
+ /**
105
+ * Resolves a given `<path>` CLI argument against `repoRoot` by the ONE rule
106
+ * described in `runDocsFor`'s own doc comment: `path.resolve(repoRoot,
107
+ * given)` regardless of whether `given` is relative or absolute, then
108
+ * normalized (`stripTrailingSep`). The resolved path must be `repoRoot`
109
+ * itself, or a strict descendant of it (checked with `isWithinDirectory`,
110
+ * the SAME containment helper a directory `sources` entry match uses, so a
111
+ * given path and a directory source are judged "inside" by identical
112
+ * logic); otherwise this throws a `UsageError` naming the offending path
113
+ * rather than silently reporting no matches.
114
+ */
115
+ function resolveGivenPath(repoRoot, given) {
116
+ const abs = stripTrailingSep(path.resolve(repoRoot, given));
117
+ if (abs !== repoRoot && !isWithinDirectory(repoRoot, abs)) {
118
+ throw new UsageError(`docs-for: path lies outside --repo-root, rejecting rather than silently matching nothing: ${given}`);
119
+ }
120
+ return abs;
121
+ }
122
+ /** Strips a single trailing path separator, leaving the filesystem root (`/`) untouched. */
123
+ function stripTrailingSep(p) {
124
+ return p.length > 1 && p.endsWith(path.sep) ? p.slice(0, -1) : p;
125
+ }
126
+ /**
127
+ * Whether `target` is strictly a descendant of `dir` (not `dir` itself --
128
+ * callers that also want to match `dir` itself check equality separately
129
+ * before calling this). Both must already be resolved, absolute paths.
130
+ */
131
+ function isWithinDirectory(dir, target) {
132
+ const rel = path.relative(dir, target);
133
+ return (rel !== "" &&
134
+ rel !== ".." &&
135
+ !rel.startsWith(".." + path.sep) &&
136
+ !path.isAbsolute(rel));
137
+ }
138
+ /**
139
+ * Text output: one doc per line (bundle-relative path, matching `check`'s
140
+ * own `Finding.file` convention), followed by the `sources` entries of its
141
+ * that matched, so a human can see WHICH source claim(s) pulled the doc in
142
+ * without switching to `--json`. "no matches" is reported explicitly rather
143
+ * than as silent empty output, mirroring `renderText`'s own "clean, no
144
+ * findings" line in report.ts.
145
+ */
146
+ export function renderDocsForText(result) {
147
+ if (result.matches.length === 0) {
148
+ return `okf-kit: no bundle doc claims any given path as a source, in ${result.bundleDir}\n`;
149
+ }
150
+ const lines = result.matches.map((m) => `${m.doc}: ${m.sources.join(", ")}`);
151
+ return lines.join("\n") + "\n";
152
+ }
153
+ export function renderDocsForJson(result) {
154
+ return JSON.stringify(result, null, 2) + "\n";
155
+ }
156
+ //# sourceMappingURL=docs-for.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs-for.js","sourceRoot":"","sources":["../src/docs-for.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAsB5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,UAAU,UAAU,CACxB,SAAiB,EACjB,KAAe,EACf,UAA0B,EAAE;IAE5B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;QACvE,MAAM,IAAI,UAAU,CAAC,oCAAoC,SAAS,EAAE,CAAC,CAAC;IACxE,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;Q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AAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACnE,CAAC;AAED;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,GAAW,EAAE,MAAc;IACpD,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACvC,OAAO,CACL,GAAG,KAAK,EAAE;QACV,GAAG,KAAK,IAAI;QACZ,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC;QAChC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CACtB,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAqB;IACrD,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChC,OAAO,gEAAgE,MAAM,CAAC,SAAS,IAAI,CAAC;IAC9F,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7E,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAAqB;IACrD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;AAChD,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Rule } from "../types.js";
1
+ import type { BundleContext, BundleDoc, Rule } from "../types.js";
2
2
  /**
3
3
  * Default clock-skew allowance (seconds) for `sources-fresh-future`: a doc
4
4
  * timestamp up to this far after the doc's own last commit is still treated
@@ -42,3 +42,15 @@ export declare const sourcesFreshRule: Rule;
42
42
  * gets caught before the commit that would otherwise make it so in CI.
43
43
  */
44
44
  export declare const sourcesFreshFutureRule: Rule;
45
+ /**
46
+ * Docs carrying a validly-shaped frontmatter `sources` list (see
47
+ * `getValidSources`), each paired with that list. Shared by both rules in
48
+ * this file: `sources-fresh` and `sources-fresh-future` assess the same
49
+ * doc population, just in opposite time directions. Also exported for
50
+ * `docs-for`'s reverse lookup, so that command's population cannot drift
51
+ * from what these rules assess.
52
+ */
53
+ export declare function getDocsWithSources(ctx: BundleContext): Array<{
54
+ doc: BundleDoc;
55
+ sources: string[];
56
+ }>;
@@ -329,9 +329,11 @@ export const sourcesFreshFutureRule = {
329
329
  * Docs carrying a validly-shaped frontmatter `sources` list (see
330
330
  * `getValidSources`), each paired with that list. Shared by both rules in
331
331
  * this file: `sources-fresh` and `sources-fresh-future` assess the same
332
- * doc population, just in opposite time directions.
332
+ * doc population, just in opposite time directions. Also exported for
333
+ * `docs-for`'s reverse lookup, so that command's population cannot drift
334
+ * from what these rules assess.
333
335
  */
334
- function getDocsWithSources(ctx) {
336
+ export function getDocsWithSources(ctx) {
335
337
  return ctx.docs
336
338
  .map((doc) => ({ doc, sources: getValidSources(doc.frontmatter.parsed) }))
337
339
  .filter((entry) => entry.sources !== undefined);
@@ -719,28 +721,6 @@ function isShallowRepoShared(ctx, git, repoRoot) {
719
721
  shallowRepoCache.set(ctx, isShallow);
720
722
  return isShallow;
721
723
  }
722
- /**
723
- * Whether one side of the direction comparison resolves to an instant that
724
- * is the SAME on every machine, which is what `compareRestampDirection` has
725
- * to have before it may call one value earlier or later than another
726
- * (D-013). BOTH sides go through it, not just the newer one.
727
- *
728
- * A native `Date` (`getRawTimestampString` returns undefined for it) is
729
- * comparable: the YAML parser already resolved it to a fixed instant (a
730
- * `!!timestamp` scalar without a zone is UTC by the YAML 1.1 spec, not
731
- * local time), and `Date#getTime()` is that instant on every machine.
732
- * Undefined for any OTHER reason (missing, blank, non-scalar) cannot reach
733
- * here: this is only consulted for a side `getTimestampEpochMs` already
734
- * resolved, and those cases resolve to undefined there.
735
- *
736
- * What `hasUtcDesignator` tests, which comparisons this gate covers, and
737
- * why, is written down once: see the README's "Designator gate" paragraph
738
- * under "Staleness (sources-fresh)".
739
- */
740
- function isDirectionComparable(parsed) {
741
- const raw = getRawTimestampString(parsed);
742
- return raw === undefined || hasUtcDesignator(raw);
743
- }
744
724
  /**
745
725
  * How the same-instant notice names ONE side's frontmatter value: its raw
746
726
  * spelling, quoted, so the reader sees the two different strings that
@@ -791,23 +771,25 @@ function describeTimestampValue(parsed, epochMs) {
791
771
  * re-stamp ATTEMPT, so it gets neither `backwards` nor `sameInstant` --
792
772
  * there is nothing to notice.
793
773
  *
794
- * When EITHER side's `timestamp` cannot be parsed to an instant at all
795
- * (missing, blank, or a string `Date.parse` rejects), OR either side is a
796
- * string the designator gate rejects (D-013, see `isDirectionComparable`),
797
- * direction cannot be judged: this falls back to today's pre-D-004
798
- * behaviour of comparing the two values' raw IDENTITY
774
+ * When EITHER side's `timestamp` cannot be parsed to an instant AT ALL
775
+ * (missing, blank, or a string `Date.parse` rejects even with a `Z`
776
+ * appended), direction cannot be judged: this falls back to today's
777
+ * pre-D-004 behaviour of comparing the two values' raw IDENTITY
799
778
  * (`getTimestampIdentity`) instead of guessing a direction -- any textual
800
779
  * change still counts as `restamped`, exactly as before this decision
801
780
  * existed, and never triggers `backwards` or `sameInstant` (there is no
802
- * direction to report either way).
781
+ * direction to report either way). A side spelled without a UTC designator
782
+ * (`2026-01-01T13:00:00`: no `Z`, no numeric offset) is NOT such a case:
783
+ * `getTimestampEpochMs` (via `parseTimestampInstantMs` in `src/util.ts`)
784
+ * forces UTC for it, so it resolves to the SAME instant on every machine
785
+ * and IS judged for direction like any other comparable value (D-016). See
786
+ * the README's "Staleness (sources-fresh)" section, "Designator-less
787
+ * timestamps", for the full rationale.
803
788
  */
804
789
  function compareRestampDirection(currentParsed, beforeParsed, location) {
805
790
  const currentEpochMs = getTimestampEpochMs(currentParsed);
806
791
  const beforeEpochMs = getTimestampEpochMs(beforeParsed);
807
- if (currentEpochMs === undefined ||
808
- beforeEpochMs === undefined ||
809
- !isDirectionComparable(currentParsed) ||
810
- !isDirectionComparable(beforeParsed)) {
792
+ if (currentEpochMs === undefined || beforeEpochMs === undefined) {
811
793
  const currentStamp = getTimestampIdentity(currentParsed);
812
794
  const beforeStamp = getTimestampIdentity(beforeParsed);
813
795
  return {
@@ -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,mBAAmB,EACnB,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,08BAA08B;IAC58B,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,mEA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AAyE;IACzE,gDAAgD;IAChD,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,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"}
@@ -1,6 +1,5 @@
1
1
  import fs from "node:fs";
2
- import path from "node:path";
3
- import { getValidSources, hasSourcesKey } from "../util.js";
2
+ import { getValidSources, hasSourcesKey, resolveRepoPath } from "../util.js";
4
3
  const RULE_ID = "sources-shape";
5
4
  export const sourcesShapeRule = {
6
5
  id: RULE_ID,
@@ -24,7 +23,7 @@ export const sourcesShapeRule = {
24
23
  if (!ctx.repoRoot)
25
24
  continue;
26
25
  for (const source of sources) {
27
- const target = path.join(ctx.repoRoot, source);
26
+ const target = resolveRepoPath(ctx.repoRoot, source);
28
27
  if (!fs.existsSync(target)) {
29
28
  findings.push({
30
29
  ruleId: RULE_ID,
@@ -1 +1 @@
1
- {"version":3,"file":"sources-shape.js","sourceRoot":"","sources":["../../src/rules/sources-shape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG5D,MAAM,OAAO,GAAG,eAAe,CAAC;AAEhC,MAAM,CAAC,MAAM,gBAAgB,GAAS;IACpC,EAAE,EAAE,OAAO;IACX,WAAW,EACT,sKAAsK;IACxK,GAAG,CAAC,GAAG;QACL,MAAM,QAAQ,GAAc,EAAE,CAAC;QAC/B,KAAK,MAAM,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;YAC3B,MAAM,MAAM,GAAG,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC;YACtC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;gBAAE,SAAS;YAErC,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;YACxC,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,QAAQ,CAAC,IAAI,CAAC;oBACZ,MAAM,EAAE,OAAO;oBACf,QAAQ,EAAE,OAAO;oBACjB,IAAI,EAAE,GAAG,CAAC,OAAO;oBACjB,OAAO,EACL,uEAAuE;iBAC1E,CAAC,CAAC;gBACH,SAAS;YACX,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,QAAQ;gBAAE,SAAS;YAC5B,KAAK,MAAM,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EAAuE;iBAC1E,CAAC,CAAC;gBACH,SAAS;YACX,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,QAAQ;gBAAE,SAAS;YAC5B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC7B,MAAM,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;gBACrD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;oBAC3B,QAAQ,CAAC,IAAI,CAAC;wBACZ,MAAM,EAAE,OAAO;wBACf,QAAQ,EAAE,OAAO;wBACjB,IAAI,EAAE,GAAG,CAAC,OAAO;wBACjB,OAAO,EAAE,iDAAiD,MAAM,IAAI;qBACrE,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAC"}
package/dist/util.d.ts CHANGED
@@ -10,6 +10,20 @@ export declare function hasSourcesKey(parsed: unknown): boolean;
10
10
  * sources-shape).
11
11
  */
12
12
  export declare function getValidSources(parsed: unknown): string[] | undefined;
13
+ /**
14
+ * Resolves a `sources` frontmatter entry (a plain string, never a glob)
15
+ * against `repoRoot` with `path.join`, not `path.resolve`. The difference
16
+ * matters for a source spelled with a leading slash (`/src/foo.ts`):
17
+ * `path.join` treats it as repo-relative, exactly like every other entry,
18
+ * while `path.resolve` would treat the leading slash as an instruction to
19
+ * re-root at the filesystem root, silently escaping `repoRoot` entirely.
20
+ * Shared by two callers: `sources-shape` (existence check) and `docs-for`
21
+ * (reverse lookup, resolving each doc's `sources` entries), so they agree
22
+ * on what a `sources` entry resolves to. `sources-fresh.ts`'s own inline
23
+ * `path.join` calls compute the same thing but are not routed through this
24
+ * helper.
25
+ */
26
+ export declare function resolveRepoPath(repoRoot: string, source: string): string;
13
27
  /**
14
28
  * Returns the frontmatter `timestamp` as a Unix epoch (seconds), or
15
29
  * undefined when absent, not a Date/string, or not parseable as a date.
@@ -18,7 +32,9 @@ export declare function getValidSources(parsed: unknown): string[] | undefined;
18
32
  * (core) schema resolves timestamp scalars to strings, but a YAML 1.1
19
33
  * `!!timestamp` tag (or a caller constructing frontmatter programmatically)
20
34
  * can hand back a native `Date`, and that should be assessed rather than
21
- * degrade to the no-valid-timestamp notice.
35
+ * degrade to the no-valid-timestamp notice. A designator-less STRING is
36
+ * parsed via `parseTimestampInstantMs`, i.e. as UTC, so this epoch never
37
+ * depends on the machine's local timezone (D-016).
22
38
  */
23
39
  export declare function getTimestampEpoch(parsed: unknown): number | undefined;
24
40
  /**
@@ -33,7 +49,8 @@ export declare function getTimestampEpoch(parsed: unknown): number | undefined;
33
49
  * thresholds (days, not milliseconds) make the distinction this function
34
50
  * exists for immaterial there, so there was no reason to touch them. Read
35
51
  * as an instant at millisecond resolution, exactly like `getTimestampEpoch`
36
- * otherwise -- same `Date` vs. string handling, same undefined cases.
52
+ * otherwise -- same `Date` vs. string handling, same undefined cases, same
53
+ * UTC-forcing treatment of a designator-less string (D-016).
37
54
  */
38
55
  export declare function getTimestampEpochMs(parsed: unknown): number | undefined;
39
56
  /**
@@ -42,9 +59,10 @@ export declare function getTimestampEpochMs(parsed: unknown): number | undefined
42
59
  * `getTimestampEpoch`'s doc comment) returns undefined here too, since a
43
60
  * `Date`'s `getTime()` already names one instant on every machine, so
44
61
  * there is no raw spelling left for a caller to inspect. Callers:
45
- * `hasUtcDesignator`'s two gates (`sources-fresh-future`'s clock-skew
46
- * check and `isDirectionComparable`, D-013), and `describeTimestampValue`,
47
- * which names each side's raw spelling in the same-instant notice.
62
+ * `hasUtcDesignator` (`sources-fresh-future`'s clock-skew check, and
63
+ * `parseTimestampInstantMs`'s UTC-forcing decision, D-016), and
64
+ * `describeTimestampValue`, which names each side's raw spelling in the
65
+ * same-instant notice.
48
66
  */
49
67
  export declare function getRawTimestampString(parsed: unknown): string | undefined;
50
68
  /**
@@ -55,11 +73,17 @@ export declare function getRawTimestampString(parsed: unknown): string | undefin
55
73
  * already names a real UTC instant, so nothing beyond recognizing it is
56
74
  * needed here.
57
75
  *
58
- * Two callers gate on this predicate: `sources-fresh-future`'s clock-skew
59
- * check, and `compareRestampDirection`'s re-stamp direction comparison
60
- * (through `isDirectionComparable`, D-013). Which comparisons the gate
61
- * covers, which one stays ungated, and why, is written down once: see the
62
- * README's "Designator gate" paragraph under "Staleness (sources-fresh)".
76
+ * Two callers consult this predicate, and they respond to the same
77
+ * ambiguity in two different ways (D-016): `sources-fresh-future`'s
78
+ * clock-skew check SKIPS a designator-less timestamp entirely (a notice,
79
+ * not a warning) rather than compare it -- that allowance is minutes wide,
80
+ * too narrow to safely absorb a multi-hour timezone shift. `sources-fresh`
81
+ * instead FORCES UTC for it (`parseTimestampInstantMs`), for both its
82
+ * day-wide staleness comparison and its re-stamp direction comparison
83
+ * (`compareRestampDirection`) -- its thresholds are day-wide, so treating
84
+ * the value as UTC everywhere is both consistent and safe. Which rule takes
85
+ * which approach, and why, is written down once: see the README's
86
+ * "Designator-less timestamps" paragraph under "Staleness (sources-fresh)".
63
87
  */
64
88
  export declare function hasUtcDesignator(raw: string): boolean;
65
89
  /**
@@ -72,13 +96,12 @@ export declare function hasUtcDesignator(raw: string): boolean;
72
96
  * places, both of them comparing identities rather than instants:
73
97
  *
74
98
  * - as its FALLBACK, when direction cannot be judged at all: either side
75
- * unparseable to an instant (`getTimestampEpochMs` returns undefined),
76
- * or either side a string the designator gate rejects
77
- * (`isDirectionComparable`, D-013). With nothing comparable to order,
78
- * the question becomes "did the raw value change", and any textual
79
- * change counts as `restamped` -- see that function's doc comment for
80
- * the full three-way split.
81
- * - when both sides ARE direction-comparable and name the SAME instant,
99
+ * unparseable to an instant even after `getTimestampEpochMs` forces UTC
100
+ * for a designator-less string (D-016). With nothing comparable to
101
+ * order, the question becomes "did the raw value change", and any
102
+ * textual change counts as `restamped` -- see that function's doc
103
+ * comment for the full three-way split.
104
+ * - when both sides DO resolve to an instant and name the SAME one,
82
105
  * to tell a rewrite (a different spelling of that one instant, e.g.
83
106
  * `2026-01-01T00:00:00Z` to `2026-01-01T00:00:00+00:00`, which gets
84
107
  * the D-009 notice) from a byte-identical value (never a re-stamp
package/dist/util.js CHANGED
@@ -1,3 +1,4 @@
1
+ import path from "node:path";
1
2
  export function isRecord(value) {
2
3
  return typeof value === "object" && value !== null && !Array.isArray(value);
3
4
  }
@@ -22,6 +23,50 @@ export function getValidSources(parsed) {
22
23
  sources.every((s) => typeof s === "string" && s.trim() !== "");
23
24
  return isValidShape ? sources : undefined;
24
25
  }
26
+ /**
27
+ * Resolves a `sources` frontmatter entry (a plain string, never a glob)
28
+ * against `repoRoot` with `path.join`, not `path.resolve`. The difference
29
+ * matters for a source spelled with a leading slash (`/src/foo.ts`):
30
+ * `path.join` treats it as repo-relative, exactly like every other entry,
31
+ * while `path.resolve` would treat the leading slash as an instruction to
32
+ * re-root at the filesystem root, silently escaping `repoRoot` entirely.
33
+ * Shared by two callers: `sources-shape` (existence check) and `docs-for`
34
+ * (reverse lookup, resolving each doc's `sources` entries), so they agree
35
+ * on what a `sources` entry resolves to. `sources-fresh.ts`'s own inline
36
+ * `path.join` calls compute the same thing but are not routed through this
37
+ * helper.
38
+ */
39
+ export function resolveRepoPath(repoRoot, source) {
40
+ return path.join(repoRoot, source);
41
+ }
42
+ /**
43
+ * Parses a frontmatter `timestamp` STRING to milliseconds since the epoch,
44
+ * forcing UTC interpretation whenever the string carries no UTC designator
45
+ * (`Z`) or numeric offset (`hasUtcDesignator`, D-016). `Date.parse` resolves
46
+ * a designator-less string ("2026-01-01T13:00:00") in the machine's LOCAL
47
+ * timezone by default, which would make every caller that reads a
48
+ * `timestamp` through this function -- `sources-fresh`'s own day-wide
49
+ * staleness comparison AND its re-stamp direction comparison
50
+ * (`compareRestampDirection` in `src/rules/sources-fresh.ts`) -- read the
51
+ * IDENTICAL frontmatter differently depending on where `okf-kit check`
52
+ * happens to run. Appending `Z` before parsing makes the resolved instant a
53
+ * property of the STRING, not of `TZ`, for every comparison in this
54
+ * package, not just some of them. A string that already carries a
55
+ * designator is parsed unchanged: `Date.parse` already resolves it
56
+ * correctly on every machine. See the README's "Staleness (sources-fresh)"
57
+ * section, "Designator-less timestamps", for the full rationale and the one
58
+ * case this does NOT cover (a value that is not parseable to an instant at
59
+ * all). The raw string is trimmed before either check: the `Z` this
60
+ * function appends for a designator-less value must land at the very end,
61
+ * not after trailing whitespace, so a whitespace-padded value is parsed
62
+ * the same as its untrimmed form (both `hasUtcDesignator` and `Date.parse`
63
+ * would otherwise treat the padding as part of the value).
64
+ */
65
+ function parseTimestampInstantMs(raw) {
66
+ const trimmed = raw.trim();
67
+ const ms = Date.parse(hasUtcDesignator(trimmed) ? trimmed : `${trimmed}Z`);
68
+ return Number.isNaN(ms) ? undefined : ms;
69
+ }
25
70
  /**
26
71
  * Returns the frontmatter `timestamp` as a Unix epoch (seconds), or
27
72
  * undefined when absent, not a Date/string, or not parseable as a date.
@@ -30,7 +75,9 @@ export function getValidSources(parsed) {
30
75
  * (core) schema resolves timestamp scalars to strings, but a YAML 1.1
31
76
  * `!!timestamp` tag (or a caller constructing frontmatter programmatically)
32
77
  * can hand back a native `Date`, and that should be assessed rather than
33
- * degrade to the no-valid-timestamp notice.
78
+ * degrade to the no-valid-timestamp notice. A designator-less STRING is
79
+ * parsed via `parseTimestampInstantMs`, i.e. as UTC, so this epoch never
80
+ * depends on the machine's local timezone (D-016).
34
81
  */
35
82
  export function getTimestampEpoch(parsed) {
36
83
  if (!isRecord(parsed))
@@ -42,10 +89,8 @@ export function getTimestampEpoch(parsed) {
42
89
  }
43
90
  if (typeof timestamp !== "string" || timestamp.trim() === "")
44
91
  return undefined;
45
- const ms = Date.parse(timestamp);
46
- if (Number.isNaN(ms))
47
- return undefined;
48
- return Math.floor(ms / 1000);
92
+ const ms = parseTimestampInstantMs(timestamp);
93
+ return ms === undefined ? undefined : Math.floor(ms / 1000);
49
94
  }
50
95
  /**
51
96
  * Like `getTimestampEpoch`, but at MILLISECOND resolution instead of
@@ -59,7 +104,8 @@ export function getTimestampEpoch(parsed) {
59
104
  * thresholds (days, not milliseconds) make the distinction this function
60
105
  * exists for immaterial there, so there was no reason to touch them. Read
61
106
  * as an instant at millisecond resolution, exactly like `getTimestampEpoch`
62
- * otherwise -- same `Date` vs. string handling, same undefined cases.
107
+ * otherwise -- same `Date` vs. string handling, same undefined cases, same
108
+ * UTC-forcing treatment of a designator-less string (D-016).
63
109
  */
64
110
  export function getTimestampEpochMs(parsed) {
65
111
  if (!isRecord(parsed))
@@ -71,8 +117,7 @@ export function getTimestampEpochMs(parsed) {
71
117
  }
72
118
  if (typeof timestamp !== "string" || timestamp.trim() === "")
73
119
  return undefined;
74
- const ms = Date.parse(timestamp);
75
- return Number.isNaN(ms) ? undefined : ms;
120
+ return parseTimestampInstantMs(timestamp);
76
121
  }
77
122
  /**
78
123
  * The frontmatter `timestamp`'s raw string form, or undefined when it is
@@ -80,9 +125,10 @@ export function getTimestampEpochMs(parsed) {
80
125
  * `getTimestampEpoch`'s doc comment) returns undefined here too, since a
81
126
  * `Date`'s `getTime()` already names one instant on every machine, so
82
127
  * there is no raw spelling left for a caller to inspect. Callers:
83
- * `hasUtcDesignator`'s two gates (`sources-fresh-future`'s clock-skew
84
- * check and `isDirectionComparable`, D-013), and `describeTimestampValue`,
85
- * which names each side's raw spelling in the same-instant notice.
128
+ * `hasUtcDesignator` (`sources-fresh-future`'s clock-skew check, and
129
+ * `parseTimestampInstantMs`'s UTC-forcing decision, D-016), and
130
+ * `describeTimestampValue`, which names each side's raw spelling in the
131
+ * same-instant notice.
86
132
  */
87
133
  export function getRawTimestampString(parsed) {
88
134
  if (!isRecord(parsed))
@@ -100,11 +146,17 @@ export function getRawTimestampString(parsed) {
100
146
  * already names a real UTC instant, so nothing beyond recognizing it is
101
147
  * needed here.
102
148
  *
103
- * Two callers gate on this predicate: `sources-fresh-future`'s clock-skew
104
- * check, and `compareRestampDirection`'s re-stamp direction comparison
105
- * (through `isDirectionComparable`, D-013). Which comparisons the gate
106
- * covers, which one stays ungated, and why, is written down once: see the
107
- * README's "Designator gate" paragraph under "Staleness (sources-fresh)".
149
+ * Two callers consult this predicate, and they respond to the same
150
+ * ambiguity in two different ways (D-016): `sources-fresh-future`'s
151
+ * clock-skew check SKIPS a designator-less timestamp entirely (a notice,
152
+ * not a warning) rather than compare it -- that allowance is minutes wide,
153
+ * too narrow to safely absorb a multi-hour timezone shift. `sources-fresh`
154
+ * instead FORCES UTC for it (`parseTimestampInstantMs`), for both its
155
+ * day-wide staleness comparison and its re-stamp direction comparison
156
+ * (`compareRestampDirection`) -- its thresholds are day-wide, so treating
157
+ * the value as UTC everywhere is both consistent and safe. Which rule takes
158
+ * which approach, and why, is written down once: see the README's
159
+ * "Designator-less timestamps" paragraph under "Staleness (sources-fresh)".
108
160
  */
109
161
  export function hasUtcDesignator(raw) {
110
162
  return /(?:Z|[+-]\d{2}:?\d{2})$/i.test(raw.trim());
@@ -119,13 +171,12 @@ export function hasUtcDesignator(raw) {
119
171
  * places, both of them comparing identities rather than instants:
120
172
  *
121
173
  * - as its FALLBACK, when direction cannot be judged at all: either side
122
- * unparseable to an instant (`getTimestampEpochMs` returns undefined),
123
- * or either side a string the designator gate rejects
124
- * (`isDirectionComparable`, D-013). With nothing comparable to order,
125
- * the question becomes "did the raw value change", and any textual
126
- * change counts as `restamped` -- see that function's doc comment for
127
- * the full three-way split.
128
- * - when both sides ARE direction-comparable and name the SAME instant,
174
+ * unparseable to an instant even after `getTimestampEpochMs` forces UTC
175
+ * for a designator-less string (D-016). With nothing comparable to
176
+ * order, the question becomes "did the raw value change", and any
177
+ * textual change counts as `restamped` -- see that function's doc
178
+ * comment for the full three-way split.
179
+ * - when both sides DO resolve to an instant and name the SAME one,
129
180
  * to tell a rewrite (a different spelling of that one instant, e.g.
130
181
  * `2026-01-01T00:00:00Z` to `2026-01-01T00:00:00+00:00`, which gets
131
182
  * the D-009 notice) from a byte-identical value (never a re-stamp
package/dist/util.js.map CHANGED
@@ -1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Q,CAAC,MAAM,CAAC;QAAE,OAAO,SAAS,CAAC;IACxC,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACnC,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE;QAC1D,OAAO,SAAS,CAAC;IACnB,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,OAAO,0BAA0B,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;AACrD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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.13.0",
3
+ "version": "0.15.0",
4
4
  "description": "CLI that validates OKF v0.1 knowledge bundles for structural correctness",
5
5
  "type": "module",
6
6
  "bin": {