mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-07 10:45:59 -10:00
* fix(desktop): add Windows crash attribution diagnostics Problem: Windows LTSC 2019 abrupt exits could not be attributed reliably, test telemetry could reach production, and Diagnostics counted lifecycle events rather than affected installations. Root cause: legacy startup state was replayable, WebView2 failures were inferred from log text without native process details, and the crash Worker lacked build-, runtime-, and installation-level aggregation. Fix: fail-close Desktop test endpoints, consume legacy state atomically, add lifecycle v2 and native WebView2 Args2/Args3 observation, and extend privacy-bounded telemetry, D1 rollups, Diagnostics filters, and bilingual release runbooks. Verification: go test ./... in root and desktop; focused race tests; Worker typecheck and 86 tests; frontend tests and production build; fresh and migrated SQLite schema validation; Windows amd64 Desktop and vendored WebView2 cross-compilation; git diff --check. * refactor(diagnostics): satisfy owner size budgets Problem: the initial diagnostics implementation exceeded the repository's incremental file and function size budgets in Desktop startup, Worker ingestion, and dashboard rendering owners. Root cause: lifecycle initialization, installation aggregation, and group-detail rendering were added directly to already baselined entry-point files. Fix: move lifecycle setup into its tracker owner, extract diagnostics-v2 storage and query policy, and isolate crash-group rendering without changing wire contracts or runtime behavior. Verification: repolint; Worker typecheck and 86 tests; focused Desktop and repair tests; Windows amd64 Desktop cross-compilation; the unrelated transient updater test passed three consecutive focused reruns. * test(repair): use WaitGroup.Go for claim race Problem: the current PR lint rejected the manual WaitGroup Add/go/Done pattern in the concurrent legacy-state claim regression test. Root cause: the test used the legacy goroutine setup even though the repository modernize rules require sync.WaitGroup.Go. Fix: use WaitGroup.Go while preserving the explicit ready barrier and deterministic interleaving. Verification: go test ./internal/repair; go test -race ./internal/repair; go run ./tools/repolint; git diff --check. * fix(repair): serialize legacy startup claims Problem: Windows CI observed zero reports when concurrent launches tried to consume one dead legacy startup record. Root cause: concurrent pre-claim reads can keep Windows file handles open long enough for every rename attempt to fail. Fix: acquire the existing non-blocking cross-process file lock before reading and atomically renaming the legacy record, so exactly one observer owns the claim path. Verification: 100 concurrent-claim repetitions; 20 race-enabled repetitions; full internal/repair normal and race suites; Windows amd64 test compilation; repolint; git diff --check. * fix(diagnostics): close Windows crash attribution gaps Start lifecycle tracking after the Wails single-instance gate and serialize anonymous install identity creation across concurrent callers. Wait for WebView2 navigation completion before recording renderer recovery, commit crash group/sample/aggregate writes in one D1 batch, and align runtime CLI schema and diagnostics ordering. * fix(diagnostics): address PR review findings Problem: - Renderer recovery could consume an unrelated navigation and recoverable COM errors could terminate the desktop. - Per-install daily rows overwrote WebView2 dimensions, relabeling earlier GPU and runtime events. - The PR exceeded repository size gates and did not execute vendored patch tests in Windows CI. Root cause: - Recovery completion was not correlated with NavigationStarting IDs, and shared fatal error handling was reused. - Mutable dimension columns and event counts lived in the same deduplicated installation row. Fix: - Correlate renderer reloads by navigation ID, keep recovery errors non-fatal, and default failed kind reads to unknown. - Add immutable event-dimension facts for filters and distributions while retaining installation deduplication. - Split diagnostics tests, trim size regressions, and run vendored WebView2 tests in Windows CI. Verification: - go test ./... - targeted Desktop and internal/repair race tests - Worker tests and typecheck - Frontend 146-suite test run - repolint, actionlint, gofmt, and Windows cross-compile * fix(desktop): align raw bundle ratchet Problem: The Desktop CI inherited a main-v2 raw startup bundle size of 2204.8 KiB while the ratchet still allowed only 2203 KiB, so frontend builds stopped before all Desktop checks. Root cause: Recent always-loaded desktop contracts already moved the baseline beyond the old threshold, and this PR adds the required diagnostics privacy attribution copy without materially changing gzip size. Fix: Raise only the raw aggregate allowance to a tightly measured 2205 KiB and document the native diagnostics copy. Keep gzip, CSS, locale, and largest-chunk limits unchanged. Verification: - pnpm build - go run ./tools/repolint - git diff --check * feat(desktop): add cross-platform crash diagnostics Problem: Desktop runtime failures lacked reliable ownership, lifecycle attribution, and affected-install analytics across Windows and Linux. Root cause: legacy startup records could replay, WebView2 diagnostics were platform-specific, and Worker aggregation mixed recovery outcomes into unstable groups. Fix: add fail-open primary ownership and lifecycle v2, generic Web Runtime reports, native WebView2 and WebKitGTK observers, privacy-safe platform dimensions, additive D1 aggregates, and cross-platform Dashboard filters. Verification: go test and race suites, go vet, golangci-lint, Worker typecheck/tests, frontend tests/build/bundle budgets, repolint, actionlint, and Windows amd64 cross-builds. * fix(diagnostics): preserve future lifecycle schemas Problem: A future lifecycle schema that removes v2 PID or phase fields could be treated as an invalid v2 record and pruned after retention. Root cause: The consumer validated v2-specific fields before checking the schema version. Fix: Reject unknown schemas before applying v2 validation or cleanup, and cover an aged future record without current fields. Verification: - cd desktop && go test . -run '^TestDesktopLifecycle' - cd desktop && go test -race . -run '^TestDesktopLifecycle' - git diff --check * fix(diagnostics): correlate WebKit reload events Problem: The native WebKitGTK recovery smoke classified a successful renderer reload as failed and could not reach the cooldown assertion. Root cause: WebKit can emit load-failed for the terminated navigation after web-process-terminated. The recovery state treated every pending load failure as belonging to the new reload. Fix: Track whether the recovery reload has emitted LOAD_STARTED and only accept load-failed and LOAD_FINISHED after that boundary. Reset the marker on every terminal path and extend the source contract test. Verification: GOCACHE=/tmp/reasonix-pr8169-go-cache go test . -run '^(TestWebKit|TestWebRuntime)' git diff --check * fix(diagnostics): defer WebKit recovery reload Problem: WebKitGTK 4.1 still timed out the success recovery smoke after load events were scoped to the recovery navigation. Root cause: Starting webkit_web_view_reload synchronously inside the web-process-terminated signal callback is unreliable while WebKit is still dispatching process teardown. Fix: Schedule the single recovery reload on the GTK main context's idle queue, retain the WebView until dispatch, and guard the helper with the pending recovery owner. Update the source contract test to enforce this deferred abnormal-only path. Verification: GOCACHE=/tmp/reasonix-pr8169-go-cache go test . -run '^(TestWebKit|TestWebRuntime)' git diff --check * test(diagnostics): isolate WebKit smoke scenarios Problem: After the deferred reload made the success smoke pass, the next scenario aborted inside WebKitGTK while constructing another test WebView in the same process. Root cause: The smoke harness repeatedly destroyed and recreated WebViews that share WebKitGTK's process-global default context. That cross-scenario lifecycle does not match the single-WebView Desktop process and leaves asynchronous teardown active between cases. Fix: Run success, failure, timeout, and cooldown scenarios in isolated test subprocesses. Keep the cooldown pair in one child and one WebView so repeated native termination and single-reload behavior remain covered. Verification: GOCACHE=/tmp/reasonix-pr8169-go-cache go test . -run '^(TestWebKit|TestWebRuntime)' git diff --check * test(diagnostics): keep WebKit smoke local Problem: The isolated success and cooldown smoke scenarios still reported reload failure while failure and timeout behaved correctly. Root cause: The test HTML used https://reasonix.invalid as its base URI. Reloading the terminated view attempted to resolve that unreachable URI, so the smoke measured a synthetic network failure instead of native process recovery. Fix: Load the smoke HTML with a NULL base URI, which WebKitGTK maps to local about:blank content and requires no network access. Verification: GOCACHE=/tmp/reasonix-pr8169-go-cache go test . -run '^(TestWebKit|TestWebRuntime)' git diff --check * test(diagnostics): use reloadable WebKit smoke URI Problem: The native success and cooldown scenarios still timed out with load_html content even after removing the unreachable base URI. Root cause: A transient document created by load_html does not provide a stable reloadable resource after its WebProcess is terminated on the tested WebKitGTK runtime. Fix: Load a fully local data URI before terminating the WebProcess. This provides a stable current URI for the same production reload call without adding network or filesystem I/O. Verification: GOCACHE=/tmp/reasonix-pr8169-go-cache go test . -run '^(TestWebKit|TestWebRuntime)' git diff --check * test(diagnostics): allow WebKit process startup Problem: The native smoke used a one-second recovery timeout and classified cold WebProcess startup under Xvfb as a failed reload. Root cause: The smoke-only timeout was substantially shorter than observed headless WebKitGTK process creation, while production correctly allows thirty seconds. Fix: Raise only the tagged smoke timeout to five seconds. Keep the production timeout at thirty seconds and the smoke safety timeout at fifteen seconds. Verification: GOCACHE=/tmp/reasonix-pr8169-go-cache go test . -run '^(TestWebKit|TestWebRuntime)' git diff --check * Automate diagnostics D1 migration before worker deploy Problem: The diagnostics-v2 schema had to be applied manually even though the production Cloudflare credential is available only to Actions. Deploying the new Worker first would make ingestion depend on missing D1 columns and tables. Root cause: The crash Worker workflow validated and deployed code but had no guarded database migration stage. Fix: Add a fail-closed schema inspector that skips a complete migration, applies the SQL only when entirely absent, rejects partial state, records the current D1 Time Travel bookmark, and verifies the final schema. Run it after tests and before Worker deployment. Verification: - npm test (96 tests) - npm run typecheck - node --check scripts/apply-diagnostics-v2.mjs - bash scripts/release-workflows.test.sh - actionlint v1.7.7 - git diff --check * Keep diagnostics copy within locale bundle budget Problem: Merging the latest main-v2 bundle ratchets made the expanded Chinese telemetry disclosure exceed both locale budgets. Root cause: The cross-platform disclosure repeated verbose phrases for the anonymous identifier, runtime fields, abnormal-exit payload, and privacy exclusions. Fix: Compact the Simplified and Traditional Chinese copy while preserving upload timing, diagnostic dimensions, and excluded sensitive data. Keep the existing bundle budgets unchanged. Verification: - cd desktop/frontend && pnpm build - node scripts/check-bundle-budget.mjs - git diff --check
238 B
238 B
Windows 10 LTSC 2019 崩溃调查运行手册(已迁移)
诊断范围现已覆盖所有受支持的 Windows 和 Linux 环境。请使用 跨平台 Desktop 崩溃诊断运行手册。