6.9 KiB
6.9 KiB
Task: Fix Makelore updater diagnostics and release checks
Identity
- Task ID: 20260813-makelore-updater-client-7d3a9c
- Mode: Feature
- Branch: main
- Worktree: D:\Datas\OthersProjects\makelore
- Base commit:
a03043d048 - Owner: codex
- Status: Ready for integration
Scope
- Correlate the packaged Windows updater failure with the Works Square stable feed and current platform/architecture resolution.
- Normalize the known missing stable-feed failure into a concise actionable renderer-facing message while retaining raw diagnostic logging.
- Add focused updater regression coverage without changing download, install, channel, or credential ownership behavior.
- Remove the duplicate renderer presentation shown by the installed
v1.0.0settings screenshot and keep raw stack diagnostics out of the ordinary user surface while retaining them in Main-process logs.
Intent And Constraints
- Electron Main remains the sole owner of update feed selection and electron-updater integration.
- A missing stable updater artifact remains an error/release-readiness problem; it must not be mislabeled as "already latest".
- Unexpected errors must retain their original messages, and no installer-role or cross-architecture fallback may be introduced.
- Production recovery requires a separately published updater artifact; client messaging alone does not repair the update chain.
- The currently installed
v1.0.0is evidence of the old packaged behavior; source changes do not affect it until a new client is built and installed.
Outcome
- Confirmed the packaged Windows client resolves the supported stable target to
https://square.nianxx.cn/api/app-updates/windows/x64and that its local log contains the reportedlatest.ymlHttpError: 404. The corresponding public feed currently returns the intentional server-side not-available response. - Added a narrow renderer-facing normalization for missing Works Square stable
manifests on both Windows (
latest.yml) and macOS (latest-mac.yml). The concise Chinese message identifies an unpublished platform package and points to retry/website download without misreporting the client as up to date. - Raw errors remain logged, emitted, and rethrown; updater status remains
error; prerelease OSS feeds and unrelated errors are unchanged. - Confirmed the screenshot's duplicated output came from one Zustand
errorvalue rendered both in the status row and a second error-details card. The settings page now renders one concise message, hides technical stacks and URLs behind the existing generic failure copy, and keeps the retry action. - De-duplicated the Main-process
errorevent plus rejected-promise path by per-invocation check tokens. Concurrent callers sharing one electron-updater error now produce one renderer error status, while raw logging/rethrow and later independent retries remain intact. - Hardened the settings boundary so only concise Chinese user-facing prose is shown directly. Raw English diagnostics, stacks, URLs, paths, error codes and structured payloads fall back to the localized generic failure message.
- Confirmed the installed
v1.0.0app.asarpredates these source changes. Built an isolated unsignedv2.0.0win-unpackedartifact under the user's temporary directory without replacing the installed application or the repository's existingrelease/output. - No release was published. Current evidence shows website installer
0.9.2, installed client1.0.0, source version2.0.0, and unsigned local Windows artifacts, so production recovery still requires release-owner action.
Verification
- Regression tests were observed red before each Windows/macOS normalization change and green afterward.
pnpm exec vitest run tests/unit/app-updater.test.ts tests/unit/update-settings.test.tsx tests/unit/update-store.test.ts tests/unit/sidebar-update-button.test.tsx: initially30 passedacross four files; the final rerun after review fixes is recorded below.pnpm exec eslint electron/main/updater.ts src/components/settings/UpdateSettings.tsx tests/unit/app-updater.test.ts tests/unit/update-settings.test.tsx: exit0, no findings.pnpm run typecheck: exit0.pnpm run build:vite: exit0; the production Main bundle contains the normalized Chinese message.- Isolated
electron-builder --dirpackaging: exit0; extractedapp.asarreports version2.0.0, contains the Main normalization and renderer sanitizer, and no longer contains theupdates.errorDetailsrender key. pnpm test: updater-related tests pass, but the full suite remains red with three failures outside the changed updater scope: missing.opencode/agentinyouth-plain-language-skill.test.ts, plus twoopencode-manager.test.tstiming/generation failures. Focused reruns reproduced the missing-directory failure and one generation failure; no base-commit run was performed, so they are recorded without attributing their origin to this task.- Read-only Authenticode checks report
NotSignedfor the available local Windows artifacts, including the isolated artifact; none were installed or uploaded. - Initial independent read-only review: FAIL with two medium findings covering concurrent duplicate suppression and denylist-only renderer sanitization. Both findings were corrected with focused regression tests before final review.
- Final focused rerun after those corrections: 4 files / 37 tests passed;
typecheck, scoped ESLint,
build:vite,git diff --check, andcheck_doc_drift.py --task-id 20260813-makelore-updater-client-7d3a9call passed. - Final independent read-only review: PASS with no remaining implementation, architecture, or test-coverage finding.
Follow-ups
- Align the authoritative release version, generate final signed/notarized platform artifacts, publish them to Works Square as updater-role records, and execute discover/download/restart/install smoke tests from older packages.
- Add a release job that publishes signed stable outputs to Works Square rather than only the legacy OSS channel, with inactive-first verification and an explicit activation policy.
- Harden the stable Windows signing job by verifying Authenticode status and expected publisher after SignPath. Enabling publisher pinning in new clients requires a staged rollout after the stable feed always serves signed packages.
- Repair the missing
.opencode/agentfixture and independently diagnose the two existing opencode-manager concurrency failures before treating the full test suite as a release gate.
Promotion Candidates
- After live proof, promote the stable-feed error behavior and release pipeline requirements to canonical updater/release documentation; keep the external release gate open until then.
- Consider promoting the UI contract that ordinary updater errors are concise, non-duplicated, and free of raw stack/URL details; technical diagnostics stay in Main logs.