Repository navigation
Revert preflight-gate hook (#3580): local preflights overload multi-agent hosts - #3598
Merged
Daniel Meppiel (danielmeppiel) merged 1 commit intoNov 12, 2026
Merged
Conversation
…ht receipt (#3580)" This reverts commit 2cc5d80. The preToolUse hook makes every agent run the full CI-mirror preflight locally before any push or PR. With many agents running in parallel on one machine, those runs overload the host (load average above 90, runs lasting up to 2 hours). CI stays the authority. Local overload risk will be redesigned separately. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 12, 2026 11:58
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the removal of the repository-local preflight gate.
No open issues 🎉
What changed in this PR
Reverts the repository-local preflight gate introduced in #3580 to stop parallel agents from overloading shared hosts with repeated local CI runs. The change removes the gate tooling without modifying APM product code or CI workflows.
Changes:
- Removes the preflight runner, hook definitions, and deployed scripts.
- Removes the package dependency, executable permission grant, and lockfile deployment records.
- Deletes the package's tests, documentation, and lint configuration.
| File | Description |
|---|---|
packages/preflight-gate/tests/test_runner.py |
Removes runner and receipt tests. |
packages/preflight-gate/tests/test_policy.py |
Removes tier-selection and CI-parity tests. |
packages/preflight-gate/tests/test_lock_env.py |
Removes environment provisioning tests. |
packages/preflight-gate/tests/test_launcher.py |
Removes launcher and hook-matching tests. |
packages/preflight-gate/tests/test_gate.py |
Removes gate decision and receipt-validation tests. |
packages/preflight-gate/tests/test_deny_reason.py |
Removes denial-message tests. |
packages/preflight-gate/tests/test_concurrency.py |
Removes scheduling and cancellation tests. |
packages/preflight-gate/tests/test_classify.py |
Removes publish-command classification tests. |
packages/preflight-gate/tests/test_chain.py |
Removes chained-command gating tests. |
packages/preflight-gate/tests/conftest.py |
Removes shared sandbox fixtures and fake policy. |
packages/preflight-gate/tests/.gitignore |
Removes the test workspace ignore rule. |
packages/preflight-gate/ruff.toml |
Removes package-specific lint configuration. |
packages/preflight-gate/README.md |
Removes preflight usage and maintenance documentation. |
packages/preflight-gate/apm.yml |
Removes the package manifest. |
packages/preflight-gate/.apm/hooks/scripts/preflight.py |
Removes the local CI runner. |
packages/preflight-gate/.apm/hooks/scripts/preflight_policy.py |
Removes check selection and mirrored CI commands. |
packages/preflight-gate/.apm/hooks/scripts/preflight_lib.py |
Removes shared preflight helpers. |
packages/preflight-gate/.apm/hooks/scripts/gate-launcher.sh |
Removes the source hook launcher. |
packages/preflight-gate/.apm/hooks/preflight-gate.json |
Removes the source hook definition. |
apm.yml |
Removes the dependency and hook execution grant. |
apm.lock.yaml |
Removes package and deployment records. |
.github/hooks/scripts/preflight-gate/.apm/hooks/scripts/preflight.py |
Removes the deployed CI runner. |
.github/hooks/scripts/preflight-gate/.apm/hooks/scripts/preflight_policy.py |
Removes the deployed check policy. |
.github/hooks/scripts/preflight-gate/.apm/hooks/scripts/preflight_lib.py |
Removes deployed preflight helpers. |
.github/hooks/scripts/preflight-gate/.apm/hooks/scripts/gate-launcher.sh |
Removes the deployed hook launcher. |
.github/hooks/preflight-gate-preflight-gate.json |
Removes the active repository hook registration. |
Review effort: Balanced
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel/revert-preflight-gate
branch
November 12, 2026 12:08
Daniel Meppiel (danielmeppiel)
added a commit
to Kaustubh1235/apm
that referenced
this pull request
Nov 12, 2026
Picks up microsoft#3598 (preflight gate revert) and the other changes on main since the previous merge. Co-authored-by: Copilot App <[email protected]>
This was referenced Nov 12, 2026
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.
Reverts #3580.
The
preflight-gatepreToolUse hook deniesgit pushand PR creation until a full local CI-mirror preflight has passed. With many autopilot agents running in parallel on one maintainer machine, each agent ran that preflight on its own. We observed more than 8 concurrent preflight trees, plus orphaned xdist and lifecycle-smoke pytest runs that survived their parent, a load average of about 98, and single runs lasting 2 hours. Agent throughput collapsed.CI remains the authority on the PR merge commit. The local overload risk with multiple agents will be redesigned separately before any local gate returns.
This is a pure
git revertof 2cc5d80: it removespackages/preflight-gate, the deployed.github/hooksentries, and the matchingapm.ymlandapm.lock.yamlentries.apm-spec-waiver: pure revert of a repo-local agent hook package, no product code touched