Skip to content

Revert preflight-gate hook (#3580): local preflights overload multi-agent hosts - #3598

Merged
Daniel Meppiel (danielmeppiel) merged 1 commit into
mainfrom
danielmeppiel/revert-preflight-gate
Nov 12, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 1 commit into
mainfrom
danielmeppiel/revert-preflight-gate

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

Reverts #3580.

The preflight-gate preToolUse hook denies git push and 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 revert of 2cc5d80: it removes packages/preflight-gate, the deployed .github/hooks entries, and the matching apm.yml and apm.lock.yaml entries.

apm-spec-waiver: pure revert of a repo-local agent hook package, no product code touched

…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]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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

@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 3b1ab4d into main Nov 12, 2026
25 checks passed
@danielmeppiel
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]>
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