본문으로 건너뛰기

google/xmc

https://skillcdn.ai/gh/google/xmc

내 AI에 이 주소를 연결하면 이 스킬을 쓸 수 있어요. 연결 방법 보기

  • 미확인
  • 기본 브랜치main
  • 커밋4aa58c5
  • 라이선스Apache-2.0
  • 검색단어

커밋 4aa58c5 기준으로 보여 주고 있습니다

최신 커밋(81ffa97)을 색인하는 중입니다. 준비될 때까지 이 페이지와 모든 에이전트에는 마지막으로 색인된 커밋이 제공됩니다.
GitHub에서 보기

XMC Fix Nightly

Investigates broken Nightly Examples E2E runs on main, performs root-cause triage across code regressions vs nightly cluster drift, implements minimal fixes in an isolated git worktree, opens a Draft PR, and proves the fix by triggering the nightly workflow on the PR branch.

경로
.agents/skills/xmc_fix_nightly/SKILL.md
라이선스
Apache-2.0

작성자를 위한 경고

  • "name" should use lowercase letters, digits and single hyphens only
  • "name" should match the name of the directory that holds SKILL.md
  • Not listed through the skills extension: the directory must be named after the skill.

XMC Fix Nightly Playbook

Scope: .github/workflows/nightly-examples-e2e.yml is the workflow this skill fixes and verifies on a PR branch. nightly-build.yml runs and their deploy-gke-diagnostics artifacts are read-only triage inputs (Layer B), and dispatching nightly-build.yml requires explicit user confirmation (Stage 5). nightly-visual-snapshot.yml is out of scope because it publishes the public GitHub Pages gallery.


Stage 1 — Discover & Triage Broken Nightly Examples E2E Run on main

Run tools/nightly_tests/triage_nightly_run.py (see tools/nightly_tests/README.md) to fetch origin/main, inspect recent nightly runs and open nightly-failure issues, download failed job logs and non-expired failure artifacts into ${ARTIFACT_DIR:-/tmp}/nightly_triage_<run_id>, parse failed_jobs[].result (the result-<id>/<id>.json object, including id, status, launch_status, verify_status, and xid) and bounded failed_jobs[].error_excerpt ##[error] context lines, collect SHA-pinned recent_commits, and compute rollout skew in one turn:

PYTHONPATH=. python3 tools/nightly_tests/triage_nightly_run.py

Pass --run-id <run_id> to triage a specific historical run. Stop Gate: Stop and report to the user (along with any stale open_issues) if status_summary is not "failing" ("healthy", "superseded", "in_progress", or "no_completed_runs"), unless the user explicitly requested triaging a "superseded" --run-id. Always review warnings (such as non-superseding workflow_dispatch green runs, equal-SHA Layer B/flake hints, recent-commit fallbacks, or missing build history) before trusting recent_commits or rollout_skew in Stage 2. When failed_jobs[].result and failed_jobs[].error_excerpt are insufficient to pinpoint the failure, delegate inspection of full job_<id>.log files or deploy-gke-diagnostics bundles to a subagent per Subagent Delegation Guidelines.


Stage 2 — Root-Cause Triage & Investigation

Inspect the JSON summary from Stage 1—failed_jobs (result, error_excerpt, failed_steps), recent_commits (pinned to target_run.headSha, with squash-merged (#<pr>) subjects), downloaded_artifacts, and rollout_skew—to classify the failure layer:

Layer A — Code, SDK, Example, Verifier, or Backend/UI Regression on main
Layer B — Nightly Cluster (xmc-nightly) Rollout Skew or State Drift
  • Client/Server Rollout Skew: nightly-build.yml deploys xmc-nightly at 01:00 UTC while nightly-examples-e2e.yml runs at 04:00 UTC (or on demand); inspect rollout_skew.undeployed_commits and rollout_skew.cluster_deployed_files from Stage 1 to see whether the failing example depends on undeployed server changes merged after rollout_skew.last_green_build_run.
  • Addon / Deployment Drift: Missing pods, failed Helm hooks, or unapplied Gateway/ClickHouse/MultiKueue state surfaced by rollout_skew.active_build_run and deploy-gke-diagnostics.

[!CAUTION] STRICT SHARED CLUSTER SAFETY INVARIANTS (xmc-nightly):

  1. Never Mutate xmc-nightly Directly: NEVER manually modify, apply manifests to, delete resources in, or upgrade xmc-nightly unless explicitly instructed by the user.
  2. Isolate KUBECONFIG During Read-Only Triage: Never overwrite default ~/.kube/config; pass export KUBECONFIG="${ARTIFACT_DIR:-/tmp}/kubeconfig_nightly" for any read-only cluster inspection.

Stage 3 — Create an Isolated Worktree & Implement the Fix

  1. Create an Isolated Git Worktree from origin/main:

    SLUG="<kebab-case-slug>"
    WORKTREE_DIR="/tmp/xmc-fix-nightly-${SLUG}"
    BRANCH_NAME="fix/nightly-${SLUG}"
    
    git fetch origin main
    git worktree add "${WORKTREE_DIR}" -b "${BRANCH_NAME}" origin/main
    
  2. Implement & Verify a Minimal, Single-Responsibility Fix: Follow XMC Feature Development and language rules under .agents/rules/languages/:


Stage 4 — Open a Draft PR

Delegate commit creation, diff sizing check, confirmation gate, and Draft PR creation to XMC Create PR — Pull Request Creation & PR Body Population, adding these nightly-specific details to pr_body.md:

  • Link the failing main workflow run/job URL and state the root-cause classification from Stage 2.
  • Include Fixes #<issue_number> when an open nightly-failure GitHub Issue exists.
  • Push fix/nightly-${SLUG} to origin and keep the PR strictly in Draft state (XMC Create PR — Draft PR to Open Conversion Policy).

Stage 5 — Trigger Nightly Examples E2E on the PR Branch to Prove the Fix

  1. Select Verification Workflow Scope:

    • Client / SDK / Example / Verifier / Workflow Changes: nightly-examples-e2e.yml builds example images and runs the branch's SDKs and verifiers directly against xmc-nightly. Pass --input "examples_filter=<ids>" using the non-empty comma-separated failed_jobs[].example_id values from Stage 1 (validated pre-flight by dispatch_and_watch.py), or omit --input to run the full matrix when example_id is empty (non-matrix jobs such as examples-import-check or build-example-images) or when shared SDK/installer/workflow files changed.
    • Cluster-Deployed Backend / UI / Helm / Addon Changes: nightly-examples-e2e.yml tests against the server/UI currently deployed on xmc-nightly. Proving a server/UI change on xmc-nightly requires dispatching nightly-build.yml first (never deploy-gke.yml directly, whose workflow_dispatch defaults omit xmc-nightly addons). Because nightly-build.yml mutates shared xmc-nightly and pushes a nightly-* tag, obtain explicit user confirmation first, then run (and verify conclusion == "success") before step 2 below:
      SLUG="${SLUG:-<kebab-case-slug>}"
      BRANCH_NAME="${BRANCH_NAME:-fix/nightly-${SLUG}}"
      
      PYTHONPATH=. python3 tools/release/dispatch_and_watch.py --workflow nightly-build.yml --ref "${BRANCH_NAME}"
      
  2. Dispatch & Watch nightly-examples-e2e.yml on the Pushed PR Branch: Ensure origin/${BRANCH_NAME} is pushed first (Stage 4). tools/release/dispatch_and_watch.py fetches origin/${BRANCH_NAME} and resolves FETCH_HEAD automatically when --target-sha is omitted (per Workflow Orchestration & Remote Automation Invariants), correlates the newly created workflow_dispatch run, and watches it to completion (conclusion == "success"):

    SLUG="${SLUG:-<kebab-case-slug>}"
    BRANCH_NAME="${BRANCH_NAME:-fix/nightly-${SLUG}}"
    EXAMPLES_FILTER="<matrix_example_id_or_empty>"
    
    PYTHONPATH=. python3 tools/release/dispatch_and_watch.py \
      --workflow nightly-examples-e2e.yml \
      --ref "${BRANCH_NAME}" \
      --input "examples_filter=${EXAMPLES_FILTER}" \
      --state-file "${ARTIFACT_DIR:-/tmp}/nightly_verify_state.json"
    
  3. Synchronize Draft PR Description & Report Proof: Once PR CI (./tools/pr_review/wait_for_ci.py <pr_number> per XMC Create PR — CI Wait Buffer Period) and the branch nightly-examples-e2e.yml run pass on origin/${BRANCH_NAME}, update the Draft PR description via ./tools/pr_review/update_pr_description.py (XMC Create PR — PR Description Updates via Helper Tool) with the passing verification run URL, create .url.json bookmark artifacts (UserFacing: true) for the Draft PR and verification run, and report back while keeping the PR in Draft state.

이 스킬의 파일

이 스킬에는 보조 파일이 없습니다.

지원 파일 전체 둘러보기