Skip to content

Record Unity global debug flags - #1019

Merged
Eli Pinkerton (wallstop) merged 1 commit into
mainfrom
codex/native-loader-flag-evidence
Oct 16, 2026
Merged

Eli Pinkerton (wallstop) merged 1 commit into
mainfrom
codex/native-loader-flag-evidence

Conversation

@wallstop

@wallstop Eli Pinkerton (wallstop) commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

DISCLOSURE: LLM-GENERATED TEXT

Why: Native crash investigation lacks the runner's global debug flag settings.

What:

  • Record read-only registry snapshots in runner diagnostics and capture receipts.
  • Observe effective target flags at the existing debugger exit breakpoint.
  • Test flag parsing and document capture limits.

Refs #343, #637, #794


Note

Low Risk
Changes are read-only registry reads and extra diagnostic logging; they do not modify registry, test gates, or production Unity execution paths.

Overview
Adds read-only observation of Windows GlobalFlag registry settings so native crash investigations can see whether loader-snaps and related global debug flags are configured on the runner.

A shared native-global-flags.ps1 library reads 64-bit LocalMachine values for Unity.exe (Image File Execution Options) and system (Session Manager), classifying each as observed/absent/unavailable/invalid and reporting the loader-snaps bit only when a numeric value is actually read—never inferring “off” from missing data.

Self-hosted runner diagnostics emit a JSON snapshot on every Unity job. Opt-in native fault capture stores the same snapshot in the capture receipt and extends the existing CDB exit breakpoint with !gflag so effective target flags are logged at shutdown. Control tests cover parsing edge cases and wiring; the runbook documents limits (registry-only scope, diagnostic evidence only, truncated debugger console).

Reviewed by Cursor Bugbot for commit 071e9f3. Bugbot is set up for automated code reviews on this repo. Configure here.

Loader tracing appeared in the native capture while the direct Unity target exited C0000005 and the debugged target exited zero. Record registry settings separately from effective target flags so the next investigation can test that lead.

Read only the 64-bit local-machine Unity.exe and system GlobalFlag values. Preserve absent, unavailable and invalid observations. Run !gflag at the existing exit breakpoint without changing flags. Clarify static dispatch scope and console retention in the runbook.

Validation: 46 native capture controls pass. Both changed-file preflight modes, YAML lint, documentation links, Markdown lint, full spelling and strict MkDocs pass. Two-pass review found no unresolved findings. Real Windows native controls preserve zero exit and C0000005 with a second-chance dump using the extended debugger command and all twelve verified tool files. The read-only Windows snapshot records Unity absent and system zero; effective debugged control flags are 00000070. No registry values were changed. Actual CI runner settings and the Unity fault cause remain unverified.

Refs #343, #637, #794. Native evidence: #343 (comment)
@wallstop
Eli Pinkerton (wallstop) added this pull request to stack #1021 October 16, 2026 22:16
@wallstop
Eli Pinkerton (wallstop) merged commit 0039738 into main Oct 16, 2026
28 checks passed
@wallstop
Eli Pinkerton (wallstop) deleted the codex/native-loader-flag-evidence branch October 16, 2026 22:17
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