Repository navigation
Make the trust and lifecycle checks do what the docs say - #13
Merged
Merged
Conversation
isStale derived the answer but nothing called it, so validation only checked the date's form: a deadline from last year passed silently. Under Validate trust & lifecycle fields, a note past its stale_after now says it is due for review. Advisory only — §11 keeps it out of conformance.
The README and the 0.3.0 notes both listed `author` among the §5.1 credibility signals this plugin validates, but the loop only looked at `resource`, `usage_count` and `last_modified`. Warn when an `author` is present and isn't a non-empty string, matching its neighbours.
trustTier computed unverified / machine-confirmed / human-reviewed from `verified` (§5.3), but nothing called it, so the tier reached no surface even though the README advertised it. The status bar is the right home: the report pane lists only files that have issues, so a conformant note — the case where the tier is most worth knowing — would never appear there. Shown only when Validate trust & lifecycle fields is on, since that is the toggle that governs §5. trustTierOfContent wraps the parse so main.ts doesn't have to reach for parseYaml itself.
The README's feature list and the 0.3.0 changelog entry described derived trust tiers and `sources[].author` validation that hadn't shipped. The three commits before this one make those claims true; this one brings the prose in line and records the correction against the 0.3.0 entry, so anyone reading the old notes isn't misled.
The earlier commit corrected the two claims that were outright wrong. This covers what was left: - The Unreleased blurb lumped all three gaps together as overclaimed docs. Only two were: 0.3.0 accurately described `stale_after` as an absolute-date check, and the gap there was that form was all it ever checked. Say that instead. - README's status-bar and Rules entries didn't mention the tier at all. A validation toggle changing what a tooltip shows is surprising enough to say out loud in Settings, not just in Features. - Add the missing changelog link definitions. Unreleased, 0.4.1, and all of 0.2.x had headings with no matching reference, so they rendered as bare `[0.4.1]` text. 0.1.0 and 0.1.1 are tags with no release, but GitHub serves a tag page for those, so the same URL shape works throughout.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three §5 trust signals that the README and the 0.3.0 notes described as shipped were either never surfaced or never checked. This makes each claim true, then corrects the prose. Released as 0.5.0.
Closes #10, closes #11, closes #12.
stale_afteris enforced, not just parsed (#10)isStalederived the answer but nothing called it, so validation checked only the date's form — a deadline from last year passed silently. A note past itsstale_afternow says it's due for review.The derived trust tier is shown (#11)
trustTierwas computed and dropped on the floor. It now appears in the status-bar tooltip. The report pane lists only files that have issues, so a conformant note — the case where the tier is most worth knowing — would never show one there; the status bar is the surface that covers every note.sources[].authoris validated (#12)The per-entry loop checked
resource,usage_countandlast_modified, neverauthor, despite the docs listing all four. Warns whenauthoris present and isn't a non-empty string.Scope
All three sit behind Validate trust & lifecycle fields, off by default, so no vault starts reporting anything new unless it had already opted in. Every new finding is a
warning— §11 keeps these out of conformance, so nothing that passed before now fails.Version
0.5.0, minor rather than patch: these are new checks and a new surface, listed under
### Added. This repo has kept patches for bugfixes and re-releases (0.4.1, 0.2.2) and taken a minor for every new capability (0.2.0, 0.3.0, 0.4.0).Bumped with
npm version minor --no-git-tag-version, soversion-bump.mjswrotemanifest.jsonandversions.jsonin its own format andpackage-lock.jsonstayed in step. No tag is created by this PR — tagging remains a separate step after merge.The default actor moves to
okf-enforcer/0.5with it. That string carries<major>.<minor>and was bumped the same way at 0.3.0 and 0.4.0, but left alone for the 0.4.1 patch. It's only a default: a saved setting is kept as written.Verification
No test framework here, so this was checked with throwaway esbuild harnesses against a stubbed
obsidian(deleted before commit).stale_after: past date and today flagged, future date and absent silent, malformed still gets the form warning rather than the deadline one.author: empty string, whitespace-only,nulland a number all flagged; a real name and an absent key silent; the index in the message tracks the right entry.unverified/machine-confirmed/human-reviewedderived correctly,human:winning overprocess:in a mixed list;nullfor a note with no frontmatter or unparseable YAML.authorproduces neither warning.generated: { by: okf-enforcer/0.5, ... }, and the result re-validates with zero errors and no provenance complaints.tsc --noEmitis clean,main.jsis rebuilt, and the build was installed into a real vault and exercised in Obsidian.Docs
README.md's feature list, status-bar entry, Settings Rules entry, and default-actor example now match the behaviour, as does the in-app settings description. The 0.3.0 changelog entry is corrected in place — it claimed derived tiers andauthorvalidation that hadn't shipped — with a note recording the correction, so the old entry doesn't keep misleading anyone.Also fixed while in there: five changelog headings (
0.4.1and all of0.2.x) had no matching link definition and rendered as bare[0.4.1]text. All eleven now resolve, verified by HTTP rather than by pattern — 0.1.0 and 0.1.1 are tags with no release, but GitHub serves a tag page at the same URL shape.