Repository navigation
test(native-accounts): pin the platform for the accepted-work fence test - #7753
Closed
JasonBuildAI wants to merge 1 commit into
Closed
JasonBuildAI wants to merge 1 commit into
JasonBuildAI wants to merge 1 commit into
Conversation
The fence test added in b95e42f calls NativeHost.switch, which returns platform_unavailable outside macOS. The module is collected on every POSIX host, so all six parametrizations failed before restart_guard and the required test-shard lane has been red since the test merged. Pin the mocked host platform to darwin, following the existing client_host fixture in the same module, so Linux exercises the platform-neutral guard and store reader instead of stopping at the platform check. Signed-off-by: JasonBuildAI <jasonbuildai@gmail.com>
JasonBuildAI
requested review from
huangruiteng,
loopx-agent and
songoow
as code owners
October 31, 2026 13:07
Contributor
Author
|
Closing to avoid a duplicate fix: an earlier parallel contribution registered this exact test and defect before this PR was opened. The reproduction and impact evidence remain in #7752. |
Contributor
Author
|
Update: the earlier parallel registration was released without an issue or PR. This PR remains closed because the required lane is also dominated by the 60-minute shard timeout (four of six |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal And Delivered Outcome
Python Tests→test-shardlane fails deterministically onmainbecause the accepted-work fence test is collected on every POSIX host but never pins the macOS-only host platform; all six accepted-work cases stop atHostError("platform_unavailable")instead of exercising the fence. This failstest-shard (1),(3),(4)and(6)across the two completedmainruns at04c5799b8and the earlier26f73056c, so every open PR (55 at report time) inherits a red required lane and a failing merge gate, and the only automated proof that an account handoff refuses to quit a client with accepted work never executes.python3 -m pytest tests/presentation/test_codex_accounts.py -k native_restart -qreports6 failedwithExpected regex: 'waiting_for_idle'/Actual message: 'platform_unavailable'before, and the six cases reachrestart_guardand pass after (hostedtest-shardrow below).loopx-project/loopx:mainat04c5799b8.Author Declaration
AI disclosure: this change was drafted with AI assistance at my request, under my direction and review. The operator set the scope constraints for this submission (one upstream issue and PR, minimal diff, no product behavior change) and reviewed the submitted result.
Implemented against
04c5799b8, plus the module's existingclient_hostfixture convention (monkeypatch.setattr(module.sys, "platform", "darwin")) in the same file.tests/presentation/test_codex_accounts.py::test_native_restart_uses_real_accepted_work_fence_before_app_quitpytest -k native_restartNativeHost.switch→restart_guard→managed_chat_activation_guardgit diff(1 file, +4)NativeHost.switch(platform guard, thenrestart_guard),managed_chat_activation_guard(chat_runtime_activation_lock+chat_runtime_activation_state), and the existingclient_hosttests that pin the same platform on Linux. I verified the six cases fail before the pin and reachrestart_guardafter it; the green assertion is left to the hosted Linux lane because the local Windows host stops one step later at the package's POSIX-onlytrusted_filecheck. Deliberately not changed: the unrelated lane failures named below.Scope And Continuation
tests/test_dashboard_command.pyselecting the host's newestpython3.*interpreter, the UTF-8 guard atloopx/capabilities/benchmark_toolkit/native_codex_process.py:71(open PR fix(benchmark): pin UTF-8 for the native process start identity read #7745), and a Lark long-return projection timeout. It is the same lane-repair class as merged [Bug]: required test-shard is red on main - the shipped dsh-launch command has no manual-visibility classification #7438.Validation
d11b0e500cd03fc58d968c2a9eadff7c3364717cstaticpassedruff checkon the changed file reports the same five pre-existing findings as the untouched base file and no new finding.unitpassedplatform_unavailablebefore, six reachingrestart_guardafter. On this Windows host the package then stops at its POSIX-onlytrusted_filecheck; with that trust check emulated, the same six pass. The real green run is the hosted Linux row.regression_paritypassed04c5799b8with the CI-reported message and no longer stop at the platform check with this head.integrationrunningPython Teststest-shardatd11b0e500; result will be recorded here when the lane finishes.Frontend / Visual Evidence
Type of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
Boundary Checklist
.loopx/,.codex/goals/, and liveACTIVE_GOAL_STATE.md).python3 scripts/check_rfc_bilingual.py --base origin/main --head HEADpasses, or no paired RFC changed.none.Signed-off-bytrailer (git commit -s).