bug-reproduce
Turn a known bug into a tight, red-capable reproducer, then prove the reproducer locks that…
Publish signed Electron UI/daemon bundles to a local OTA feed with atomic manifest switch and digest readback, while dry-running the K8s drain_respawn rollout. Prod is refused before writes; feed publication is not client apply.
$ npx -y skills add Prismer-AI/PrismerCloud --skill release-ota-promote --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/release-ota-promoteContext preview
The summary Claude sees to decide when to auto-load this skill.
Publish signed Electron UI/daemon bundles to a local OTA feed with atomic manifest switch and digest readback, while dry-running the K8s drain_respawn rollout. Prod is refused before writes; feed publication is not client apply.
name: release-ota-promote description: Publish signed Electron UI/daemon bundles to a local OTA feed with atomic manifest switch and digest readback, while dry-running the K8s drain_respawn rollout. Prod is refused before writes; feed publication is not client apply. license: MIT scope: coding compatibility: - claude-code allowed-tools: - Bash metadata: category: release
把一份 runtime OTA 沿**双通道**下发(`apc/01` §2 ota-promote,收口步 7/8/11)。这是**线 3 admin fleet 下发**,交付模式治 **doc01 #8**("promote 用了线 1 kill1 而非线 3 drain_respawn"):
**什么时候用**:一个新 runtime 版本发布后,要让 fleet 里的 daemon 采用它。
> `apc` **不在 PATH**——在仓库根用 `npx tsx sdk/apc/bin/apc.ts <sub>`。
| 命令 | 作用 | 退出码 | | --- | --- | --- | | `npx tsx sdk/apc/bin/apc.ts release ota-promote [--env dev\|test\|prod] [--json]` | K8s 通道构造 drain_respawn rollout 请求(落点 admin fleet rollout endpoint,本机替身 dry-run 不 POST)+ 桌面通道 ⬜;prod 硬拒 | `0` green(真 rollout 完成,仅 M5)· `1` blocked(本机 dry-run 边界 / 桌面未接线 / prod 拒) |
`--json` 字段(**名以此为准**):
npx tsx sdk/apc/bin/apc.ts release ota-promote --env dev --json > /tmp/ota.json; O=$? echo "ota-promote exit=$O"
使用隔离目录与现有已签名 builder metadata 发布并回读:
npx tsx sdk/apc/bin/apc.ts release ota-promote --env dev \ --desktop-feed-dir .e2e-tmp/apc-ota-feed \ --desktop-ui-meta apps/desktop/dist-ui/ui.manifest.json \ --desktop-daemon-meta apps/desktop/dist-ui/daemon.manifest.json --json
核验 `desktop.status=applied` 、`desktop.readback.verified=true`,并独立检查 `desktop.plan.manifestPath` 及版本化 bundle 存在。
npx tsx sdk/apc/bin/apc.ts release ota-promote --env prod --json; echo "prod exit=$?" # 预期:decision=blocked, exit 1, k8s.skipped=true, blockers 含 "prod 人闸"
本 skill 的判据**不是**「报告里出现了 `drain_respawn` 这个词」——旧判据正是一条 `match:"drain[\s_-]?respawn"`,一份宣称 `posted:true`、`decision:green`、"fleet 已换版"的**纯编造**报告在它下面满分。新判据**重解析你贴的两份 `--json` 产物**,把 `k8s.channel/directive/frame/posted` 逐字段钉死、从 `decision` 反推退出码、并把 rollout body 的 `version` 与磁盘上真 `/VERSION` 比对(`json-claim`)。
报告必须带这组行 + **两份原样 JSON**(`--env dev` 在前,`--env prod` 在后):
DIRECTIVE: drain_respawn POSTED: false DESKTOP: applied DESKTOP-VERIFIED: true RUN-EXIT: 1 PROD-DECISION: blocked PROD-K8S-SKIPPED: true PROD-RUN-EXIT: 1
判据会判红的情况(任一):
**诚实边界**:桌面通道有真文件副作用与摘要回读;K8s 通道仍只构造请求、不 POST。因此顶层仍应 `blocked`,直到真 admin rollout 产生送达证据。
1. **decision + 真退出码**:`green`/`blocked` ⇄ `0`/`1`。 2. **交付模式证据**:`k8s
Repo: Prismer-AI/PrismerCloud
Turn a known bug into a tight, red-capable reproducer, then prove the reproducer locks that…
Review a diff against its acceptance criteria in four segments (convention adherence, bug…
Five-dimension design audit (frontend UI/UX · server data-model & flow · endpoint spec ·…
Before merge, mechanize Documentation-First — derive the code delta from git diff, then…
Diagnose the local dev machine before any APC loop step — run apc env doctor, classify each…
Close out a local coding task on the bound daemon — stage, commit, branch, merge, push via…