diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index cbf4629..3175347 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -29,16 +29,49 @@ Closes # --- -## Tests Added or Updated +## Test Evidence - + + +### Tests added or updated - [ ] Happy-path tests added/updated - [ ] Failure and boundary-condition tests added/updated - [ ] Test naming follows the convention in [`docs/testing.md`](docs/testing.md) - [ ] [`docs/test-coverage.md`](docs/test-coverage.md) updated to reflect new or changed tests +### No-test justification + + + +- [ ] N/A — tests added (or) +- [ ] Justification provided below: + +**Justification for no tests:** + +### Contract-specific test examples + + + +- [ ] Existing contract test examples reviewed and relevant patterns referenced + --- ## Security Considerations diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 780c641..f540677 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -105,11 +105,16 @@ Every pull request must fill in the **[PR template](.github/PULL_REQUEST_TEMPLAT - **Issue reference** — a `Closes #N` line linking to the issue being resolved. - **Contract functions changed** — a table listing every function added, modified, or removed (write "none" for documentation-only PRs). -- **Tests added or updated** — names and file paths of new or changed tests, with checkboxes confirming happy-path, failure, and boundary coverage. +- **Test evidence** — a description of tests added or updated with file paths and test names, including: + - Happy-path, failure, and boundary-condition test coverage. + - Justification when no tests are added (documentation-only, refactor with no behaviour change, CI-only). + - Reference to existing contract test patterns relevant to the change (see `docs/testing.md` for test categories and examples). - **Security considerations** — a plain-language description of security impact plus the per-section security checklist for any PR that touches contract logic (see `docs/security-checklist.md`). - **Commands run** — confirmation that `make verify` passes (format, Clippy, workspace tests, and release WASM build), or equivalently that `cargo fmt --check`, `cargo clippy --tests -- -D warnings`, and `cargo test --workspace` all pass locally. - **CI status** — all CI checks green before requesting review. +> **Test evidence requirement:** Every contract PR must provide clear testing evidence. Changes without tests must include a justification explaining why tests are not needed. + Additional guidance: - Keep each pull request focused on one issue or related change. diff --git a/README.md b/README.md index f911e64..bdcfa33 100644 --- a/README.md +++ b/README.md @@ -277,12 +277,14 @@ Every pull request must use the **[PR template](.github/PULL_REQUEST_TEMPLATE.md - A reference to the issue being fixed (`Closes #N`) - A list of contract functions added, modified, or removed -- A description of tests added or updated +- **Test evidence** — description of tests added, no-test justification, and references to existing contract test patterns - A **[traceability table](docs/traceability-table.md)** mapping each acceptance criterion to changed functions, tests, and edge cases - A security considerations section (with checklist for contract changes) - Confirmation that `make verify` passes (or equivalently `cargo fmt --check`, `cargo clippy --tests -- -D warnings`, and `cargo test --workspace`) - CI green before requesting review +> **Test evidence requirement:** Every contract PR must include clear testing evidence. Changes without tests require a justification. See the [PR template](.github/PULL_REQUEST_TEMPLATE.md) and [CONTRIBUTING.md](CONTRIBUTING.md#pull-request-expectations) for details. + Before asking about payment status on an issue or PR, read the **[Payment-Period Conduct Guidance](docs/payment-period-conduct.md)** — it explains how to self-review first and how this repository's review process relates to GrantFox's own evaluation process. Quick start: