Conversation
There was a problem hiding this comment.
Pull request overview
Adds Claude Code repository guidance/config and introduces a “validate” build flow intended to mirror CI without requiring private/local plugin configuration.
Changes:
- Add a
build:validatewebpack build path and corresponding webpack config. - Add Claude Code repo docs (
CLAUDE.md) and a/validatecommand runbook. - Configure Claude permissions allow-list for common validation commands.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
webpack.validate.config.js |
New webpack config meant to support build:validate with an env.config stub. |
package.json |
Adds build:validate script to run webpack with the validate config. |
CLAUDE.md |
Adds repo/architecture guidance and common developer commands for Claude Code. |
.claude/settings.json |
Allows specific shell commands for Claude-driven validation. |
.claude/commands/validate.md |
Documents the /validate procedure and reporting format. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| ## Checks to run | ||
|
|
||
| ### 1. Commit messages | ||
| Run: `git log main..HEAD --format="%H %s"` |
There was a problem hiding this comment.
This repo’s CI and workflows use master as the default branch (e.g., .github/workflows/validate.yml triggers on master), but the commit-message check here uses git log main..HEAD .... That will fail or produce empty output in this repo. Update the base ref to master (or make it derive from the repo’s default branch) so commit validation works.
| Run: `git log main..HEAD --format="%H %s"` | |
| Run: `git log master..HEAD --format="%H %s"` |
There was a problem hiding this comment.
This comment is generally correct, but aren't we basing PRs off of the most recent release/ branch?
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| "Bash(npm test -- --passWithNoTests)", | ||
| "Bash(npm run build)", | ||
| "Bash(npm run build:validate)", | ||
| "Bash(git log -1 --pretty=%B)", |
There was a problem hiding this comment.
/validate instructs running git log … over a commit range, but the allowlist only permits git log -1 --pretty=%B. As a result Claude will still prompt for permission when running the commit-message check. Add an allow entry for the exact git log <default-branch>..HEAD --format="%H %s" command (or adjust the validate command to use an already-allowed git invocation).
| "Bash(git log -1 --pretty=%B)", | |
| "Bash(git log -1 --pretty=%B)", | |
| "Bash(git log main..HEAD --format=\"%H %s\")", |
| const { merge } = require('webpack-merge'); | ||
| const prodConfig = require('./webpack.prod.config'); | ||
|
|
There was a problem hiding this comment.
This config claims to be identical to the prod build, but it merges @openedx/frontend-build/config/webpack.prod.config instead of the repo’s ./webpack.prod.config.js (which adds customizations like copying public/static and the @src alias). Consider importing and extending the local webpack.prod.config.js so build:validate matches the actual production build output/behavior apart from the env.config stub.
| Run all pre-PR validation checks that mirror CI, then report results. | ||
|
|
||
| Execute the following checks **in order**, capturing output from each. Continue through all checks even if one fails — collect all failures before reporting. | ||
|
|
||
| ## Checks to run |
There was a problem hiding this comment.
This command says it “mirror[s] CI”, but CI runs make validate which currently executes npm run build (not npm run build:validate). Either update the wording to reflect the intentional difference, or align CI/Makefile and this command to run the same build step so local /validate results match CI more closely.
jansenk
left a comment
There was a problem hiding this comment.
This looks good but I have one comment and I think the copilot suggestions are valid
| ## Checks to run | ||
|
|
||
| ### 1. Commit messages | ||
| Run: `git log main..HEAD --format="%H %s"` |
There was a problem hiding this comment.
This comment is generally correct, but aren't we basing PRs off of the most recent release/ branch?
Add Claude related files & setup:
CLAUDE.mdwith repo overview.validatecommand to run tests & build steps.