OpenParable
Skip to content
← Back to skills

Pre PR Checklist

Testing & Quality
pre-pr-checklist

Pre PR Checklist is an Agent Skill for testing & quality published in the golemcloud/golem repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Final checks before submitting a pull request. Use when preparing to create a PR, to ensure formatting, linting, and the correct tests have been run.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/golemcloud/golem/blob/HEAD/.agents/skills/pre-pr-checklist/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/pre-pr-checklist, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Pre-PR Checklist

Run through this checklist before creating a pull request. It ensures code quality gates pass and the right tests have been executed.

Step 1: Run cargo make fix

Always required. This runs rustfmt and clippy with automatic fixes:

cargo make fix

Address any remaining warnings or errors that couldn't be auto-fixed.

Step 2: Run the Right Tests

Choose tests based on what you changed. Do not run cargo make test — it runs everything and takes a very long time.

What ChangedTest Command
Core logic, shared types, utilitiescargo make unit-tests
Worker executor functionalitycargo make worker-executor-tests
Service integrationcargo make integration-tests
CLI changescargo make cli-integration-tests
HTTP API endpointscargo make api-tests-http
gRPC API endpointscargo make api-tests-grpc
Rust SDK (sdks/rust/)cargo test -p golem-rust + cargo make worker-executor-tests
TypeScript SDK (sdks/ts/)npx pnpm run test (in sdks/ts/) + cargo make cli-integration-tests
MoonBit SDK (sdks/moonbit/)moon test (in sdks/moonbit/golem_sdk/)
CLI structured output/schemacargo test -p golem-cli cli_output_schema_ --lib + cargo make check-cli-output-schema
CLI JSON output affecting skill testsUpdate affected golem-skills/tests/harness code, tests, or scenarios. Run npm run build && npm test in golem-skills/tests/harness only if harness TypeScript code/tests changed.

If your change spans multiple areas, run multiple test suites.

Worker executor test groups

For faster iteration, worker executor tests can be run by group:

cargo make worker-executor-tests-group1
cargo make worker-executor-tests-group2
cargo make worker-executor-tests-misc

Step 3: Regenerate Artifacts (if applicable)

What ChangedRegeneration Command
HTTP API endpointscargo make generate-openapi then cargo clean -p golem-client && cargo build -p golem-client (also refreshes docs/src/content/rest-api/*.mdx)
Service config structs/defaultscargo make generate-configs
WIT interfacescargo make wit
TS SDK runtime codenpx pnpm run build-agent-template (in sdks/ts/)
Skill catalog (golem-skills/skills/**)cargo make generate-docs-skills (refreshes docs/src/content/how-to-guides/*.mdx)
CLI output schema summarycargo make update-cli-output-schema-summary

Step 4: Verify Build

cargo make build

Step 5: Review Staged Files

Only stage files directly related to your change:

git diff --stat          # Review unstaged changes
git add <specific-files> # Stage only relevant files

Never use git add -A or git add . — they may include unrelated changes from concurrent work.

Quick Reference

Minimum steps for any PR:

cargo make fix           # Format + lint
cargo make build         # Full build
# Run appropriate tests from the table above

Checklist

  1. cargo make fix run — no remaining warnings
  2. Correct test suite(s) run — all pass
  3. Artifacts regenerated if applicable (OpenAPI + docs MDX, configs, WIT, agent template, How-To Guides)
  4. cargo make build succeeds
  5. Only relevant files staged for commit