Skip to content

test(ci): keep candidate probe fixtures Windows-safe - #10845

Merged
kodjima33 merged 1 commit into
BasedHardware:mainfrom
tianmind-studio:codex/windows-candidate-probe-fixtures
Jul 29, 2026
Merged

kodjima33 merged 1 commit into
BasedHardware:mainfrom
tianmind-studio:codex/windows-candidate-probe-fixtures

Conversation

@tianmind-studio

@tianmind-studio tianmind-studio commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

What changed and why

Keep the desktop-backend candidate-probe fixtures faithful to the production security boundary on native Windows.

The token helper intentionally requires a regular POSIX mode-0600 file. Windows cannot represent or prove that mode through st_mode, so the permission test now asserts the existing fail-closed result there instead of expecting chmod(0o600) to create POSIX semantics.

The full CLI provenance test now mocks the token-validation boundary and asserts that it receives the requested path. That test remains focused on forwarding candidate revision, image, tag, and workflow provenance instead of depending on host filesystem permission semantics.

Product invariants affected

none

How it was verified

  • Before the fix on native Windows: 12 tests passed, one failed, and one errored.
  • After the fix: all 14 candidate-probe tests passed.
  • Ruff 0.4.4 passed.
  • Pyright 1.1.403 passed with 0 errors and 0 warnings.
  • py_compile and git diff --check passed.

Tests

The mode test still exercises successful mode-0600 reads and rejection of mode 0644 on POSIX. On Windows it verifies that the production reader fails closed. The CLI test independently verifies the token path and all candidate provenance forwarded to the probe.

Failure class (fixes)

Failure-Class: none

Review in cubic

@tianmind-studio

Copy link
Copy Markdown
Contributor Author

Integration follow-up: this was the final blocker in the stacked native-Windows run. After applying this head, desktop-backend-candidate-probe-fixtures passed all 14 cases and the official make preflight completed all 30 selected checks successfully in 223.41s.

@Git-on-my-level

Copy link
Copy Markdown
Member

Thanks for the focused Windows-safe test fix. I reviewed the single .github/scripts/test_desktop_backend_candidate_probe.py change and also ran the candidate-probe unit test file from this head locally on Linux: all 14 tests passed.

This looks like the right direction to me: the token-permission assertion stays fail-closed on Windows, POSIX still exercises the 0600 success/reject path, and the full CLI provenance test now mocks the token-validation boundary while still asserting the token path is passed into it.

Because this touches CI/probe test infrastructure under .github/scripts, I’m not formally approving from automation. A human maintainer should still do the final workflow-sensitive review before merge, but I don’t see a blocker in this diff.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level added workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior needs-maintainer-review Needs a human maintainer to sign off before merge labels Jul 29, 2026

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes candidate-probe fixtures that assumed POSIX mode-0600 semantics on Windows; the production reader's fail-closed behaviour is now asserted there instead of faking chmod. 14 tests pass, green CI.

@kodjima33
kodjima33 merged commit f9243de into BasedHardware:main Jul 29, 2026
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-maintainer-review Needs a human maintainer to sign off before merge workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants