Skip to content

fix(hello-status): match the registration to the manifest and gate drift in CI - #8

Merged
hamidfzm merged 1 commit into
mainfrom
fix/plugin-manifest-parity
Aug 16, 2026
Merged

fix(hello-status): match the registration to the manifest and gate drift in CI#8
hamidfzm merged 1 commit into
mainfrom
fix/plugin-manifest-parity

Conversation

@hamidfzm

@hamidfzm hamidfzm commented Aug 16, 2026

Copy link
Copy Markdown
Member

Problem

Release official plugins run 31945013113 failed on main:

Error: com.glyph.hello-status: manifest.json version 1.1.0 != plugin.json version 1.0.0

#6 bumped manifest.json to 1.1.0 so the sample plugin would be repackaged with its sandbox: false line, but left plugin.json at 1.0.0. scripts/release-official.mjs requires the two to agree before it packages anything, and nothing checked that pairing at PR time, so the mismatch could only surface in the post-merge release job, which no re-run can turn green.

Two related drifts came out of the same read:

  • com.glyph.hello-status/plugin.json omitted sandbox, so the marketplace, which reads the registration for the consent prompt shown before the download, offered the ordinary install warning for a full-trust plugin. The installed manifest still triggers the full-access warning afterwards, so nothing ran unapproved, but users saw the wrong prompt first.
  • com.glyph.dictionary-fa/manifest.json declares sandbox: false it does not need. It only calls ctx.assets.readText and ctx.spellcheck.registerDictionary, both implemented in the sandbox worker, and its published 1.0.0 package already runs sandboxed.

Changes

  • plugins/com.glyph.hello-status/plugin.json: version 1.1.0 and sandbox: false, matching the manifest. packageUrl and sha256 are left alone; the release job rewrites them after merge.
  • plugins/com.glyph.dictionary-fa/manifest.json: drop sandbox: false (least privilege, and it matches the released package). No version bump, so no re-release.
  • scripts/check-plugins.mjs (new): the parity rules in one place, checking id against the folder name, version, apiVersion, sandbox (absent means sandboxed on both sides), and that every manifest-declared file exists. validate.yml runs it on every PR and release-official.mjs imports it, so the PR gate and the release gate read one source of truth. The id check moves out of the validate.yml shell loop into the script.
  • scripts/build-index.mjs: the catalog badge names the trust mode either way. It only rendered "sandboxed" for an explicit sandbox: true, which nobody writes because it is the default, so the opt-out the badge exists to flag never showed up. Hello Status now reads official · full trust · no permissions.
  • .github/workflows/smoke.yml (new): CI-time smoke tests, mirroring the split in the main Glyph repo between ci-smoke.yml (drive the real script) and the data checks.

Tests

scripts/release-official.test.mjs runs the real release script end to end against a throwaway repo whose gh is a shell stub, so packaging happens for real and nothing can reach GitHub:

  • packages the plugin, creates the release, and rewrites packageUrl and sha256 (zip contents and digest asserted against the file on disk)
  • fails on a version mismatch without releasing (the failure above, as a regression test)
  • fails when the manifest declares a missing file
  • skips a version already released on the remote, and one already tagged locally, without calling gh
  • ignores community registrations

scripts/check-plugins.test.mjs unit-tests the parity rules, including that checkAll finds no problems in this repo.

Both run with node --test: no dependencies, no test framework. The smoke suite is POSIX only (shell stub plus Info-ZIP zip) and skips on Windows. The Smoke job on this PR runs all 16 tests, the 6 smoke cases included. Reverting the plugin.json fix and rerunning node scripts/check-plugins.mjs reproduces the exact CI error, this time at PR time.

Notes

index.json, index/tools.json, and docs/plugin-catalog.md are regenerated here, as the generator check on main now requires. After merge, main releases com.glyph.hello-status-v1.1.0 and rewrites packageUrl and sha256 in its own bot commit.

…ift in CI

The release job refuses to package an official plugin whose manifest.json and
plugin.json disagree, so bumping only the manifest to 1.1.0 in #6 left main red:

  com.glyph.hello-status: manifest.json version 1.1.0 != plugin.json version 1.0.0

Nothing checked that pairing before the merge, so it could only surface in the
post-merge release job, which no re-run can turn green.

- plugin.json now declares version 1.1.0 and sandbox false, matching the
  manifest. The marketplace reads the registration for the consent prompt shown
  before the download, so omitting sandbox there offered the ordinary install
  warning for a full-trust plugin.
- com.glyph.dictionary-fa drops sandbox false from its manifest instead: it only
  calls ctx.assets.readText and ctx.spellcheck.registerDictionary, both
  implemented in the sandbox worker, and its published 1.0.0 package already
  runs sandboxed.
- scripts/check-plugins.mjs owns the parity rules (id, version, apiVersion,
  sandbox, declared files). validate.yml runs it on every PR and
  release-official.mjs imports it, so both gates read one source of truth.
- The catalog badge now names the trust mode either way. It only rendered
  "sandboxed" for an explicit sandbox true, which nobody writes because it is
  the default, so the opt-out it exists to flag never showed up.
- Smoke tests drive the real release script end to end against a throwaway repo
  with a stubbed gh, covering packaging, the digest, the packageUrl rewrite and
  every refusal path. A Smoke workflow runs them with node --test.
@hamidfzm
hamidfzm force-pushed the fix/plugin-manifest-parity branch from 88d2013 to 33856e7 Compare August 16, 2026 12:15
@hamidfzm hamidfzm self-assigned this Aug 16, 2026
@hamidfzm
hamidfzm merged commit 100c87c into main Aug 16, 2026
2 checks passed
@hamidfzm
hamidfzm deleted the fix/plugin-manifest-parity branch August 16, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant