mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-27 15:13:37 +08:00
Symptom: on the official v0.5.13 (and v0.5.12) installer, clicking Install
on the reverse-engineering / image-gen recommended plugins fails with
"not found in marketplace cc-haha-builtin". A local `electron:build`
package works, the official release does not.
Root cause: the release-desktop and build-desktop-dev workflows inline
electron:build's steps instead of calling the script:
bun run build
bun run build:electron
but `build:electron` does NOT chain `build:plugin-seed` — only the
`electron:build` / `electron:dev` npm scripts do. So the packaged app
never contains desktop/plugin-seed/, electron-builder's
`plugin-seed/**` files/asarUnpack globs match nothing, and
CLAUDE_CODE_PLUGIN_SEED_DIR points at a directory that doesn't exist.
registerSeedMarketplaces() then no-ops, leaving the user's
known_marketplaces.json with a stale cc-haha-builtin installLocation
from a prior local build. installPluginOp resolves that dead path,
falls back to the placeholder source, and reports "not found".
This drift was invisible because the desktop-native-checks gate runs
`electron📦dir` (→ electron:build, which DOES build the seed and
passed package-smoke), while the actual release runs the inlined path
that skips it.
Fix:
1. Add `bun run build:plugin-seed` to the "Build renderer and Electron
bundles" step in BOTH release-desktop.yml and build-desktop-dev.yml.
2. Add a packaged-artifact presence check for
plugin-seed/marketplaces/cc-haha-builtin/.claude-plugin/marketplace.json
to the package-smoke inspector (macOS / Windows / Linux), so a future
seedless build fails "Verify packaged app structure" before publish.
3. Update package-smoke fixtures + release-workflow.test to lock both in.
Tested:
- bun test scripts/quality-gate/package-smoke/index.test.ts
→ seed presence check passes; the only 3 reds are pre-existing
Windows-only forward-slash path assertions (green on CI Linux,
confirmed identical with the change stashed)
- bun test scripts/pr/release-workflow.test.ts
→ build:plugin-seed assertion passes; the 1 red (macOS signing
state) is pre-existing (confirmed with the change stashed)
- bun test scripts/pr/change-policy.test.ts scripts/pr/quality-contract.test.ts
→ 14/14
Confidence: high
Scope-risk: moderate (release pipeline change — treated as a product
change per AGENTS.md)
Co-authored-by: 你的姓名 <you@example.com>