Preserve correction formatting and make setup failures actionable

Merged
EL
8d ago
+623-84

What Changed and Why

Issue: Corrections could discard rich formatting, freeze editable web-chip labels, or fail without enough clipboard/HTTP diagnostics. Production migration and unavailable updates also lacked actionable behavior.

Why this change was necessary: The recorded formatting failure still reproduced on current main, and laptop logs showed repeated clipboard-backup aborts. Existing protection and mapping paths can address these without a new subsystem.

New status quo: Preserve unchanged rich fragments; use bounded verified mapping for unfamiliar producers; expose only uniquely matched web-chip labels while protecting destinations and sensitive labels. Retain partial HTTP timings, identify clipboard backup failures, and use one truthful correction phase. Reconcile enabled startup targets, retain updater initialization errors, focus missing key inputs, and provide a checksum-verified installer/readiness command. Update checkout/upload-artifact/setup-dotnet to supported majors.

Verification

  • Dev and Prod test suites pass; both Clippy modes pass; formatting passes.
  • Frozen request budgets were regenerated with no value changes.
  • Exact October 23 formatting replay now retains its original rich fragment. Browser contenteditable DOM insertion retained bold text and the exact href; this is not native hotkey/paste acceptance.
  • Installer parser/read-only execution and mocked missing-key, stale-startup and missing-digest cases pass.
  • Both local baseline latency attempts aborted before any trials because foreground acquisition failed. No speed result or passing native acceptance is claimed.
  • Original ChatGPT composer, real installation/upgrade, updater initialization failure and release packaging remain unverified. Screenshot capture reported no browser frames.

Open calls

Draft until native editor/performance and installed-app acceptance can run. The laptop is reachable but its interactive console is active; it was not interrupted.

Refs #5, #13, #15, #18, #36. Clipboard diagnostics are an investigation step, not a claimed producer root-cause fix. Warmup work (#22) remains deferred. No Production release, instruction-file edits, or changes to the primary checkout.

Summary by Sourcery

Preserve correction fidelity while making installation, startup, update, clipboard, and network failures explicit and actionable.

New Features:

  • Add a checksum-verified production installer and JSON readiness/inventory command with optional bounded correction verification.

Bug Fixes:

  • Preserve rich formatting for unchanged selections and safely handle unfamiliar or ambiguous link-chip mappings without dropping corrected text.
  • Retain partial HTTP timing diagnostics and provide actionable clipboard-backup failure details.
  • Surface startup registration, updater initialization, unavailable-update, and missing API-key failures with actionable status and notifications.

Enhancements:

  • Reconcile enabled Production startup targets while preventing Dev and standalone builds from registering login startup.
  • Expose editable labels only for uniquely verified web-link chips while protecting destinations and sensitive labels.
  • Use a single truthful correction phase and improve API-key form focus and save feedback.

Build:

  • Update checkout, upload-artifact, and setup-dotnet GitHub Actions to supported major versions.

CI:

  • Ensure the performance workflow creates the base worktree before restoring its cache.

Documentation:

  • Document installation verification, correction probing, startup behavior, rich-formatting handling, and diagnostic semantics.

Tests:

  • Add coverage for verified web-chip label handling and terminal HTTP failures with partial timings.

Summary by cubic

Preserves rich formatting in corrections and makes setup, startup, and update failures explicit and actionable.

  • Unchanged selections paste their original HTML fragment; unfamiliar editors use the verified mapper only when it returns exactly the corrected text.
  • Only uniquely matched web-link chips expose their editable labels; destinations and secret-bearing labels stay fully protected. A rejected chip projection pastes the complete corrected Unicode text without HTML, so protected links are never dropped.
  • Terminal HTTP failures retain the phase timings that ran, and clipboard backup failures report format, Win32 error, and owner PID.
  • Launch retargets an existing enabled Production startup entry without overriding an opt-out; standalone and Dev builds never register login startup, and registration requires a valid installed manifest. Setup and startup reconciliations are time-bounded and reconciliation errors are reported.
  • Updater initialization errors are surfaced, unavailable updates notify instead of silently skipping, and installed apps retry initialization on later triggers.
  • Adds a checksum-verified installer and read-only readiness report (scripts/install-production.ps1). Silent install launches the managed app and waits up to ten seconds for it to appear; the startup and data identifiers are derived from channel.rs. The optional correction probe requires exactly one verified run via the published 0.13.4 command or the newer benchmark. Readiness requires PID/start-time log evidence queried per process start date, accepts only events already occurring as of the current time, and updater evidence must fall within the verified process lifetime; without Python the inventory stays explicit but incomplete. The dashboard focuses missing API-key fields and confirms saves.
  • CI and release actions move to current supported majors, and the perf job creates the base worktree before restoring cache so a cache hit no longer aborts the comparison.

Refs #5, #13, #15, #18, #36. Native editor/installed-app acceptance remains unverified.