Repository navigation
chore: let agents handle Pushgate feedback and ignore tests in size limits - #189
Open
devs-rootstrap wants to merge 2 commits into
Open
devs-rootstrap wants to merge 2 commits into
devs-rootstrap wants to merge 2 commits into
Conversation
devs-rootstrap
requested review from
amaury901130,
asdolo and
fernandatoledo
and
a balanced review from Copilot
December 3, 2026 12:12
There was a problem hiding this comment.
🟡 Changes recommended
Extension-based exclusions in .pushgate.yml bypass forbidden_paths, allowing sensitive files that the security policy should block.
1 open issue
What changed in this PR
Overall Review: ai:serious
Updates the template’s Pushgate configuration and agent workflow to support automated feedback handling and exclude tests from size limits.
Changes:
- Excludes Jest tests and Maestro flows, documenting the trade-offs.
- Defines a three-round feedback loop with human escalation.
- Links command documentation to the push workflow.
| File | Description |
|---|---|
AGENTS.md |
Documents push commands, feedback handling, and safeguards. |
agent_docs/commands.md |
Links to the Pushgate workflow. |
.pushgate.yml |
Adds test exclusions and explains their scope. |
Review effort: Balanced
Comment on lines
+257
to
+258
| - .maestro/**/*.yaml | ||
| - .maestro/**/*.yml |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Jira board reference:
What does this do?
.pushgate.yml: adds test files toignore_paths(.ts/.tsxunder__tests__/,*.test.ts(x),*.spec.ts(x)and.yaml/.ymlMaestro flows under.maestro/). Pushgate counts changed lines afterignore_pathsfiltering, so tests no longer count towardpolicies.diff_size.max_changed_linesorai.max_changed_lines(both 700). A comment explains how the setting works and what the trade-off is.AGENTS.md: new "Pushing (Pushgate)" section for coding agents:git -c pushgate.review-target=origin/<target_branch> push ...so the review-target prompt never shows up;--no-verify, skip flags, env vars) unless the human asks.agent_docs/commands.md: one line pointing to that section.Why did you do this?
Pushgate asks
Continue with push? [y/N]whenever a check, policy or AI review reports a warning or finding. The card asks for agents to apply that feedback on their own for up to 3 rounds and to bring in a person only after that. It also asks for a push with no findings to need no keypress, and for tests to stop counting toward the PR size limit.How Pushgate v3.5.0 behaves:
advisorymode and only needed documenting.So the 3-round loop is a rule in
AGENTS.md, whichCLAUDE.mdtells agents to follow.The test patterns match by file extension instead of whole folders. Because
ignore_pathsis applied before every policy, ignoring whole folders would also let a.env,*.pemorsecrets/file placed under__tests__/or.maestro/get pastforbidden_paths.Who/what does this impact?
.pushgate.ymlandAGENTS.md).ignore_pathsis global in Pushgate, so test files also skip the per-file eslint tool and the AI review. The always-run tools still type-check the Jest tests and run them.pnpm lintalready skips__tests__/(seeeslint.config.mjs), and no pre-push tool runs the Maestro flows (pnpm e2e-test). Both points are written down in the yml comment and inAGENTS.md.ai.mode, the size limits, the tools and the.huskyhooks are unchanged.How did you test this?
Verification
pnpm lint,pnpm type-check,pnpm lint:translations: pass.pnpm test: 40/40 suites, 237/237 tests pass.ignore_pathspatterns were checked against the repo with theignorelibrary that Pushgate uses. They match the 40 Jest test files and the 11 Maestro flows. They don't matchsrc/lib/test-utils.tsx,__mocks__/, or a.env/.pemfile inside those folders.pushgate.review-target=origin/master: all checks ok, 37/700 changed lines, and the AI review reported no findings.How to test locally
git fetch origin && git checkout chore/pushgate-agent-workflow__tests__/plus a small source file, commit, and rungit -c pushgate.review-target=origin/master push --dry-run origin HEAD:refs/heads/tmp-pushgate-check. The "Diff size" line should count only the source change.AGENTS.md.Notes:
Assumptions:
AGENTS.md, since Pushgate has no auto-fix of its own.__mocks__/andsrc/lib/test-utils.tsxare test support code and are still counted.origin/<target_branch>because projects generated from the template may changereview.target_branch(for example todevelop).Screenshots / Previews
Not applicable (config and docs only).