fix(notifications): add the deprecation block its own status requires, and gate it - #96
Merged
Merged
Conversation
…, and gate it free/notifications declares "status": "deprecated" but carried only the flat deprecated / deprecatedSince / deprecated_in / removal_target / replacedBy fields. cli/internal/plugin/manifest.go requires a `deprecation` OBJECT once status is "deprecated", so it refused to parse this manifest, and listInstalled() skipped the directory. The user-visible effect: `nself plugin install notifications` prints "installed successfully", writes the directory and manifest, and the plugin is then absent from `nself plugin list --installed` AND from `nself doctor`, with no explanation anywhere. It is one of the eight plugins in the free Task Bundle, so the flagship free bundle installed eight and listed seven. It is the only plugin in free/ in this state — swept the whole tree. Values are derived, not invented: announcedDate 2026-05-07 — the real announcement, commit 6315c5f "feat(plugins/notifications): deprecate in favor of notify (S8.T29)". eolDate 2026-11-07 — exactly the 6-month minimum that .github/wiki/Deprecation-Policy.md sets for free (MIT) plugins. replacedBy notify — already asserted by the flat fields. migrationGuide https://github.com/nself-org/plugins/wiki/Notify — verified HTTP 200. The obvious nself.org/docs/plugins/notify 404s, and nself.org is not currently redeploying, so pointing at it would have satisfied the schema while failing the policy's actual requirement. The flat fields are left in place: other tooling may read them, and they are not in conflict with the block. Gate added in the same change, because the existing "Validate plugin.json files" step checks required fields and never looked at this. Any plugin with status "deprecated" must now carry announcedDate, eolDate and migrationGuide; eolDate must be at least 182 days after announcedDate per the policy; and migrationGuide must be an absolute URL. Reachability is checked too — a definitive 4xx fails, while a network error only prints a note, so a DNS blip cannot turn this into a flaky gate. Verified: the fixed manifest parses and lists — ran listInstalled() from the CLI against a temp dir holding this exact file, and "notifications" now appears. Gate proved in all three failing directions, each with its own message and exit 1: block removed (the shipped defect), notice period shortened to 30 days, and migrationGuide pointed at the 404ing nself.org URL. Passes on the committed tree. Workflow YAML parses.
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.
The defect
free/notificationsdeclares"status": "deprecated"but carried only the flatdeprecated/deprecatedSince/deprecated_in/removal_target/replacedByfields.cli/internal/plugin/manifest.gorequires adeprecationobject once status isdeprecated, so it refused to parse this manifest — andlistInstalled()then skipped the directory.What a user sees:
No warning, no error. It is one of the eight plugins in the free Task Bundle, so that bundle installed eight and listed seven.
It is the only plugin in
free/in this state — I swept the whole tree.Values are derived, not invented
announcedDate2026-05-076315c5f, "deprecate in favor of notify (S8.T29)"eolDate2026-11-07.github/wiki/Deprecation-Policy.mdsets for free (MIT) pluginsreplacedBynotifymigrationGuidegithub.com/nself-org/plugins/wiki/NotifyOn that last one: the obvious
nself.org/docs/plugins/notify404s, and nself.org is not currently redeploying. Pointing at it would have satisfied the schema while failing the policy's actual requirement, so I used a URL that resolves today.The flat fields are left in place — other tooling may read them, and they don't conflict.
Gate added in the same change
The existing "Validate plugin.json files" step checks required fields and never looked at this, which is how the defect shipped. Now any plugin with
status: deprecatedmust carryannouncedDate,eolDateandmigrationGuide;eolDatemust be ≥182 days afterannouncedDateper policy; andmigrationGuidemust be an absolute URL.Reachability is checked too — a definitive 4xx fails, while a network error only prints a note, so a DNS blip cannot make this a flaky gate.
Verification
listInstalled()against a temp dir holding this exact file —notificationsnow appears.migrationGuidepointed at the 404ing nself.org URL → "returned HTTP 404"Closes row 5 of P6-E4-W2-S2-T4.