CI and release
Workflows in this repository#
| File | What it gates | Badge |
|---|---|---|
.github/workflows/ci.yml | Ubuntu and Windows, Node 20 and 22. Unit tests, doctor, then scripts/ci-gate.mjs. Does not publish | The CI badge on the README |
.github/workflows/publish.yml | On a GitHub Release: npm test, then npm publish --provenance for the unscoped package pramanasutra | None. It is not a required check |
.github/workflows/codeql.yml | CodeQL javascript-typescript on Ubuntu | CodeQL badge |
.github/dependabot.yml | Update PRs for Actions | None |
actions/checkout and actions/setup-node are pinned to commit SHAs. Timeouts are 20 minutes. Concurrency cancels a superseded run on the same ref.
Why macOS is not scheduled#
On 4 November 2026, Actions run 41884015367 finished as a failure. Ubuntu and Windows jobs succeeded. Both macos-latest jobs were cancelled with zero steps. They never checked out the repo. That failure painted the only CI badge red.
A separate macos-14 workflow was tried on the 0.3.0 push. Run 42098256304 cancelled both jobs in about a second. runner_name was empty. No step ran. Scheduling that workflow again would only add a red badge. It was removed. macOS test execution in GitHub Actions is unverified. The unit suite has been run on the maintainer's Windows machine, and the required workflow covers Ubuntu and Windows.
What the gate job proves#
scripts/ci-gate.mjs:
- Runs
node --test --test-reporter=spec tests/cli.test.mjs. - Reads the last
passandfailcounts from that output. - If it cannot read them, exits 1. It does not invent a passing evidence file.
- Writes a temporary evidence file with
source: ci-ingestedand those counts. WhenGITHUB_REPOSITORY,GITHUB_SHA,GITHUB_RUN_IDandGITHUB_WORKFLOWare all set, it also writesgithubwith those four strings. The report then saysci-environment. That is not a signature. A checkout outside Actions omitsgithub, and the report saysunbound. - Runs
release-checkon the repository root with that file. - Exits with the gate code.
Because fixtures/ and examples/sample-app/ contain intentional focused tests, they are listed in .pramanasutraignore. The gate is about the product, and the report names the exclusion. A pull request that adds test.only under tests/ or packages/ fails this job with exit 2.
Use it on your repository#
Run your tests in the job you already trust. Then either:
- call your own small script that writes evidence from that output, the way
ci-gate.mjsdoes, or - fail only when you are ready to maintain an evidence file
Example pattern, after your tests have already run and you have written evidence.json honestly:
- name: PramanaSutra release check
run: npx github:shahvatsalofficial/pramanasutra-ai release-check --path . --evidence evidence.json --out pramanasutra-reports
Exit 2 fails the step. Exit 3 also fails a step, because it is non-zero. If you want review to be a comment and only NO_GO to be red, branch on the status in the shell and upload report.md as an artifact either way:
set +e
npx github:shahvatsalofficial/pramanasutra-ai release-check --path . --evidence evidence.json --out pramanasutra-reports
code=$?
set -e
if [ "$code" -eq 2 ]; then exit 2; fi
if [ "$code" -eq 1 ]; then exit 1; fi
exit 0
Exit 3 is then visible in the log and the report, and the job stays green. Do this on purpose. Do not "fix" a red gate by deleting findings.
Upload pramanasutra-reports/report.md and report.html as build artifacts so reviewers can read them without re-running.
GitHub Pages#
Pages serves the /docs directory on main. scripts/build-docs.mjs writes the site to documents/pramanasutra/html and copies it to docs/, including index.html, sitemap.xml and robots.txt. Old handbook URLs under docs/handbook/ redirect to the new pages.
The site URL is https://shahvatsalofficial.github.io/pramanasutra-ai/.
robots.txt allows general crawlers and names common answer-engine crawlers as allowed. The content is public documentation. Do not put a private report in docs/.
Releasing this project#
- Update
package.json,CHANGELOG.mdandCITATION.cffto the same version. node --test tests/cli.test.mjsnode scripts/generate-proof.mjsnode scripts/build-docs.mjs- Read
documents/pramanasutra/audit/report.md. If the gate is not what you expect, stop. - Commit, push to
main. - Wait until the required CI workflow is green. Do not claim macOS CI passed.
- On npm, as user
shahvatsal, add a trusted publisher forshahvatsalofficial/pramanasutra-aiworkflow filepublish.yml. Do this once. gh release create vX.Y.Zwith the changelog as notes. That event runspublish.yml.
npm name is the unscoped package pramanasutra. @shahvatsal/pramanasutra@0.3.1 was published and then deleted so the install name would not show that scope. @vatsalshah/pramanasutra still returns 404. Local npm publish asks for 2FA. publish.yml runs only when a GitHub Release is published, uses id-token: write, and does not store an npm token. Connect that workflow on npm for the package pramanasutra before the first release, or the job fails authentication. ci.yml must not publish.
What this project will not automate#
Deploy and tag signing are not implemented. publish.yml passes --provenance so npm can attach its own provenance attestation to the tarball. That is not a deploy, and it is not a separate SLSA workflow in this repository. Do not add a badge that implies either.