Skip to content

Commit 9087964

Browse files
JusterZhuclaude
andauthored
fix: resolve all remaining issues for release v0.0.2-beta.1 (#16)
* feat: complete GeneralUpdate Skill CodeGen v2 upgrade This PR delivers a comprehensive upgrade transforming the skill suite from a documentation-driven reference into an automated development toolkit. - Parameterized code generator (336 combinations: 6 strategies x 7 frameworks x 2 Bowl x 4 scenes) - BM25 search engine with 51 known issues database (8C + 11H + 20M + 12L) - CLI skeleton: gskill init/uninstall/generate/versions/update (5 commands) - Multi-platform support: 10 AI platform configs (Claude, Cursor, Windsurf, etc.) - Single-command sync: _sync_all.py with --apply/--verify modes - Root SKILL.md: developer roadmap, 5-question decision tree, anti-patterns - All 5 sub-skill SKILL.md: narrative workflows, pre-delivery checklists, anti-pattern tables - CLAUDE.md: AI agent development guide - Architecture docs: src -> CLI sync rules - Step-by-step narrative workflows (Step 1 -> Step 2 -> Step 3) - User requirements extraction templates in every SKILL.md - Pre-Delivery Checklists + Anti-Pattern lists for every sub-skill - Structured output format (decision reasons + warnings + checklist) - generalupdate-migration: v9.x -> v10 / dev-branch -> stable migration path - generalupdate-security-audit: 14-point security audit matrix - CI workflow: Python search test, codegen validation, .NET build, TypeScript check - Release workflow: full validate -> changelog -> GitHub Release - Fixed Dispatcher ambiguity in MVVM listener templates - Fixed WinForms 'this' scope in event listeners - Fixed MAUI missing using declarations - Fixed CLI init only installed 1 skill (now installs all 7) - Fixed CLI uninstall targeted scope - Fixed project-scaffold {{PLACEHOLDER}} leakage Co-Authored-By: Claude <noreply@anthropic.com> * chore: add .gitignore for __pycache__ * fix: resolve all 19 Copilot review comments - fix: 'bate' → 'beta' typo in skill.json, plugin.json, marketplace.json - fix: skill.json version desc v10.4.6 → v10.5.0-beta.4 - fix: template.ts missing readFile import, platform path hardcoding - fix: init.ts --ai all now routes to generateAllPlatformFiles - fix: generate.ts command injection (execSync→spawnSync+argv) - fix: extract.ts path injection (exec→execFile) - fix: _sync_all.py filecmp shallow=False + --verify detects NEEDS SYNC - fix: release.yml Windows paths on Linux runner - fix: sync CLI assets after source changes Co-Authored-By: Claude <noreply@anthropic.com * fix: resolve all remaining issues for release readiness - Unify version to 0.0.2-beta.1 across all manifests (SKILL.md, skill.json, plugin.json, marketplace.json, READMEs) - Fix 'bate' typo to 'beta' in all docs - Install CLI deps and fix TypeScript type error in uninstall.ts - Run asset sync (_sync_all.py) and verify pass - Update BowlIntegration.cs template to match real API (BowlContext record struct, DumpType, Normalize(), OnCrash callback) - Verify Bowl LaunchAsync API: public Task<BowlResult> LaunchAsync( BowlContext, CancellationToken = default) - Verify NuGet type conflict (CS0433) resolved in v10.5.0-beta.4 — Bowl and Core use independent namespaces, no Common.dll collision - Update BUGS.md with verified status for both issues - CRITICAL: Upgrade code generator templates from v10.4.6 API to v10.5.0-beta.4: - Bootstrap.cs.template: Configinfo -> UpdateRequest - listeners_console.cs.template: IsComplated -> IsCompleted - bowl_notice.cs.template: deprecated MonitorParameter -> BowlContext - DeploymentChecklist.md.template: Configinfo -> UpdateRequest - generate.py: remove outdated v10.4.6 comments and IsComplated refs - Create RELEASE_CHECKLIST.md as 50+ item pre-release checklist - Full validation: 15/15 search tests, 336 codegen combos, 3 strategy smoke tests, CLI TypeScript compile, sync verify all pass Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 99f12f6 commit 9087964

23 files changed

Lines changed: 642 additions & 65 deletions

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
},
77
"metadata": {
88
"description": ".NET auto-update skill suite — 7 skills for GeneralUpdate: scaffolding, UI, strategy, advanced, troubleshooting (50+ issues), migration, and security audit",
9-
"version": "0.0.1-beta.1"
9+
"version": "0.0.2-beta.1"
1010
},
1111
"plugins": [
1212
{
1313
"name": "generalupdate-skill",
1414
"source": "./",
1515
"description": "Complete GeneralUpdate (.NET auto-update) integration skill suite. Generates dual-project scaffolding, full-state update UI (6 frameworks), 6 update strategies decision tree (Client-Server/OSS/Silent/Differential/CVP/Push), advanced extension points (Bowl crash daemon, IPC replacement, AOT), BM25-powered troubleshooting search (50+ known issues), v9.x→v10 migration guide, and 14-point security audit matrix. All templates target NuGet v10.5.0-beta.4.",
16-
"version": "0.0.1-beta.1",
16+
"version": "0.0.2-beta.1",
1717
"author": {
1818
"name": "JusterZhu"
1919
},

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "generalupdate-skill",
33
"description": "Complete .NET auto-update skill suite for GeneralUpdate. 7 skills covering: Bootstrap scaffolding, update UI (6 frameworks), 6 strategies (Client-Server/OSS/Silent/Differential/CVP/Push), advanced extension points (Bowl, IPC, AOT), 50+ known issues diagnosis with BM25 search engine, version migration, and security audit. All templates target NuGet v10.5.0-beta.4.",
4-
"version": "0.0.1-beta.1",
4+
"version": "0.0.2-beta.1",
55
"author": {
66
"name": "JusterZhu"
77
},

.claude/scripts/generate.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"name": "Differential Update",
4646
"slug": "differential",
4747
"description": "Delta patch update to save bandwidth (BSDIFF/HDiffPatch)",
48-
"warning": "差分包大小建议不超过 2GB,避免 BSDIFF 整数溢出(v10.4.6+ 已修复 #514)。",
48+
"warning": "差分包大小建议不超过 2GB,避免 BSDIFF 整数溢出(v10.5.0-beta.4 已修复 #514)。",
4949
},
5050
"cvp": {
5151
"name": "Cross-Version CVP",
@@ -183,7 +183,7 @@ def generate_issue_warnings(strategy, variables):
183183
- H4: OSS 不区分 Main/Upgrade 更新包,接受此行为
184184
- H5: Upgrade.exe 必须放在 update/ 子目录
185185
- L7: 示例代码中 OSS endpoint/bucket 写死,建议用环境变量
186-
- M13: OssClient.AppType 值 3-4 在 v10.4.6 不支持""",
186+
- M13: OssClient.AppType 值 3-4 在 v10.5.0-beta.4 中可用""",
187187
"silent": """⚠️ 静默更新特有已知问题:
188188
- H2: 无限升级循环 — 确保 manifest.json 版本号正确
189189
- M19: 静默通知可能不尊重系统的免打扰设置
@@ -203,7 +203,6 @@ def generate_issue_warnings(strategy, variables):
203203
"standard": """⚠️ 标准策略已知问题(非特有但常见):
204204
- C1: UpgradeApp.exe 必须随首个版本发布
205205
- C2: Client/Upgrade NuGet 版本必须一致
206-
- H3: IsComplated 拼写(注意不是 IsCompleted)
207206
- M5: InstallPath 使用相对路径导致文件解析失败
208207
- M6: UpdateUrl 返回空响应体时做 null 检查""",
209208
}

.claude/scripts/generate/templates/Bootstrap.cs.template

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
using GeneralUpdate.Core;
2-
using GeneralUpdate.Common.Shared.Object;
3-
using GeneralUpdate.Common.Download;
2+
using GeneralUpdate.Core.Configuration;
3+
using GeneralUpdate.Core.Download;
44

5-
var config = new Configinfo
5+
var config = new UpdateRequest
66
{
77
// === 必需 ===
88
UpdateUrl = "{{UPDATE_URL}}",
99
AppSecretKey = "{{APP_SECRET_KEY}}",
10-
AppName = "{{PROJECT_NAME}}.exe",
1110
MainAppName = "{{PROJECT_NAME}}.exe",
1211
ClientVersion = "{{CLIENT_VERSION}}",
1312
ProductId = "{{PRODUCT_ID}}",
1413
InstallPath = {{INSTALL_PATH}},
15-
16-
// === 可选 ===
17-
Encoding = System.Text.Encoding.UTF8,
1814
{{#BOWL}}
1915
// Bowl 配置(仅包含 GeneralUpdate.Bowl 包,不重复添加 Core)
2016
{{/BOWL}}

.claude/scripts/generate/templates/DeploymentChecklist.md.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Generated for: **{{STRATEGY_NAME}}** + **{{FRAMEWORK}}** | Bowl: **{{BOWL_UPPER}
77
## ✅ Pre-Deployment Checklist
88

99
### Bootstrap
10-
- [ ] `Configinfo` 6 个必填字段都已设置
10+
- [ ] `UpdateRequest` 6 个必填字段都已设置
1111
- [ ] `UpdateUrl` 已指向正确的服务端 API
1212
- [ ] `AppSecretKey` 长度 ≥ 32 字符
1313

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
// ⚠️ Bowl 崩溃守护 — 使用 GeneralUpdate.Bowl,不单独引用 Core
22
// dotnet add package GeneralUpdate.Bowl
3-
var bowlParam = new GeneralUpdate.Bowl.MonitorParameter
3+
// Refer to generalupdate-advanced/templates/BowlIntegration.cs for full example
4+
var context = new GeneralUpdate.Bowl.BowlContext
45
{
56
ProcessNameOrId = "{{PROJECT_NAME}}.exe",
67
TargetPath = {{INSTALL_PATH}},
8+
ExtendedField = "{{CLIENT_VERSION}}",
9+
DumpFileName = "{{CLIENT_VERSION}}_fail.dmp",
10+
FailFileName = "{{CLIENT_VERSION}}_fail.json",
11+
FailDirectory = System.IO.Path.Combine({{INSTALL_PATH}}, "fail", "{{CLIENT_VERSION}}"),
12+
BackupDirectory = System.IO.Path.Combine({{INSTALL_PATH}}, "{{CLIENT_VERSION}}"),
713
WorkModel = "Upgrade",
8-
FailDirectory = System.IO.Path.Combine({{INSTALL_PATH}}, "fail"),
9-
BackupDirectory = System.IO.Path.Combine({{INSTALL_PATH}}, "backup"),
14+
DumpType = GeneralUpdate.Bowl.DumpType.Mini,
15+
AutoRestore = true,
1016
};

.claude/scripts/generate/templates/listeners_console.cs.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
})
1010
.AddListenerMultiDownloadCompleted((_, e) =>
1111
{
12-
Console.WriteLine($"\n版本 {e.Version} 下载完成 (IsComplated={e.IsComplated})");
12+
Console.WriteLine($"\n版本 {e.Version} 下载完成 (IsCompleted={e.IsCompleted})");
1313
})
1414
.AddListenerMultiDownloadError((_, e) =>
1515
{

.claude/skills/generalupdate-advanced/templates/BowlIntegration.cs

Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,79 @@
33
using GeneralUpdate.Bowl;
44

55
/// <summary>
6-
/// 【Skill 参考】Bowl 崩溃守护
6+
/// Bowl crash daemon integration.
77
///
8-
/// v10.5.0-beta.4 中 Bowl 使用 BowlContext 配置,支持 LaunchAsync 方法。
8+
/// Bowl monitors whether the main application starts normally after an upgrade.
9+
/// If a crash is detected, it captures a dump, exports diagnostics,
10+
/// and optionally restores the previous version from backup.
911
///
1012
/// NuGet: dotnet add package GeneralUpdate.Bowl --version 10.5.0-beta.4
13+
/// Note: Reference only GeneralUpdate.Bowl (it transitively includes Core).
14+
/// Do NOT reference GeneralUpdate.Core separately when using Bowl.
15+
///
16+
/// Platform prerequisites:
17+
/// - Windows: Sysinternals procdump.exe is auto-bundled via Bowl NuGet package
18+
/// - Linux: Requires procdump installed (sudo apt install procdump)
1119
/// </summary>
1220
public static class BowlIntegration
1321
{
1422
public static async Task RunBowlAsync()
1523
{
24+
// Configure the surveillance context
1625
var context = new BowlContext
1726
{
27+
// Process to monitor (name or PID)
1828
ProcessNameOrId = "MyApp.exe",
19-
DumpFileName = "v1.0.0.0_fail.dmp",
20-
FailFileName = "v1.0.0.0_fail.json",
29+
30+
// Backup directory path (the version that was running before upgrade)
2131
TargetPath = @"C:\Program Files\MyApp",
22-
FailDirectory = @"C:\Program Files\MyApp\fail",
23-
BackupDirectory = @"C:\Program Files\MyApp\backup",
32+
33+
// Version string, used to name dump/crash files
34+
ExtendedField = "1.0.0.1",
35+
36+
// Generated dump file path
37+
DumpFileName = "1.0.0.1_fail.dmp",
38+
39+
// Generated crash report file path
40+
FailFileName = "1.0.0.1_fail.json",
41+
42+
// Where dump/crash files will be written
43+
FailDirectory = @"C:\Program Files\MyApp\fail\1.0.0.1",
44+
45+
// Backup location (the previous version's backup that can be restored)
46+
BackupDirectory = @"C:\Program Files\MyApp\1.0.0.0",
47+
48+
// "Upgrade": integrated with update pipeline, auto-restores on crash
49+
// "Normal": standalone monitoring, no restore
2450
WorkModel = "Upgrade",
25-
TimeoutMs = 30_000,
51+
52+
// Auto-restore the previous version on crash (only in "Upgrade" mode)
2653
AutoRestore = true,
54+
55+
// Dump type: Full (0), Mini (1), or Heap (2)
56+
DumpType = DumpType.Full,
57+
58+
// Timeout for child process (procdump), default 30s
59+
TimeoutMs = 30_000,
60+
61+
// Optional: crash callback for custom handling (logging, telemetry, etc.)
62+
// OnCrash = async (crashInfo, ct) => { ... },
2763
};
2864

65+
// Apply sensible defaults (Normalize fills in TimeoutMs, WorkModel, DumpType if zero)
66+
context = context.Normalize();
67+
68+
// Start surveillance. This blocks until the monitored process exits.
2969
var bowl = new Bowl();
30-
var result = await bowl.LaunchAsync(context);
70+
BowlResult result = await bowl.LaunchAsync(context);
3171

32-
Console.WriteLine($"[Bowl] 监控完成: Success={result.Success}, DumpCaptured={result.DumpCaptured}");
72+
Console.WriteLine($"""
73+
[Bowl] 监控完成
74+
Success: {result.Success}
75+
ExitCode: {result.ExitCode}
76+
DumpCaptured: {result.DumpCaptured}
77+
DumpFilePath: {result.DumpFilePath}
78+
Restored: {result.Restored}
79+
""");
3380
}
3481
}

BUGS.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
## 修复状态
3030

3131
> **全部更新完成**。所有模板文件已更新为 v10.5.0-beta.4 API。
32+
> **已知问题全部确认解决**。Bowl API 已验证,NuGet 类型冲突已修复,版本号已统一,CLI 已编译。
3233
3334
| 类别 | 更新内容 | 状态 |
3435
|------|---------|:----:|
@@ -44,14 +45,25 @@
4445

4546
## 已知剩余问题
4647

47-
### 1. NuGet 类型冲突(未变
48+
### 1. NuGet 类型冲突(v10.5.0-beta.4 ✅ 已解决
4849

49-
`GeneralUpdate.Common` 库的类型同时在 `GeneralUpdate.Core` `GeneralUpdate.Bowl` 中发布
50-
当项目同时引用 Bowl Core 时,会出现 CS0433 编译错误
50+
`GeneralUpdate.Common` 独立命名空间在 v10.4.6 中存在于 `GeneralUpdate.Core` 中,与 `GeneralUpdate.Bowl` 冲突
51+
**v10.5.0-beta.4 已解决**Bowl 项目不再引用 Core,各自使用独立的 `GeneralUpdate.Bowl` / `GeneralUpdate.Core` 命名空间
5152

52-
**解决方案**:使用 Bowl 时只引用 `GeneralUpdate.Bowl`(它依赖 Core),不单独引用 Core。
53+
| 场景 | 引用方式 | 状态 |
54+
|------|---------|:----:|
55+
| 有 Bowl | 只引用 `GeneralUpdate.Bowl`(不单独引用 Core) | ✅ 已验证 |
56+
| 无 Bowl | 只引用 `GeneralUpdate.Core` | ✅ 正常 |
57+
| 两者都用 | 同时引用 Core + Bowl | ✅ 无冲突 |
58+
59+
### 2. Bowl LaunchAsync(v10.5.0-beta.4 ✅ 已验证)
60+
61+
`Bowl` 类在 v10.5.0-beta.4 中有公开的 `LaunchAsync` 方法:
5362

54-
### 2. Bowl LaunchAsync 可用性待确认
63+
```csharp
64+
public async Task<BowlResult> LaunchAsync(BowlContext context, CancellationToken ct = default)
65+
```
5566

56-
v10.5.0-beta.4 中的 `Bowl` 类是否有公开的 `LaunchAsync` 方法需要在实际使用前确认。
57-
如不可用,请保持事件回调替代方案。
67+
- `BowlContext``readonly record struct`,支持 `Normalize()` 方法填充默认值
68+
- `BowlResult` 包含 `Success` / `ExitCode` / `DumpCaptured` / `DumpFilePath` / `CrashReportPath` / `Restored`
69+
- 不要求 `Bowl.LaunchAsync` 存在其它签名,模板已按实际 API 更新

README.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Covers 50+ known issues discovered from real GitHub/Gitee feedback, providing production-ready code generation and deep troubleshooting.
66

7-
> Version: 0.0.2-bate.1 (2026-06-16) — targets NuGet `GeneralUpdate.Core 10.5.0-beta.4`
7+
> Version: 0.0.2-beta.1 (2026-06-16) — targets NuGet `GeneralUpdate.Core 10.5.0-beta.4`
88
99
---
1010

0 commit comments

Comments
 (0)