Skip to content

fix(ci): run the Windows native lane with its process boundary fixture - #2336

Merged
morluto merged 6 commits into
morluto:mainfrom
Rinkia:fix/ci-windows-boundary-fixture
Oct 13, 2026
Merged

morluto merged 6 commits into
morluto:mainfrom
Rinkia:fix/ci-windows-boundary-fixture

Conversation

@Rinkia

@Rinkia Rinkia commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Problem

scripts/verify-windows-native.mjs takes the process boundary executable as process.argv[3] and gates a block of observations on it:

const boundaryFixture = process.argv[3];
if (boundaryFixture !== undefined) { ... }

CI runs the lane as npm run verify:windows-native, which passes no arguments, so that block — and the reparse scenario gated on the same argument earlier in the file — has never executed in CI. These are the observations that never ran:

observation what it covers
processes.breakawayDenied CREATE_BREAKAWAY_FROM_JOB is refused, so an owned child cannot leave the Job Object
processes.childOwnerNormalizedWithoutChangingCaller + callerToken the child's default owner is normalized while the caller's elevation, group membership, integrity level and default owner are unchanged (deepEqual before and after)
processes.windowsEnvironmentSemantics ordinal name sorting, last-duplicate-wins and preserved Unicode names in the child environment
controls.inPlaceAncestorReparseDenied converting an admitted ancestor directory into a reparse point in place is refused

They ran only for an operator who built the fixture by hand, and native/windows/README.md described it as "optional", so there was no signal that CI coverage depended on it.

Change

The fixture is an ordinary Windows executable that reports its own token, environment and breakaway results; it does not link the addon. So the job that already installs g++-mingw-w64-x86-64 to cross-build the artifact cross-builds the fixture too and uploads it, and the Windows job downloads it and passes its path — the same way windows-native-inspection-fixture already crosses that job boundary.

No observation, assertion, threshold or fixture source changes. The only behavioural difference is that four observations stop being silently skipped.

native/windows/README.md no longer calls the fixture optional, says plainly that the lane skips those observations without it, and keeps the manual invocation for local runs.

Validation

Windows 11 Pro 26100 x64, Node v24.16.0, on this branch:

  • actionlint 1.7.7 with -shellcheck= -pyflakes=, the pinned version and flags from the workflows job: clean.

  • Artifact and fixture cross-built from this branch with the documented lane (Linux + MinGW-w64 g++ 12 in a container, since this host has no C++ toolchain). npm run verify:windows-native:artifact → ok: true, SHA-256 1eecd8e6…01219e.

  • The lane run exactly as the workflow now invokes it:

    npm run verify:windows-native -- . <path>\process-boundary.exe
    

    → ok: true, 11 process observations and 20 filesystem controls all true, including the four above, which report true instead of being absent. Confirms the -- argument passthrough reaches process.argv[2]/[3] through npm on Windows.

  • npm run build:cached and node scripts/check-doc-facts.mjs: pass.

Not verified here: the GitHub-hosted runners themselves, so the artifact upload/download hop between the Linux and Windows jobs is exercised for the first time by this PR's own CI run. The uploaded executable loses its POSIX execute bit in transit, which does not matter on Windows, where .exe is launched by extension.

Independent of #2202 and based on current main; if that lands, its caller-affinity observation is picked up by this same wiring with no further change.

🤖 Generated with Claude Code

`verify-windows-native.mjs` takes the boundary executable as its second
argument and skips every observation that needs it when the argument is
absent. CI passed no argument, so the breakaway denial, caller and child
token comparison, Windows environment semantics and in-place ancestor
reparse attempt have never run there; they only ran for an operator who
built the fixture by hand, which `native/windows/README.md` described as
optional.

The fixture is an ordinary Windows executable independent of the addon,
so the lane that already installs MinGW to cross-build the artifact
cross-builds it too and uploads it beside the existing inspection
fixture. The Windows job downloads it and passes its path, matching how
that inspection fixture already crosses the same job boundary.

No observation, assertion or threshold changes; this only stops four of
them from being silently skipped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

@greptileai review

@greptile-apps

greptile-apps Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

This PR is set for a Plus review. TREX isn't supported with Plus or Apex reviews yet, so Greptile reviews this PR at Base while TREX is on.

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking defect was found.

Summary

Both Windows workflows now build, transfer, and pass process-boundary.exe to the native verification script. The README explains which checks require it. ProviderStartupDeadline.remainingMs() now returns zero after its timeout fires, with a regression test for an early timer callback.

  • Windows native runs now include process-boundary checks.
  • A timed-out provider startup deadline reports no time left.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Linux job with MinGW] --> B[Build process-boundary.exe]
  B --> C[Upload fixture artifact]
  C --> D[Windows job downloads fixture]
  D --> E[Pass fixture path to verify-windows-native]
  E --> F[Run previously skipped boundary checks]
Loading

Reviews (5) · Last reviewed commit: "Merge branch 'fix/ci-windows-boundary-fi..." · Reviewed by Greptile

Comment thread native/windows/README.md Resolved
… lane

`real-ghidra-windows.yml` also runs the native lane without the boundary
executable, so its proof run skipped the same breakaway, caller and child
token, environment semantics and ancestor reparse observations. Its
artifact job already installs MinGW, so it cross-builds and uploads the
fixture the same way, and the self-hosted Windows job downloads it and
passes its path.

This makes the README's claim about both Windows workflows true rather
than narrowing it to one lane.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Rinkia

Rinkia commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

All four red checks here are inherited from main, not from this PR. This diff touches two workflow files and native/windows/README.md, and adds no lines under src/ or tests/.

Static checks — jscpd found too many duplicates (3.0%) over threshold (3.0%). Current main alone reproduces it: Duplication: 2368 files, 1481 clones, 3.01% duplicated lines at ded199a, whose own CI run (38362552291) fails Static checks with the identical message. This branch alone measures 2.83%. Already being addressed in #2691.

Test shard (4/6) — src/ida/IdaWorkspaceThinning.test.ts > copies exactly the selected slice when later slices follow it across read boundaries, 1 failed / 1690 passed. The same shard fails on the same test in that main run. Tracked as #2548.

Test (coverage + timing) and CI required are downstream of those two: the first merges the shard reports, the second is the aggregate gate. main's run fails exactly the same four jobs, with the same names.

What this PR's own run does show, which is the part I could not verify locally:

  • Windows capability and package lane: pass (7m56s) — the fixture artifact crosses from the Linux MinGW job to the Windows job and npm run verify:windows-native -- . <path> reaches process.argv[2]/[3] through npm on a hosted runner. The four previously skipped observations now run there.
  • Validate workflows: pass — matches actionlint 1.7.7 locally with the repo's pinned flags.
  • Build bundled Windows x64 native controls, Build package, Docs Generation, Reconstruction readiness, shards 1/2/3/5/6, and all three native package baselines: pass.

Happy to rebase once #2691 lands if a green run is wanted before review.

morluto and others added 4 commits October 13, 2026 20:12
Source-reviewed changes. Tests, builds and check reruns were skipped at maintainer request.
Node timers can fire while performance.now() is still a fraction of a
millisecond short of the monotonic deadline. ProviderStartupDeadline then
reported interruption "timeout" and an aborted signal while remainingMs()
returned ceil(0.x) = 1, so polling loops guarded by remainingMs() > 0
(Hopper and Ghidra startup) could run past an elapsed deadline, and the
real-timer test "aborts a bounded wait when its real monotonic deadline
expires" failed intermittently in CI (expected 1 to be 0).

Once the deadline's own timer has classified a timeout, report zero
remaining time. A deterministic regression test fires the timer with the
monotonic clock 0.4 ms short of the deadline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit dfdaa0c)
…dows-boundary-fixture

# Conflicts:
#	.github/workflows/ci.yml
@morluto
morluto merged commit a3daf8a into morluto:main Oct 13, 2026
4 checks passed
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants