Repository navigation
Conversation
Move ci/workflows/ to .github/workflows/ and drop ci/README.md, as that file described. Every step of test.yml passes locally against main.
publish.yml: refuse to publish unless the npm environment has a required reviewer and a v* tag rule, check that the tagged commit is on main, pin npm to 11.6.2, and publish a prerelease under the next dist-tag (the GitHub prerelease flag must agree with the version). The checkout keeps no credentials. test.yml: run on pull requests and pushes to main only, with a concurrency group; run the bats suite; assert the package file list; add an mcp-bridge job that checks out IndianOpinion/mcp and fails if the bridge test skips. README: drop the step that pointed at the removed ci/README.md, and make the protected npm environment a required step before Trusted Publishing.
|
Review by Grok Bot (Indian Opinion QA agent) Tested at head Fixes: #10. The workflow file is added and its first run on this PR passed. What I checked
Hosted run on this PR (GitHub Actions, read from the job logs)
Local run on this box (PHP 8.4.28 / Node 24.22.1), this head vs main
Review
Not tested: I didn't rerun the hosted jobs. The table above is read from this PR's own Actions logs. I'm Grok Bot, the automated QA agent for Indian Opinion. This is a comment-only review. I don't approve, request changes or merge. Local stack: PHP 8.4.28, Composer 2.11.3, MariaDB 11.8.9, Node 24.22.1, WordPress 7.1.5. |
|
Follow-up review by Grok Bot (Indian Opinion QA agent) Retested at head What changed since my last reviewMy one note is fixed. What I checked
Notes
I'm Grok Bot, the automated QA agent for Indian Opinion. This is a comment-only review. I don't approve, request changes or merge. Local stack: PHP 8.4.28, Composer 2.11.3, MariaDB 11.8.9, Node 24.22.1, WordPress 7.1.5. |
Problem
No workflow exists under
.github/workflows/onmain, so nothing runs on a push or a pull request (#10). This PR adds the test workflow and the npm publish workflow, and removesci/README.md, which described how to activate them.Review of the first version found the publish path unsafe: the
npmenvironment it names does not exist (GitHub creates a missing environment on first use with no protection, so there was no approval gate), a release on a tag pointing at any commit would publish,npm install -g npm@latestran unpinned in the job that holds the publish identity, a prerelease would publish aslatest, README Releasing step 0 pointed at the deletedci/README.md, and the bats suite and the MCP bridge test never ran in CI.Change
.github/workflows/publish.yml(runs only when a GitHub release is published):npmenvironment through the API and fails unless it has a required reviewer, custom deployment rules, and a tag rulev*. A missing or auto-created environment has none of these, so nothing publishes until the owner has protected it.origin/main.npm@11.6.2(Trusted Publishing needs 11.5.1 or newer) and checks the installed version.package.json, the CLI andio.sh.-(for example0.3.0-rc.1) and is published with--tag next; a full release with such a version, or a prerelease with a plain version, fails. A full release publishes aslatest.npm publish. Nothing else is installed in this job; the bats suite and the bridge test run intest.ymlon every push tomain, which the tagged commit must be on..github/workflows/test.yml:mainonly (it ran twice per PR push before), with a concurrency group.node --test test/*.test.mjs, then installs bats and runsbats test/whentest/*.batsexists. There is no bats file onmainyet;test/io-sh.batsarrives with io.sh: a usage error from --limit or an on/off flag stops before the request (exit 2) #31, and the step runs it from then on.npm pack --dry-run --jsonnow asserts that the six expected files are in the package.mcp-bridgejob: checks out the public IndianOpinion/mcp next to this repo, runsnpm ci --omit=dev --ignore-scriptsthere, runs the MCP bridge test withIO_MCP_DIR, and fails unless it passed and was not skipped.README Releasing: step 0 is gone. The one-time steps now require, in this order, the first manual publish, then the
npmenvironment with at least one required reviewer and av*tag rule (and no branch rule), and only then the Trusted Publisher settings on npmjs.com. Each release step says the tag must be on amaincommit, that a reviewer approves the run, and how prereleases are tagged. The Tests section mentions the bats suite and the CI jobs.No CHANGELOG line: nothing in the published package changes apart from the README text.
Testing
test (20),test (22),test (24)andmcp-bridgepass. Themcp-bridgelog shows# pass 1and# skipped 0.node --test test/*.test.mjs: 32 tests, 31 pass, 1 skipped (the bridge test, no../mcp), 0 fail. The bridge test against annpm ci --omit=dev --ignore-scriptsexport of mcpmain: 1 pass, 0 skipped. The package file-list check passes.bats test/(Bats 1.14.0) on the io.sh: a usage error from --limit or an on/off flag stops before the request (exit 2) #31 branch: 6 of 6 pass, so the new step will pass once io.sh: a usage error from --limit or an on/off flag stops before the request (exit 2) #31 is in.0.3.0full release giveslatest;0.3.0-rc.1prerelease givesnext;0.3.0marked prerelease and0.3.0-rc.1as a full release both fail.jqexpressions against real API answers: an environment with a required reviewer but no custom deployment rule fails the second check; a policy list with av*tag rule passes.publish.ymlitself has not run and cannot be run without a release. Both workflow files parse as YAML;actionlintis not installed here.Review notes
GET /repos/{repo}/environments/npmand.../deployment-branch-policieswith the job token (actions: readadded to the publish job). If either call fails, the job fails closed.main's history; a squash merge records the merger instead..github/dependabot.ymlin this repo, so this PR does not turn on Dependabot updates for actions.Owner decision
These are settings only the owner can make, and nothing here changes them:
npmenvironment (Settings, Environments) with at least one required reviewer and a deployment rule for tagsv*only, before enabling Trusted Publishing on npm. Consider turning off "Allow administrators to bypass".IndianOpinion,cli,publish.yml, environmentnpm) and set publishing access to require 2FA and disallow tokens.indianopinion(npm package "indianopinion" is not published; the README's primary install path fails #1) to claim the name.Fixes #10