Repository navigation
Conversation
The heartbeat-receipt retry hint appended a literal
`--turn-instance-id "${LOOPX_TURN:?}"`. PowerShell has no `${name:?}`
expansion, so a native Windows host received an empty Turn and the retry could
not settle the receipt it was told to repair.
`turn_instance_arg()` now owns that rendering next to the settlement binding
arguments that already follow the host, so both name `$LOOPX_TURN` on native
Windows and keep the POSIX form byte-identical. A concrete Turn still passes
through unchanged.
Signed-off-by: ChengLong GU <88359731+gcl-coder@users.noreply.github.com>
gcl-coder
requested review from
huangruiteng,
loopx-agent and
songoow
as code owners
November 2, 2026 02:23
This branch has not been deployed
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.
Summary
interaction_contractbuilds the heartbeat-receipt retry action a host runs whena
heartbeat_receiptis missing orwrite_failed. It appended a literal--turn-instance-id "${LOOPX_TURN:?}".#7823 made the settlement-plan owner render the Turn reference for the shell
that actually runs it. The retry hint is a separate owner and kept the
POSIX-only literal, so a native Windows host still receives an empty Turn there
and the retry cannot repair the receipt it was asked to repair.
Change
turn_instance_arg()inloopx/control_plane/quota/effect_program.pyowns therendering:
$LOOPX_TURNon native Windows,"${LOOPX_TURN:?}"on POSIX, and aconcrete Turn passed through unchanged.
settlement_binding_args()now builds its Turn argument through the samehelper, so the rule has one owner instead of a second copy. Its POSIX output
stays byte-identical to the previous implementation.
Tests
tests/control_plane/test_turn_instance_arg.py(new, 6 cases): the hostdefault on both shells, a concrete Turn on both shells, a POSIX reference seen
on Windows, and the reference the real running host produces.
asserts the complete action string on each.
windows-powershelllane, so the nativeos.name == "nt"default is qualified on a real Windows runner rather thanonly through a patched host flag.
Notes
$LOOPX_TURNreaches the CLIempty and is rejected by the existing Turn validation, exactly as an unset
LOOPX_TURNdoes on POSIX.loopx/control_plane/scheduler/hint_followup.tsstill falls back to the POSIXliteral; it needs host information the current request does not carry, so it
is deliberately left out of this change.