Skip to content

(4/8) fix(setup): atomic policy writes, unique preinstall temps, cheap status polls - #144

Merged
dizys merged 4 commits into
dizys:mainfrom
0libote:fix/setup-harness-robustness
Nov 15, 2026
Merged

dizys merged 4 commits into
dizys:mainfrom
0libote:fix/setup-harness-robustness

Conversation

@0libote

@0libote 0libote commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Auto-update policy and preinstall records now use unique temporary files and atomic replacement, so overlapping writes or an interrupted write cannot leave torn JSON that silently disables schedules or repeats installs.

Status polling reads current local installation, lifecycle and native connection settings. Expensive authentication probes are cached for 15 minutes, refreshed after Setup mutations, and made due when an installation or credential source changes locally. A warm cache no longer hides a switch between T3 Code's own Codex connection and its managed CLI sign-in.

Cached sign-in verdicts stay tied to the same executable, version and credential surface. An inconclusive probe for a new installation cannot reuse the old installation's signed-in verdict. Slow local reads retain the last known snapshot with a stale flag and diagnostics, within the existing request budget.

Validation:

  • The combined eight-PR source suite passed all 2,010 tests.
  • The final probe-cache invalidation follow-up passed all 194 focused cache, HTTP sign-in, manager, provider integration and Setup tests.
  • 39 changed JavaScript files passed syntax checks; combined merges and git diff --check are clean.
  • New HTTP regressions reproduce the CI ownership failure on the old head, and catch sign-in verdicts crossing executable changes. Unit cases cover fresh native settings and versions, removed agents, unchanged auth-probe cadence, and bounded failed local reads.
  • Fresh native and image CI is required on the updated head before merge.

Original reliability and polling improvements contributed by @0libote; maintainer review fixes preserve fresh local facts between authentication checks.

…us polls

Policy and update-state writes now go through a unique temp file plus
rename, so a power loss or concurrent POSTs from two tabs can never
leave a torn file that the catch-all reader turns into defaults
(silently disabling schedules). Preinstall records get the same
random-suffix plus wx treatment, so overlapping writers no longer
interleave JSON and trigger redundant reinstalls. The harness status()
read defaults to cheap (no CLI probes); authenticated verdicts refresh
in the background on a 15-minute TTL and after mutations.
@0libote

0libote commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Fourth (4 of 8), after #148, #145, #146. Checked against the stack, no conflicts.

@0libote 0libote changed the title fix(setup): atomic policy writes, unique preinstall temps, cheap status polls (4/8) fix(setup): atomic policy writes, unique preinstall temps, cheap status polls Nov 14, 2026
@dizys
dizys merged commit cb03380 into dizys:main Nov 15, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants