Skip to content

ci: test the shipped package, lint workflows, rescan on acceptance, verify publishes - #210

Closed
askalf wants to merge 3 commits into
masterfrom
claude/marketplace-red-display-iuspnh
Closed

askalf wants to merge 3 commits into
masterfrom
claude/marketplace-red-display-iuspnh

Conversation

@askalf

@askalf askalf commented Sep 25, 2026

Copy link
Copy Markdown
Owner

What this changes

This is the CI half of #208, which was closed before it landed. It's rebased onto master after the 0.10.4 release (#209) and has no release bump of its own.

I reviewed every workflow. All recent runs were green, and everything passes actionlint and shellcheck, so the gaps were in what CI never checked:

Workflow Change Why
ci.yml New package job: installs the npm pack tarball into an empty project (ubuntu + windows, node 20), then runs the installed CLI, truecopy-mcp and the library The test suite imports ./src straight from the checkout, so a broken published package was invisible
ci.yml Node 24 added to the matrix Active LTS, and what publish.yml already uses
ci.yml New actionlint job, with the binary pinned by version and sha256 Lints every workflow, and every run: script through shellcheck
marketplace-watch.yml Also runs on master pushes that touch acceptances or detection; runs are serialized #207 merged 40 minutes after the run that flagged its skill, so the badge stayed red until a manual dispatch. Every run also force-pushes watch, so two runs must never overlap.
publish.yml After npm publish: install that version back from the registry, check --version, check it flags the poisoned demo, run npm audit signatures A green publish only means npm accepted the upload
truecopy-gate.yml verify-attestation: 'true' The self-gate now checks the Sigstore provenance of the tarball it installs
codeql.yml Adds the actions language CodeQL also scans the workflows themselves
docker.yml Also runs when truecopy.lock or demo/clean-mcp.json change Both are copied into the image, and its smoke test verifies them
test/release-hygiene.test.mjs Checks that the CHANGELOG section, lockfile version and documented pins all match package.json Catches a version bump that leaves any of them behind

Bug fix: truecopy --version printed the usage text and exited 2, even though both issue templates ask reporters for its output. The just-published 0.10.4 still does this. --version, -v and version now print the version. Regression test added, and the CHANGELOG entry is under [Unreleased].

Why

CI tested the source tree but not the package users install. It also didn't confirm a publish was actually usable, and it left the watch badge red after a triage PR merged.

How it was verified

  • npm test: 274 tests, 273 pass, 0 fail, 1 skipped (Node 22). Before the new tests, the suite also passed on Node 24.21.0 locally.
  • actionlint 1.7.12 with shellcheck 0.11.0: clean on all workflows
  • I ran the package job's two scripts locally, taken straight from ci.yml. The installed CLI reports its version, the clean demo passes, the poisoned demo exits 1, verify passes, truecopy-mcp lists truecopy-verify, truecopy-status, and the library has 33 exports.
  • npm audit signatures against the published @askalf/truecopy@0.10.3: 1 verified registry signature, 1 verified attestation
  • The v0.10.3 release tarball has a Sigstore attestation, so the gate's verify-attestation has something to verify
  • Detection change? N/A
  • Acceptance change? N/A

🤖 Generated with Claude Code

https://claude.ai/code/session_01XZEotnWUeFC5V4AHMKBM9W


Generated by Claude Code

…erify publishes

Review of every workflow here: all were green on their recent runs and pass
actionlint + shellcheck; the gaps were in what CI never looked at.

- ci: `package` job installs the `npm pack` tarball into an empty project
  (ubuntu + windows, node 20) and drives the installed CLI, truecopy-mcp and
  library. The suite imports ./src from the checkout, so a broken published
  package was invisible to it.
- ci: Node 24 (active LTS, what publish.yml runs) joins the test matrix.
- ci: actionlint job, binary pinned by version and sha256.
- marketplace-watch: re-run on master pushes that change acceptances or
  detection, and serialize runs. #207 merged 40 minutes after the run that
  flagged its skill, so the badge stayed red until the next daily run.
- publish: after `npm publish`, install that version back from the registry,
  check it runs and reports the right version, and `npm audit signatures`.
- truecopy-gate: verify-attestation on the release tarball it installs.
- codeql: add the `actions` language so workflows get scanned too.
- docker: also run when truecopy.lock or demo/clean-mcp.json change; both
  are COPY'd into the image and verified by its smoke test.
- test: release-hygiene checks the CHANGELOG section, lockfile and
  documented pins match package.json, so a bump can't strand them.

Fixes `truecopy --version`, which printed usage and exited 2 (0.10.4 still
does); regression test added, CHANGELOG entry under Unreleased.

Claude-Session: https://claude.ai/code/session_01XZEotnWUeFC5V4AHMKBM9W
@github-actions github-actions Bot added documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code cli Command-line surface watch Marketplace watch: scanner harness and acceptance ledger tests Test suite and CI size/L 200-799 hand-written lines labels Sep 25, 2026
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Comment thread test/release-hygiene.test.mjs Fixed
GNU tar reads `D:\a\_temp\…\x.tgz` as host `D` plus a remote path, so the
windows-latest leg died at the listing ("Cannot connect to D: resolve
failed"). List the tarball by its bare name after cd'ing into it, and work
from a POSIX RUNNER_TEMP (cygpath -u) under Git Bash so no later step
depends on bash resolving a drive-letter path.

Claude-Session: https://claude.ai/code/session_01XZEotnWUeFC5V4AHMKBM9W
CodeQL (js/incomplete-sanitization) flagged escaping only the dots of the
version before interpolating it into a RegExp. Parse the `## [x] - date`
headings and compare x to package.json's version directly: nothing left to
escape, and a bump without its section still fails.

Claude-Session: https://claude.ai/code/session_01XZEotnWUeFC5V4AHMKBM9W
@askalf

askalf commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Replaced by #211: the same change as one commit, without the model attribution in the commit trailers and body, and with the em dashes in the added text rewritten.

@askalf askalf closed this Sep 25, 2026
askalf added a commit that referenced this pull request Sep 25, 2026
…erify publishes (#211)

* ci: test the shipped package, lint workflows, rescan on acceptance, verify publishes

Same change as #210, as one commit.

* ci, cli: drop two comments that narrate the change instead of the code

* test: drop the release-hygiene header comment

* ci: comments state what the workflows do, not why they changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Command-line surface documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code size/L 200-799 hand-written lines tests Test suite and CI watch Marketplace watch: scanner harness and acceptance ledger

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants