---
name: diag-appbox
description: |
  Read-only diagnosis for Dedicated APPBox CR lifecycle (Pending/Creating/
  Failed, VPCNotReady, dataplane K8s not ready). Use when APPBox name is known
  or handed off from diag-cluster. Not for Cluster-only scale without APPBox
  signal.
---

# Action Type

`read-only`

# Path note

Shared docs resolve from skill root (`dedicated-cloud-diag/`):
`references/method-*`, `references/patterns/*`, `references/object-graph.md`.
Domain provider files: `diag-appbox/references/provider-*.md`.

# Data methods

- Default: `references/method-k8s-resource/METHOD.md`
- Optional cluster context: `references/method-cluster-cr/METHOD.md` when only
  `cluster_id` was given (derive APPBox via object-graph).

# Required patterns

`cp-cr-lifecycle`, `provider-branch`, `healthy-exit`, `fetch-retry-bypass`,
`skill-boundary-assist`, `diag-trace`. Edges: `references/object-graph.md`.

# Inputs

| Input | Required |
|-------|----------|
| APPBox `name` (+ ns if known) **or** `cluster_id` to derive via NetworkName | hard |
| symptom | optional |

# Top-down Procedure

1. Resolve APPBox name/ns (from input or `cluster_cr.spec.networkName`).
2. Intent (hard): Plane=`CONTROL_PLANE`, GK=`APPBox`, name/ns.  
   Focus: `status.phase`, `status.reason`, `spec.provider`, `spec.vpcRef`.  
   Establish provider.
3. Apply `cp-cr-lifecycle`: phase → reason → soft events.
4. **VPC Gate** (hard): if phase `Pending`/`Failed` with `VPCNotReady` or VPC
   not Active — Intent CP `VPC` via `spec.vpcRef`.  
   - VPC not `Active` → handoff `diag-vpc`.  
   - VPC Active but APPBox still Pending → continue APPBox create path
     (provider file).
5. Provider-specific create stages: read
   `diag-appbox/references/provider-{eks,gke,aks}.md`.
6. Deeper: code under
   `regional-server/pkg/controllers/appbox/taskbuilder.go` and
   `task/{eks,gke,aks}` / `task/common` if reachable; cloud CLI → user-assist.

# Health checklist (hard)

1. APPBox `status.phase=Active`.
2. VPC Gate green (`vpcRef` VPC Active).
3. No lingering `Failed` phase / blocking reason.

All green → `no_current_anomaly`.

# Handoff

- VPC not ready → `diag-vpc`
- Mutation → `dedicated-cloud-ops`

# Output

Obey `references/patterns/diag-trace.md`.
