Harden cloud-agent validation and CI diff checks - #2
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 67529e4ff3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| [ "$BEFORE_SHA" != '0000000000000000000000000000000000000000' ]; then | ||
| git diff --check "$BEFORE_SHA...HEAD" | ||
| else | ||
| git show --check --format= HEAD |
There was a problem hiding this comment.
Check the whole branch on its first push
When a new feat/** or fix/** branch is pushed, GitHub sets before to the all-zero SHA and leaves GITHUB_BASE_REF empty, so this fallback runs. The git show [<options>] <object>... command receives only HEAD, meaning whitespace errors in earlier commits from the same initial push are skipped; for example, a two-commit branch whose first commit adds trailing whitespace passes when its tip is clean. Compare the new branch with its base branch instead so the repository's required git diff --check gate covers the complete change.
AGENTS.md reference: AGENTS.md:L41-L49
Useful? React with 👍 / 👎.
What changed
scripts/validate.shsafe when the checkout path contains spaces.scripts/test-validate.shregression coverage for valid skills, name/directory mismatch, README omissions, and path safety.origin/main...HEADrange on pushes tomain.AGENTS.md, Copilot instructions, README, operator docs, and the pull-request checklist aligned with the new minimum gate.Why this is the smallest complete change
The existing cloud-agent setup is useful and structurally sound. This PR changes only the validator, its direct regression coverage, the affected CI range logic, and documentation that names the required checks. It does not alter any interactive skill or
fstack-runbehavior.Evidence
Skill and documentation checks
sh -n scripts/validate.shsh -n scripts/test-validate.shsh scripts/test-validate.shsh scripts/validate.shagainst the complete repository in GitHub Actionsgit diff --checkagainst the PR base in GitHub ActionsMissing evidence or remaining risk
gh skill publish --dry-runwas not run because GitHub CLI is not available in the execution container.