Agent Skills
› luxury-yacht/app
› cluster-auth-lifecycle
cluster-auth-lifecycle
GitHub管理多集群 Kubernetes 配置的认证、客户端生命周期、故障恢复及刷新子系统。涵盖前后端集群状态同步、kubeconfig 选择逻辑、对象目录管理及相关测试,确保多集群环境下的数据一致性与连接稳定性。
Trigger Scenarios
处理 kubeconfig 选择和集群客户端设置
实现认证失败后的重试与恢复机制
管理多集群环境下的刷新子系统和对象目录生命周期
修改集群标签页或前端 UI 中的集群状态展示
Install
npx skills add luxury-yacht/app --skill cluster-auth-lifecycle -g -y
SKILL.md
Frontmatter
{
"name": "cluster-auth-lifecycle",
"description": "Work on Luxury Yacht kubeconfig selection, multi-cluster client lifecycle, auth failure\/recovery, selected\/background clusters, cluster tabs, refresh subsystem rebuilds, and object catalog lifecycle"
}
Cluster Auth Lifecycle
Use this when touching kubeconfig selection, cluster client setup, auth failure overlays, retry/recovery, selected/background cluster state, cluster tabs, refresh subsystem rebuilds, object catalog start/stop, or tests for cluster add/remove behavior.
Read First
AGENTS.mdbackend/AGENTS.mdfor backend lifecycle/client changesfrontend/AGENTS.mdfor frontend cluster state or UI changesdocs/architecture/multi-cluster.mddocs/architecture/data-freshness.mddocs/architecture/auth.mddocs/architecture/refresh-system.mddocs/architecture/catalog.mdwhen object catalog lifecycle is involved
Backend Entry Points
backend/cluster_runtime_manager.gobackend/cluster_workspace_projection.gobackend/refresh_coordinator.gobackend/workspace_coordinator.gobackend/cluster_runtime_intent.gobackend/cluster_runtime_clients.gobackend/cluster_runtime_auth.gobackend/workspace_auth.gobackend/workspace_cluster_clients.gobackend/workspace_kubeconfigs.gobackend/workspace_state.gobackend/refresh_setup.gobackend/refresh_update.gobackend/refresh_subsystems.gobackend/refresh_recovery.gobackend/refresh_object_catalog.gobackend/internal/authstate
Frontend Entry Points
frontend/src/modules/kubernetes/configfrontend/src/modules/clusterfrontend/src/ui/layout/ClusterTabs.tsxfrontend/src/ui/overlays/AuthFailureOverlay.tsxfrontend/src/core/refreshfrontend/src/core/data-access
Checklist
- Every cluster-data path carries
clusterId; never infer the active cluster in a backend/API/cache/action path. - Selected and background cluster sets stay distinct and refresh scopes are rebuilt or cleared when cluster selection changes.
- Refresh domains stay single-cluster. Cross-cluster displays fan out only for clusters they display; retained inactive tabs stay passive.
- Cluster add/remove updates aggregate refresh handlers and object catalog services through the live update path, not only initial setup.
- Watcher, auth, and transport callbacks publish non-blocking typed
ClusterRuntimeIntentvalues; Workspace is the single consumer and routes accepted generations through the serialized selection mutation. - Auth-failed clusters do not block healthy clusters.
- Retry/recovery rebuilds transport, refresh, object catalog, and frontend diagnostics consistently.
- Closing/removing a cluster cleans up streams, sessions, stale scopes, and catalog state for that cluster.
- Every frontend cluster-tab open/close affordance routes through
KubeconfigContext's unified selection transition (openKubeconfig,closeKubeconfig, orsetSelectedKubeconfigs); do not splice selected clusters locally or call generated backend selection/close commands from UI surfaces. - Tests cover at least one multi-cluster or auth-failure transition.
Validation
Use focused checks while iterating:
mise exec -- go test ./backend ./backend/internal/authstate
mise exec -- npm run typecheck --prefix frontend
mise exec -- npm run test --prefix frontend -- cluster kubeconfig auth refresh
Then follow the root final validation gate.
Version History
- ee846a6 Current 2026-08-20 13:02


