Skip to content

Contribution Guide

Thank you for considering a contribution to PAM. Bug reports, compatibility findings, documentation fixes, benchmarks, and focused pull requests are all welcome. This guide explains where each kind of contribution goes, how to set up the runtime locally, and what a pull request needs before it can be merged.

By contributing, you agree that your contribution is licensed under the Apache License 2.0.

Report reproducible defects as an issue in push-in/pam. The issue form asks for:

  • a summary of what happened and what you expected;
  • PAM, PHP, Laravel, and Octane versions, when they apply;
  • the operating system, version, and CPU architecture;
  • a minimal reproduction: commands, or a small public repository;
  • sanitized pam doctor output and logs.

The most useful bug report is one a maintainer can run. Start from a fresh project when you can:

Terminal window
pam init repro --template api
cd repro
# change the smallest thing that shows the bug
pam dev

Then attach the diagnostics:

Terminal window
pam --version
pam doctor
pam support --output pam-support.json

pam support writes a bounded, path-redacted report that never collects file contents, environment variables, or network data.

Two more issue forms exist for specific findings:

  • Compatibility report: a Composer package, PHP extension, or Laravel integration that does not work on PAM. Name the package and version and show how it fails.
  • Performance report: a reproducible latency, throughput, or memory regression. Include the commit, dirty state, hardware, runtime versions, workers, connections, duration, and payload size, and link the complete raw output rather than screenshots.

Issues are for defects. Ask installation, architecture, and usage questions in GitHub Discussions. See Support for what to include.

Open an issue or discussion before you start any of the following, so the design can be agreed before code is written:

  • a behaviour change or a substantial new feature;
  • changes to stable public contracts, security boundaries, persistence semantics, wire formats, or release policy.

Changes in those areas need executable compatibility coverage and an explicit migration story when behaviour changes. Routine fixes and documentation changes can go straight to a pull request.

PAM is maintainer-led. Maintainers are responsible for release integrity, security response, compatibility policy, and final technical decisions. When trade-offs conflict, decisions favor, in order:

  1. user and supply-chain safety;
  2. correctness and bounded resource use;
  3. compatibility with PHP, Composer, and Laravel contracts;
  4. operability and debuggability;
  5. measured performance;
  6. implementation convenience.

If consensus is not reached, the repository owner makes the final decision and documents the material trade-offs publicly, unless security or privacy prevents it. Contributor access is earned through sustained, constructive participation and sound reviews.

The runtime, the CLI, and most official Composer packages live in one monorepo, push-in/pam. Packages such as Nimbus, the skeleton, pam-socket, pam-http-psr, and pam-http-testing are developed in its packages/ directory and published as read-only split mirrors. Send pull requests for those packages to push-in/pam, not to the mirror.

Other products, such as PAM Native, PAM Desktop, and the native plugins, have their own repositories. The Repository Map lists them all. Documentation lives in push-in/pam-docs; see Writing Documentation.

Runtime contributors need:

  • Rust 1.88 (pinned in rust-toolchain.toml, with clippy and rustfmt);
  • PHP 8.5 Embed development headers;
  • a C toolchain;
  • Composer 2.

Inspect manifests and lockfiles before changing or installing dependencies, and run the relevant dry run first.

These are the same checks CI runs on the Rust code:

Terminal window
cargo fmt --all -- --check
cargo clippy --locked --all-targets --all-features -- -D warnings
cargo test --locked --all-targets --all-features -- --test-threads=1

For the Laravel Octane bridge in packages/octane:

Terminal window
pam composer install --working-dir=packages/octane --dry-run
pam composer install --working-dir=packages/octane
pam composer --working-dir=packages/octane verify
cargo test --locked --test cluster --test server -- --test-threads=1

For Nimbus and other PHP packages, add focused PHPUnit tests and run verify in the package directory:

Terminal window
pam composer --working-dir=packages/nimbus verify

After changing any Composer package or its publication metadata, validate the package layout:

Terminal window
scripts/package-release.sh validate

Keep each pull request focused on one change. Maintainers may ask that broad work be split into smaller reviews. Every pull request should:

  • describe the user-visible outcome and why it is needed;
  • add regression tests;
  • update documentation and the changelog when needed;
  • include manifest and lockfile preflight evidence for dependency changes;
  • describe compatibility, security, performance, and rollback risks.

All required CI checks must pass before a merge.

Performance claims must use the checked-in benchmark protocol in benchmarks/ and disclose the source commit, dirty state, hardware, runtime versions, worker count, and complete results. See Performance & Benchmarks.

Package pull requests also need to:

  • document public API and behaviour changes;
  • explain persistent-worker risks: state that outlives a request, cleanup, cancellation, and rollback;
  • keep example controllers thin, with validation in form requests, business rules in services, and domain responses in resources.
  • Rust: rustfmt formatting and clippy with warnings denied.
  • PHP: declare(strict_types=1);, typed properties and signatures, and the project formatter (pam format, which uses Pint in generated projects).
  • Enums: coded status, type, state, kind, and category values use integer-backed enums with sequential values starting at 1. Existing values are never reused within a protocol version.
  • Safety: native capabilities stay explicit and disabled by default; never weaken a safety limit to make a demo pass.

No PAM release can be published from repository-local tests alone. Before a tag is published, the release candidate must pass the community first-run gate:

Terminal window
scripts/community-experience-gate.sh all

The gate creates fresh projects in temporary directories from every official template (raw, http, laravel, mobile, and native-ui) and starts each one with pam dev. PAM itself must provision Composer, PHP, Gradle, the Android SDK and NDK, and the required licenses; nobody may repair a generated project by hand. Mobile projects only pass once the application is installed and alive on an Android emulator, Logcat shows no runtime errors, and a real screenshot is captured. The publication job depends on this gate and fails closed when any template cannot complete its first run.

Maintainers follow RELEASE.md in the runtime repository:

  1. Release pull request. Cargo.toml, Cargo.lock, and CHANGELOG.md carry the new version with a dated ## X.Y.Z - YYYY-MM-DD heading, and every changed package has its own dated changelog heading. scripts/package-release.sh validate-tag vX.Y.Z checks both.
  2. Tag. Pushing vX.Y.Z from the merged commit on main builds every target, runs the release gates, creates the GitHub release, and publishes the ghcr.io/push-in/nimbus-skeleton image (amd64 and arm64, with SBOM and provenance).
  3. Mirrors and Packagist. The package splits are verified on the tag and published after the GitHub release exists. A public Composer dry run of the skeleton runs before the release is announced.

If you discover a security vulnerability, report it privately as described in the Security Policy. Do not open a public issue.

Everyone who participates in PAM spaces is expected to follow the Code of Conduct.