Repository navigation
fix(updates): recover requested downloads and report durable app-update outcomes - #970
Merged
Merged
Conversation
…ested runtime changes Managed runtime downloads failed after ten minutes while bytes still arrived, showed zero progress while resuming, and a user's install, update or repair that failed transiently or was cut off by a restart stayed failed until clicked again. Failed lifecycle events carried no download diagnostics, and every lifecycle event carried failureClass. - No overall transfer deadline for any managed runtime download; the 30-second stall bound, cancellation, size limits, digest checks and resume stay. Applies to provider runtimes and the compute uv/Ark downloads that share the downloader. - Progress starts from the kept prefix on every try and retry wait; the progress filter (now shared with Codex) reports a reset to zero. - Durable recovery of user-requested runtime changes: the runtime manager records the reviewed plan per runtime and settles it on the outcome. A serialized loop retries it in the background at a jittered 5 min, 30 min, 2 h, then every 4 h, after revalidating that the instance is enabled and still offers the same plan. Success, cancel, remove, disable or another user change clears it. Retryability is typed: exhausted 408/429/5xx and lost connections retry; 501, certificate, checksum, disk and permission failures do not. Scient Agent's own provisioning is unchanged. - Download facts are captured after every failed try: source kind (scient_mirror/github/vendor), variant, inner tries, progress, active-transfer throughput, network kind (stall split from transport timeouts) and why a compressed copy was given up. The operation contract only gains optional fields, so older clients still decode it; a stall keeps failureClass "timeout" on the wire and analytics reports "stalled". - failureClass only on provider.lifecycle.failed, in both the mapper and the contract normalizer; conformance fixture regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Record one app.update.outcome per check, download, install and apply attempt and app.update.summary at launch, on status changes and daily, both Essential with closed values. Facts wait in a bounded persisted desktop journal and travel on the desktopUpdateStatus pipe to one backend, which queues them with their own ids and times and acknowledges only after the outbox holds them. Nothing is kept while analytics is off. The four-hour update poller survives an unexpected failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A signed Windows app pins its publisher: electron-updater installs a later
update only if the installer's signer CN matches publisherName in the installed
app-update.yml. An unsigned or differently signed release would then fail every
pinned client's update, on Stable and on Beta (clients switch channels).
- Build: the Windows signing attestation records the configured publisher
(AZURE_TRUSTED_SIGNING_PUBLISHER_NAME) when signed.
- Native Windows verifier: a signed installer must be Valid, signed by that CN,
and the packaged app-update.yml must pin exactly that name; an unsigned build
must pin none.
- Handoff: records windows { signed, publisherName } for later gates.
- Publication gate: reads the newest published Stable and Beta handoffs; if
either pins a publisher, the candidate must be signed by it and
allow_unsigned_windows (including Beta's automatic exception) cannot override.
Older handoffs carry no record and pin nothing, so today's unsigned releases
keep working until the first signed one ships.
No job is added or renamed, so no required-check names change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…untime events Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
This PR changes the test suite by +45 test cases (browser 0, unit +28, server +17). Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing. |
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
yaacovcorcos
marked this pull request as ready for review
November 16, 2026 22:58
Brings in #988 (consent and deletion layer removed) and #992 (T3 through e9a1e86). Desktop update facts now follow the same rule as the rest of analytics: kept and sent unless SCIENT_ANALYTICS_ENABLED is false or a managed policy denies telemetry. Replaying recorded events moves off T3's AnalyticsService (now byte-identical to upstream) onto a Scient-owned ScientRecordedAnalyticsIngest reference provided by ScientAnalytics.layer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SCIENT_ANALYTICS_ENABLEDis false or a managed policy denies telemetry; when off, nothing is recorded or replayed (including installer handoff with no ready backend) and an earlier journal is deleted.Merged with main after #988 and #992
SCIENT_ANALYTICS_ENABLEDand managed policy, like every other event, and replayed events carry the same constantconsent_levelasrecord.ScientRecordedAnalyticsIngestreference is provided byScientAnalytics.layernext toScientAnalyticsAvailability; its default (no Scient analytics composed) settles facts as never sent.server.scient.test.tsasserts the composed server provides the real one.Dependencies and rollout boundaries
Verification
Separately exercised groups; counts are not additive:
6bcdd01428supplies the read token/candidate handoff and runs the real signing helper against synthetic public handoffs, including rejection when a new pin blocks an unsigned candidate. Both focused publication files passed 16 tests; the final rehearsal rerun passed 7 tests. Existing promotion/ownership/corrupt-upload assertions remain intact. CI on that head passed all 59 executed checks, with 13 skipped and no pending or failed checks.Review and qualification limits
Codex reviewed the first-principles design and implementation; all reported source defects are closed. Final independent approvals cover mirror publication guards, updater privacy/signing/apply attribution, stacked feed composition, and recovery admission/journal isolation at
9e09eca3b1. The last reviewer independently reran all 71 recovery tests. The subsequent fixture-only correction is green in CI at6bcdd01428. This PR is ready for review; no merge or release is requested.Local runtime evidence is macOS arm64 with synthetic providers/files. Real-provider transfers, packaged native update application on macOS/Windows/Linux, and Windows Authenticode execution remain unqualified here. Journal restart and actual worker/SQLite persistence are tested separately; a single full transport scenario covering disconnect, lost ACK and queue pressure has not been exercised. The nonfatal listener warning was traced by review to overlapping Effect NodeTerminal test layers, not an unbounded downloader listener path.
Documentation impact
Updated existing provider lifecycle, product analytics, managed-update/release/Beta documentation and fork seam notes. The UI change is the pending-recovery cancellation control; Chromium evidence is described above. No new documentation page.
Checklist
6bcdd01428(59 passed, 13 skipped)