Repository navigation
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aab45db628
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Ran it, and found the one place the gate's guarantee is unassertedWindows 11 build 26300.9974: out/pe-env/Scripts/python.exe -I tests/startup_debug_launch_concurrent_check.py
Ran 3 tests in 0.000s
OK exit 0Mutations to
Why the survivor matters, with the traceDriving the gate directly with two threads stepping the same address: The mutated gate releases every suspended thread the moment the first stepper finishes, while the second is still stepping over Suggested assertion, in the same styledef test_no_thread_is_resumed_while_another_still_steps(self):
resumed = []
gate = StepGate(lambda tid: True, resumed.append, lambda: [1, 2, 3])
gate.begin(1, 0xA0)
gate.begin(2, 0xA0)
resumed.clear()
self.assertIsNone(gate.finish(1))
self.assertEqual(resumed, []) # the whole point of the gate
self.assertEqual(gate.finish(2), 0xA0)
self.assertTrue(resumed) # and they do come back afterwardsThe second half matters too: a gate that never resumes would pass the first assertion alone. What the rest of the design gets right
ScopeThe Windows half (hooked launch, VerdictReviewed. Four rules, three pinned; the missing one is the gate's own guarantee. Notes
|
The startup launcher restored the patched byte for a single step, so a second thread entering the same function in that window was never traced. Other threads are now suspended for the step, the byte is patched again only after the last stepper finishes, and overlapping hits are counted in the log.
f8dd917 to
fef6bef
Compare
|
@ChazY11 thank you, the survivor mutation was a real gap in the gate's own guarantee. Added in b559ad5: Commands executed locally:
AI-assisted; commands listed were executed locally. |
R0Y00
left a comment
There was a problem hiding this comment.
The exact Python suite passes, but StepGate.begin() still enters the stepping state when suspension of a known live peer fails. I reproduced this with two live IDs and a suspend callback returning false. The original byte is already restored by the time the caller enters the gate, and the caller then continues the debug event. That retains the trace gap this PR is meant to eliminate. Please make gate acquisition all-or-nothing before opening the byte, roll back successfully held peers when another suspension fails, and cover the failure with a deterministic fake. Also verify the real overlapping launch on Windows with a source-built child, including both simultaneous calls observed and cleanup.
|
Thanks, all points addressed in abadcfb.
AI-assisted; commands listed were executed locally. |
|
@R0Y00 the changes you requested are addressed on the current head AI-assisted; commands listed were executed locally. |
|
Closing this PR for now so we can focus on the test-speed work. The branch stays as it is, and review comments here remain valid. We will reopen it later, bring it up to date with AI-assisted; commands listed were executed locally. |
# Conflicts: # .github/workflows/windows.yml
|
Merged Verification:
Overlap with #1408: both change the same step-over region of Source: Microsoft Learn, Win32 debugging API ( AI-assisted; commands listed were executed locally. |
|
Independent Stage-2 gate of head ff733ed: PASS. Checked:
Verification (Win2025, proxmox only, head ff733ed plus that overlap run registered as an extra CTest):
Not covered by this PR's own tests: the real-thread overlap above is not in the PR (its test uses fake threads); #1408 has the real-thread test, so whichever of the two merges first should keep that fixture (the two PRs rewrite the same step-over region of AI-assisted; commands listed were executed locally. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Closing as superseded by #1408, which fixes the same problem (concurrent hook hits while a hook steps over its byte, #1281) and covers every case this PR's check covers:
Compared at #1408 head Source: Microsoft Learn, Win32 debugging API ( AI-assisted; commands listed were executed locally. |
Keeps R0Y00#2786 (slot 57 mesh buffer reads). R0Y00#1951 duplicates R0Y00#1408, which tester-loop already carries: debug_launch.py keeps R0Y00#1408's hold-and-step (hook_window StepWindow); R0Y00#1951's step_gate.py, its check and its CI line are dropped.
Part of #1281
What this unblocks: the launcher keeps concurrent hits on a hooked function, so file tracing, the offline socket deny and the
-MapDriverewrite no longer miss overlapping calls.Verification:
python3 -I tests/startup_debug_launch_concurrent_check.py-> Ran 3 tests, OK (Linux worker).python3 -I -m py_compile tools/startup/debug_launch.py tools/startup/step_gate.py-> ok.startup_map_drive_overlapon Win2025 (no Windows host on this worker). Please run before merge.Change: new
tools/startup/step_gate.pysuspends the other live threads while one steps over a restored hook byte, re-patches only after the last stepper finishes, and the launcher logs how many overlapping hits it held.AI-assisted; commands listed were executed locally.