Skip to content

fix(agent): handle Windows installer permission semantics and retain failure diagnostics - #1322

Merged
AnthonyRonning merged 1 commit into
masterfrom
codex-wininst-maple
Oct 27, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
codex-wininst-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Windows installer preflight rejects safe temporary files/directories because it treats OWNER RIGHTS as an independent foreign writer. It also treats the directory-only FILE_DELETE_CHILD bit inherited by NSIS checker files as file modification authority. Both checks can stop installation before any destination files are created.

Resolve an OWNER RIGHTS allow ACE only after validating the same handle's actual owner against the existing user/SYSTEM/Administrators allowlist. Classify that handle before applying mutation rights, retaining the full directory mask and every actual file mutation right. Native regressions cover the exact Python and NSIS ACLs plus owner and foreign-writer rejection controls. Authenticode, publisher/timestamp, path, reparse and hardlink policies remain intact.

Installer diagnostics now distinguish NSIS phases, capture bounded read-only checker output, and preserve isolated fixture presence/type evidence before cleanup. Cleanup errors retain the original failure. No automatic installer retry is added.

Validation:

  • Windows run 40517348347: 83 updater library tests + 5 bootstrap tests passed, zero failures/ignored/filtered, including all five ACL regression/control cases.
  • Exact attested, signed build-738 Dev and Prod packages reproduced the old helper's foreign-write-ace refusal. The current production preflight API passed against both checker copies under the original Python ACL and the NSIS ACL: four successful calls, with no destination changes. This verifies native admission, not a complete signed installation or upgrade.
  • 38 focused packaging tests, 5 workflow contract tests, pinned formatting, and final root Nix flake checks passed.

The temporary historical diagnostic workflow/scripts/example were removed after preserving their logs, inventories and hashes. The final cleanup commit uses [skip ci] to avoid repeating tests for unchanged production code; full application CI/hooks were intentionally waived. Existing producer failures remain failures. Fresh master-signed NSIS installation and A-to-B upgrade qualification remain necessary after an approved merge. This PR performs no merge, release or Windows feed enablement.

@AnthonyRonning
AnthonyRonning force-pushed the codex-wininst-maple branch 3 times, most recently from d6d773a to 3d12eed Compare October 27, 2026 14:02
@AnthonyRonning AnthonyRonning changed the title fix(agent): handle NSIS file ACLs and expose Windows install failures fix(agent): handle Windows installer permission semantics and retain failure diagnostics Oct 27, 2026
@AnthonyRonning
AnthonyRonning marked this pull request as ready for review October 27, 2026 14:12
@AnthonyRonning
AnthonyRonning merged commit f79bbe0 into master Oct 27, 2026
@AnthonyRonning
AnthonyRonning deleted the codex-wininst-maple branch October 27, 2026 15:10
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