.agents/skills/safe-push/SKILL.md
This guide covers the Safe Push process for pushing changes to the IntelliJ repository.
Safe Push is a system that ensures code changes pass all required tests before being merged to protected branches (like master). It's powered by Patronus.
The safePush.cmd script in the repository root provides command-line access to Safe Push without needing the IDE.
# Push current HEAD to master (most common)
./safePush.cmd HEAD:master
# Push specific commit to master
./safePush.cmd <commit-hash>:master
# Push from feature branch to master
./safePush.cmd HEAD:master # while on feature branch
# Dry run (test without pushing)
./safePush.cmd -dry-run HEAD:master
-autosquash Automatically squash fixup! commits (default true)
-dry-run Run tests without push
-emergency Skip tests and push directly (USE ONLY IN EMERGENCIES)
-verbose Verbose output
-help Print help
After starting a Safe Push, you'll receive a Patronus URL like:
https://patronus.labs.jb.gg/robot/<uuid>
Visit this URL to:
Use ./safePush.cmd -emergency ONLY for:
DO NOT use Emergency Push for:
When writing tests that spawn external processes (like bazel.cmd), ensure required environment variables are passed:
// In BUILD.bazel for java_test targets:
env_inherit = [
"LOCALAPPDATA", // Windows
"PROCESSOR_ARCHITECTURE", // Windows
"USERPROFILE", // Windows
"HOME", // Unix/macOS - required for bazel cache directory
],
The Bazel sandbox does NOT inherit environment variables by default. Use env_inherit to explicitly pass variables from the host environment to tests.
#ij-builds Slack channel for infrastructure issues#ij-qa-watch#patronus-support, #ij-builds, #ij-qa-watch