Skip to content

docs: repo-wide PR review guide (CLAUDE.md) + reviewer checklist#310

Draft
emjay0921 wants to merge 1 commit into
19.0from
docs/pr-review-guidelines
Draft

docs: repo-wide PR review guide (CLAUDE.md) + reviewer checklist#310
emjay0921 wants to merge 1 commit into
19.0from
docs/pr-review-guidelines

Conversation

@emjay0921

Copy link
Copy Markdown
Contributor

Why is this change needed?

OpenSPP2 has no repo-level PR-review rules today — only a PR body template. Review consistency relies on tribal knowledge, and easy-to-miss rules slip through (most often the per-module readme/HISTORY.md entry + __manifest__.py version bump). This adds one repo-wide source of truth so both human reviewers and AI-assisted review apply the same checklist.

This is a proposal — I'd like the team to weigh in before we adopt it. Open questions called out below.

How was the change implemented?

  • New root CLAUDE.md — the canonical review guide: a PR Review Checklist (correctness · scope · release hygiene · Odoo 19 · security · tests), a review protocol, the changelog/versioning convention, and a local pre-commit/test quick-reference. Content is grounded in the repo's actual .pre-commit-config.yaml hooks (OCA + the openspp-* checks) and the Docker test recipe — not invented.
  • .github/pull_request_template.md — appended a short Reviewer checklist (- [ ]) that links to CLAUDE.md (no duplicated rule text; single source of truth stays in CLAUDE.md).

Modeled on the DSWD dswd-4ps-dp-openspp-v2-module repo, which keeps its review checklist in CLAUDE.md.

New unit tests

N/A — documentation only.

Unit tests executed by the author

N/A. Sanity-checked: no trailing whitespace, final newlines present; hook/test references cross-checked against .pre-commit-config.yaml and the module test recipe.

How to test manually

Open any new PR and confirm the Reviewer checklist renders in the description; read CLAUDE.md at the repo root.

Related links

Please weigh in on:

  1. Filename/locationCLAUDE.md (agent-loaded, DSWD precedent) vs AGENTS.md vs a human-facing CONTRIBUTING.md.
  2. Version-bump timing — bump in the feature branch vs. on 19.0 after merge (both patterns exist today).
  3. Rules to add or cut — the checklist is a starting point, not final.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive contributor and PR review guide in CLAUDE.md and integrates a reviewer checklist into the pull request template. The review feedback suggests clarifying that auto-generated files from oca-gen-addon-readme should not have manual trailing newlines added, and recommends using the more portable ~/ prefix instead of /Users/<you>/ in the local execution examples.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread CLAUDE.md
Comment on lines +37 to +39
- If any `readme/` fragment changed, **regenerate** `README.rst` and
`static/description/index.html` with the OCA generator
(`oca-gen-addon-readme`) and commit the regenerated files.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

When regenerating files using oca-gen-addon-readme, do not manually add a final newline to the auto-generated files, as any manual changes will be overwritten. The lack of a trailing newline should be addressed in the upstream tool.

Suggested change
- If any `readme/` fragment changed, **regenerate** `README.rst` and
`static/description/index.html` with the OCA generator
(`oca-gen-addon-readme`) and commit the regenerated files.
- If any `readme/` fragment changed, **regenerate** `README.rst` and
`static/description/index.html` with the OCA generator
(`oca-gen-addon-readme`) and commit the regenerated files. Do not manually add a final newline to these auto-generated files, as manual changes will be overwritten.
References
  1. Do not manually add a final newline to files auto-generated by the oca-gen-addon-readme tool, as any manual changes will be overwritten.

Comment thread CLAUDE.md
Comment on lines +100 to +102
/Users/<you>/Projects/ci-local/run.sh OpenSPP2 --files <changed files>
# regenerate READMEs when a readme/ fragment changed:
/Users/<you>/Projects/ci-local/run.sh OpenSPP2 oca-gen-addon-readme --all-files --hook-stage manual

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using /Users/<you>/ is specific to macOS. Using ~/ is more portable and works across both macOS and Linux environments.

Suggested change
/Users/<you>/Projects/ci-local/run.sh OpenSPP2 --files <changed files>
# regenerate READMEs when a readme/ fragment changed:
/Users/<you>/Projects/ci-local/run.sh OpenSPP2 oca-gen-addon-readme --all-files --hook-stage manual
~/Projects/ci-local/run.sh OpenSPP2 --files <changed files>
# regenerate READMEs when a readme/ fragment changed:
~/Projects/ci-local/run.sh OpenSPP2 oca-gen-addon-readme --all-files --hook-stage manual

@emjay0921
emjay0921 marked this pull request as draft July 17, 2026 03:22
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.79%. Comparing base (1caf794) to head (a903534).
⚠️ Report is 3 commits behind head on 19.0.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             19.0     #310      +/-   ##
==========================================
- Coverage   74.28%   67.79%   -6.50%     
==========================================
  Files         372       94     -278     
  Lines       25385     8312   -17073     
==========================================
- Hits        18857     5635   -13222     
+ Misses       6528     2677    -3851     
Flag Coverage Δ
spp_analytics ?
spp_api_v2_cycles ?
spp_api_v2_entitlements ?
spp_api_v2_gis ?
spp_api_v2_programs ?
spp_api_v2_simulation ?
spp_audit_programs ?
spp_base_common 91.07% <ø> (+0.80%) ⬆️
spp_case_demo ?
spp_case_entitlements ?
spp_case_programs ?
spp_cr_type_assign_program ?
spp_dci_compliance ?
spp_dci_demo ?
spp_dci_server_social ?
spp_demo ?
spp_demo_phl_luzon ?
spp_drims ?
spp_drims_sl ?
spp_drims_sl_demo ?
spp_farmer_registry_demo ?
spp_gis_report ?
spp_grm_demo ?
spp_indicator ?
spp_indicator_studio ?
spp_metric_service ?
spp_mis_demo_v2 ?
spp_programs 65.27% <ø> (+<0.01%) ⬆️
spp_registry 86.94% <ø> (+0.10%) ⬆️
spp_security 69.56% <ø> (+2.89%) ⬆️
spp_simulation ?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 278 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread CLAUDE.md

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emjay0921 I think this should be in https://github.com/ACN-org/acn-workspace/blob/main/internal/claude-config/OpenSPP2/CLAUDE.md. We are standardizing on using the acn-workspace that is why you will notice that there are no claude files in the OpenSPP2 repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants