feat: 自动更新

This commit is contained in:
npc0-hue
2026-07-15 19:43:06 +08:00
parent f64eb0831f
commit f3b14b7945
54 changed files with 3207 additions and 589 deletions
@@ -0,0 +1,30 @@
## 1. Local Debug SCUM Runtime Proof
- [x] 1.1 Preserve SCUM manifest run distribution declarations in local debug registration.
- [x] 1.2 Add smoke assertions that `scum-alpha` exposes `generate-run` as available.
- [x] 1.3 Add smoke proof that `scum-alpha` can generate a Windows AMD64 run distribution.
- [x] 1.4 Recover run generation retries when the deterministic artifact exists before the distribution row.
- [x] 1.5 Recover repeated run self-update dispatches for the same artifact/checksum/idempotency key.
## 2. Verification
- [x] 2.1 Run `bash -n scripts/local-debug-smoke.sh`.
- [x] 2.2 Run `scripts/check-structure.sh`.
- [x] 2.3 Run `openspec validate fix-scum-run-distribution-smoke --strict`.
- [x] 2.4 Run focused local debug smoke proof for the fixed SCUM run distribution path.
- [x] 2.5 Run focused backend distribution retry tests.
- [x] 2.6 Run focused run update idempotency regression tests.
## Evidence
- `bash -n scripts/local-debug-smoke.sh` passed.
- `scripts/check-structure.sh` passed with `structure check passed`.
- `openspec validate fix-scum-run-distribution-smoke --strict` passed; OpenSpec telemetry flush reported `ENOTFOUND edge.openspec.dev`, which did not affect validation.
- Isolated local debug smoke passed with `LOCAL_DEBUG_SELF_START=true LOCAL_DEBUG_PLATFORM_PORT=18283 LOCAL_DEBUG_WEB_PORT=5196 LOCAL_DEBUG_ROOT=/private/tmp/browser-scum-run-distribution-smoke-4 scripts/local-debug-smoke.sh`.
- Smoke evidence directory: `/private/tmp/browser-scum-run-distribution-smoke-4/smoke`.
- The passing smoke verified `scum-alpha` exposes `generate-run` as available and generated a Windows AMD64 run package without forbidden local-debug fragments.
- `go test ./service -run 'TestCoreService(GeneratesRunDistributionWithEncryptedSingletonKey|RunDistributionRetryReusesPartialArtifact|BuildsClientManagerWithDistinctKeyAndAuditsSensitiveOperations)' -count=1` passed from `platform/`.
- `go test ./api ./service -run 'Test.*(Run|Distribution|Artifact|ClientManager|Runtime)' -count=1` passed from `platform/`.
- `go test ./service -run 'TestCoreService(RunDistributionRetryReusesPartialArtifact|PushRunUpdateReusesExistingUpdateJob|BuildsClientManagerWithDistinctKeyAndAuditsSensitiveOperations)' -count=1` passed from `platform/`.
- Rerun `scripts/check-structure.sh` passed with `structure check passed`.
- Rerun `openspec validate fix-scum-run-distribution-smoke --strict` passed; OpenSpec telemetry flush reported `ENOTFOUND edge.openspec.dev`, which did not affect validation.