Repository navigation
Run flow-next on a flowctl you choose with FLOW_NEXT_FLOWCTL - #571
Merged
Merged
Conversation
A host orchestrator that ships its own flowctl sets FLOWCTL_BIN; the bash launcher execs it before the Python probe, fails loudly on a non-executable value, and ignores a value naming itself. Skill resolution lines are unchanged, so copy-less loading and dirname-relative helpers keep working. Claude-Session: https://claude.ai/code/session_01LbHwMnkD6ovBw6n8cnD8hQ
Same contract as the bash launcher: delegate before the Python probe, fail loudly on a missing file or directory, and run normally when the value names this launcher or its bash twin (paths normalized so forward slashes cannot recurse). Covered by a new step in the windows-latest stub job. Claude-Session: https://claude.ai/code/session_01LbHwMnkD6ovBw6n8cnD8hQ
The pre-checks rejected values the system would run (Git Bash resolves a bare flowctl path to flowctl.exe). Exec with execfail and print the hint only when exec itself fails; a delegated flowctl's exit code passes through. Claude-Session: https://claude.ai/code/session_01LbHwMnkD6ovBw6n8cnD8hQ
FLOWCTL_BIN is documented by an unrelated `flowctl` CLI, so a user who exports it for that tool would have every flow-next call handed to the wrong program. flowctl.cmd now lets cmd.exe resolve the value (PATHEXT) and prints the hint only on 9009. Tests and the Windows CI steps pin that FLOWCTL_BIN changes nothing and cover extensionless, backslash and unrunnable values. Claude-Session: https://claude.ai/code/session_01LbHwMnkD6ovBw6n8cnD8hQ
CI showed a failed CALL sets errorlevel 1, so the 9009 branch never fired. Pre-check the path and its PATHEXT variants instead. Regenerate the Codex docs mirror; let the Git Bash CI step run checks that exit non-zero. Claude-Session: https://claude.ai/code/session_01LbHwMnkD6ovBw6n8cnD8hQ
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.
Why
Anyone who wants flow-next to run on a different flowctl (their own build, a port, a fork under test) had to edit the
FLOWCTL=line in every skill. That breaks make-pr and map, which look for helper scripts beside$FLOWCTL. This PR puts the hand-off in the two bundled launchers instead. Every skill, agent and host already calls one of them.What changes for a user or operator
FLOW_NEXT_FLOWCTL=/path/to/flowctland every call goes there with its arguments, before the launcher looks for Python. The launcher returns that flowctl's exit code..flow/.list --jsoncalls, main took 315.9 ms per call and this branch 315.6 ms.I named it
FLOW_NEXT_FLOWCTLbecause an unrelated CLI also calledflowctl(withObsrvr's) tells its users to setFLOWCTL_BIN.Scope
plugins/flow-next/scripts/flowctl:execundershopt -s execfail, so the OS decides what runs. Git Bash findsflowctl.exefrom a bareflowctlpath. A self check (-ef) covers both a direct path and a symlink.plugins/flow-next/scripts/flowctl.cmd: normalizes the value with%%~fI, skips itself and its bash twin, checks the exact file or aPATHEXTvariant, then runsCALL. A failedCALLsets errorlevel 1, which a real flowctl can also return, so the error message needs this pre-check.plugins/flow-next/tests/test_startup_bootstrap.py: 5 tests:PATH;FLOWCTL_BINignored..github/workflows/test-flow-next.yml: two steps onwindows-latest.flowctl.cmdand Git Bash toflowctl. Each covers a hand-off returning exit 7, an extensionless path, a missing path or directory failing loudly with no.flow/created,FLOWCTL_BINignored, and a self path.plugins/flow-next/docs/flowctl.mdand its Codex mirror: one paragraph.Verification
sync-codex.sh --checkreports the Codex mirror is fresh.FLOWCTLchains:init,spec createandlistwent to it with the variable set and to Python without it. make-pr's and map's helper scripts still resolve beside the launcher.https://claude.ai/code/session_01LbHwMnkD6ovBw6n8cnD8hQ