本文へ移動
cccskills
無料GitHub で公開日本語紹介

safe-push

IntelliJリポジトリの変更をSafe Pushに通し、必要なテストやコンパイル確認を経て保護ブランチへ反映する手順を扱います。

原文原文の説明を見る

Push IntelliJ repository changes through the Safe Push workflow.

JetBrains/intellij-communityスター 20,664(GitHub 20,664 + cccskills 0)
連携ツールSlack

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • 変更を保護ブランチへ送る手順を確認したいとき
  • プッシュ前にSafe Pushをドライランしたいとき
  • Safe Pushの失敗原因を調べたいとき

日本語での紹介

できること

IntelliJリポジトリの変更をsafePush.cmdでSafe Pushに送る手順を確認できます。現在のHEADや指定コミットを対象ブランチへ送る方法、実際にはプッシュしない-dry-run、各オプションの役割を説明します。Safe Pushでは変更が一時ブランチに送られ、PatronusがテストやコンパイルなどのCI確認を実行し、すべて通れば対象ブランチにマージされます。開始後に表示されるPatronus URLで進行状況を確認でき、失敗時の調査手順も参照できます。

こんなときに便利

保護されたブランチへ変更を送る前に、リポジトリ固有の確認手順を把握したいときに向いています。テストを省略せずに変更を提出したい場合や、Safe Pushが失敗・遅延した際に原因や復旧方法を調べる場合にも使えます。

使い方の例

  • 「現在の変更をmasterにSafe Pushするコマンドを教えてください」
  • 「プッシュせずにSafe Pushの確認を試す方法を教えてください」
  • 「Safe Pushが失敗したときの調査手順を説明してください」

注意点

対象はIntelliJリポジトリのSafe Pushワークフローです。実行にはリポジトリ内のsafePush.cmdとPatronusを利用します。緊急プッシュはテストを省略するため、資料に記された限定的な緊急用途に限られます。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(1)

  • SKILL.md4.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

<!-- Generated by community/.ai/render-guides.mjs; edit community/.agents/skills/safe-push/SKILL.md -->

Safe Push Guide for AI Agents

This guide covers the Safe Push process for pushing changes to the IntelliJ repository.

Overview

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.

Safe Push CLI

The safePush.cmd script in the repository root provides command-line access to Safe Push without needing the IDE.

Basic Usage

# 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

Options

-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

What Happens During Safe Push

  1. Your changes are pushed to a temporary branch
  2. Patronus triggers required CI checks (tests, compilation)
  3. Tests may retry up to 4 times for flaky failures
  4. If all checks pass, changes are merged to the target branch
  5. You receive Slack/Space/Email notification of results

Typical Duration

  • Successful Safe Push: ~3-5 hours (95th percentile ~4.7 hours)
  • Failed Safe Push: ~4-5 hours

Monitoring Progress

After starting a Safe Push you'll receive a Patronus URL like:

https://patronus.labs.jb.gg/robot/<uuid>

Always print this URL back to the user — it is their primary handle for the run (link to share, cancel button, restore-branch button). The <uuid> segment is the robot id.

You can also track the Safe Push directly: check current status, enumerate failing checks, drill into a specific attempt, or babysit a long-running robot until it finishes. All of that is in the [[patronus]] skill — pick it up when the user asks for status or when offering to follow up. It's reasonable to proactively suggest tracking or babysitting once the Safe Push is in flight; the user can say no. The [[patronus]] skill also documents the hand-off to [[teamcity-cli]] when an individual TC build needs deeper inspection.

Cancel and restore-branch actions stay in the browser.

Emergency Push

Use ./safePush.cmd -emergency ONLY for:

  • Fixing broken compilation
  • Reverting commits that break installers
  • Fixing .patronus/config.yaml misconfigurations

DO NOT use Emergency Push for:

  • Javadoc typo fixes
  • When Safe Push fails due to "unrelated" tests (they're likely related)
  • Skipping tests because you're in a hurry
  • Pushing large changes that conflict with concurrent pushes

Bazel Tests and Environment Variables

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.

Troubleshooting

Safe Push stuck or slow

  • Check #ij-builds Slack channel for infrastructure issues
  • Safe Push duration varies based on infrastructure load

Tests failing that seem unrelated

  • Patronus retries tests up to 4 times
  • If tests fail all 4 attempts and pass in master, your changes likely caused the failure
  • Report suspected infrastructure issues to #ij-qa-watch

Need to debug a failed Safe Push

  1. Go to your Safe Push on Patronus
  2. Click "commits" to see changes
  3. Click "Restore Branch" to recover your changes locally

References

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

actions

無料概要あり

IntelliJプラグインのAnActionと登録設定を実装・変更し、表示文言やアイコンの定義、非同期処理の起動方法を整えます。

  • IDEに新しいアクションを追加したいとき
  • アクションの登録やアイコンを変更したいとき
  • 表示名と説明文の定義を整理したいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

bazel-test-migration

無料概要あり

IntelliJのJPSテストモジュールをBazelへ移行し、Bazelだけで起きる失敗を依存関係や実行環境から切り分ける手順を案内します。

  • JPSテストをBazelへ移行したいとき
  • Bazelだけで起きるテスト失敗を調べたいとき
  • テストの依存関係やデータ設定を確認したいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

code-style

無料概要あり

IntelliJのKotlin・Javaコードを新規作成やレビューする際に、言語の選び方、書式、型の扱い、例外処理などのプロジェクト規約に沿って整えるスキルです。

  • IntelliJ規約に沿ってKotlinを書きたいとき
  • Javaコードをレビューしたいとき
  • 例外処理やsealed型の分岐を確認したいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

commits

無料概要あり

IntelliJ向けの変更を適切な単位に分け、チケットの有無に応じた形式で、理由や判断も伝わるコミットメッセージを作成・修正するスキルです。

  • チケット付き変更のメッセージを作りたいとき
  • テストやドキュメントのコミットを整理したいとき
  • 既存のコミットメッセージを修正したいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

compare-python-typecheckers

無料概要あり

Pythonコードの型推論や型エラーを複数の型チェッカーで比較し、各ツールの判定と診断内容をまとめたレポートを作成します。

  • 型推論の違いを比較したいとき
  • 型エラーになるか確かめたいとき
  • 複数チェッカーの診断を見比べたいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

compose-ui-architecture

無料概要あり

Compose Desktopの画面で状態や副作用をどこに持たせるか整理し、表示と判断の境界、再利用部品やリストの設計を整えます。

  • 画面とプレゼンターの責務を分けたいとき
  • UI状態の置き場所を整理したいとき
  • Effectやコルーチンの使い方を見直したいとき
JetBrains/intellij-community2.1万2026年10月26日 更新

JetBrains のスキルをすべて見る

このスキルの問題を報告する