Skip to content

fix: the database precondition frames the update notice - #13

Merged
tension-atoi merged 1 commit into
mainfrom
fix/sync-update-database-precondition
Oct 22, 2026
Merged

tension-atoi merged 1 commit into
mainfrom
fix/sync-update-database-precondition

Conversation

@tension-atoi

Copy link
Copy Markdown
Collaborator

The release gate failed at 15:02 on a tree with zero backend changes since the green run at 13:55. Root cause proven, in six steps, in evidence/runs/gate-network-leak-20261022/:

The gate flipped on the internet, not on the tree. sync_system_update() consulted the CachyOS update notice before its database precondition. The notice is interactive and networked: it fetches iso-stats.cachyos.org live, reads the operator's real ~/.cache/calix cache, and asks a question no test can answer with yes. Green all day while the fetch failed (catch → proceed → sync(true) → SyncDbFailed); red the moment a live notice finally served — the amdgpu / Kernel 7.3.0-2 warning, id 2130f114… — with no saved answer in the cache. The Arch replay never saw it: no CachyOS os-release, the hook never loads.

A scratch probe on the same setup measured the split:

call result
sync(false) SyncDbFailed ✓
sync(true) SyncDbFailed ✓
sync_system_update(.{dbonly=true}) SUCCESS — an empty report, the databases never reached

The fix. The database precondition (alpm_get_syncdbs == null — the same check syncDatabases() applies) is verified before the notice check: a manager that cannot name a sync database cannot update a system, however the notice is answered — on any machine, with or without a network. For a working installation the notice is still asked before any database download, so the original intent holds. install.zig:519 and upgrade.zig:635 now get the failure their caller needs instead of an empty success.

Numbers: 1340 pass / 1 fail → 1341 pass / 0 fail; the full verify roster green — which also unblocks the v0.3.1 tag that this failure was about to cover.

… proves it hermetically

sync_system_update() consulted the CachyOS update notice BEFORE its
database precondition. The notice check is interactive and networked: it
fetches iso-stats.cachyos.org live, reads the operator's real cache, and
asks a question no test can answer with yes. A declined or unanswerable
notice short-circuited the function to an empty success — before any
database check.

The release gate failed at 15:02 on a tree with zero backend changes
since the green run at 13:55. Proven: green all day while the fetch
failed (proceed -> sync(true) -> SyncDbFailed); red the moment the live
notice served — the amdgpu / Kernel 7.3.0-2 warning, id 2130f114 — with
no saved answer in the operator's cache. The gate flipped on the
internet, not on the tree. The Arch replay never saw it: no CachyOS
os-release, no hook.

The fix: the database precondition (alpm_get_syncdbs == null — the same
check syncDatabases applies) is verified before the notice check. A
manager that cannot name a sync database reports SyncDbFailed however
the notice is answered, on any machine, with or without a network. For a
working installation the notice is still asked before any database
download — the original intent holds.

install.zig:519 and upgrade.zig:635 now get the failure their caller
needs: a transaction failure, not an empty success.

1340 pass / 1 fail -> 1341 pass / 0 fail; the full verify roster is
green. Evidence: evidence/runs/gate-network-leak-20261022/
@tension-atoi
tension-atoi merged commit 409ca10 into main Oct 22, 2026
2 checks passed
@tension-atoi
tension-atoi deleted the fix/sync-update-database-precondition branch October 22, 2026 18:50
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.

1 participant