Repository navigation
Conversation
0551216 to
b74ee6f
Compare
The PR description documents sufficient testing, including representative Windows real-CLI runs and a post-build macOS CLI run. The older-head Windows record is not blocking under the review rules. Review was read-only; nothing from the PR was run, built, or installed. |
|
Fixed in b96d2ce. The last spread or |
The earlier spread-override finding is resolved: later spreads and non-computed overrides are rejected, with fixture coverage. The PR description documents sufficient testing, including Windows real-CLI runs and a post-build macOS CLI run. The older-head Windows record is not blocking under the trusted review rules. Review was read-only; nothing from the PR was run, built, or installed. |
|
Fixed in the latest commit. A computed key now counts like a spread: it may name |
|
No new findings in the scoped diff.
Review was read-only; nothing from the PR was run, built, or installed. |
59b79a4 to
e2f435f
Compare
|
No new findings in the scoped diff.
Review was read-only; nothing from the PR was run, built, or installed. |
{ windowsHide: true, ...options } passed the rule while options could set it back to false. The last spread or windowsHide property now decides.
{ windowsHide: true, ['windowsHide']: false } passed the rule. A computed key may name windowsHide, so it now counts like a spread, and it never stands in for windowsHide: true.
…n place on a failed e2e setup Tencent#1777 added a spawnSync('ps') without windowsHide, which the new teamai/windows-hide rule rejects once this branch sits on main. Case (b) of the Windows lifetime e2e moved ~/.teamai aside before its setup, outside the try/finally that restores it. Move it aside last.
…rebase The hook fast path's background child, the clean-filter hash-object in team history, and the insteadOf lookup in session sync now pass windowsHide: true, as teamai/windows-hide requires.
e2f435f to
6645313
Compare
|
No new findings in the scoped diff.
Review was read-only; nothing from the PR was run, built, or installed. |
|
No new findings in the scoped diff.
Review was read-only; nothing from the PR was run, built, or installed. |
|
Data point from a Windows 11 host for this PR (teamai-cli 0.29.0, Windows Terminal 1.24 as the default terminal), since the triage of #1747 noted that no Windows host was available:
|
|
@SaulMoro I resolved the three conflicts with git switch test/windows-background-lifetime
git fetch https://github.com/STiFLeR7/teamai-cli.git qa/1775-merge
git merge --ff-only FETCH_HEAD
git push origin test/windows-background-lifetimeTypecheck, Oxlint, 160 focused tests, and two isolated Windows subprocess end-to-end tests passed on the merge. The WMI-success case still needs the disposable CI runner. |
@STiFLeR7 thanks, I took your merge as is: @wstczyw thanks for the data point, it matches what this PR fixes. |
|
No new findings in the scoped diff.
Review was read-only; nothing from the PR was run, built, or installed. |
# Conflicts: # src/team-scripts.ts
|
No new findings in the scoped diff.
Review was read-only; nothing from the PR was run, built, or installed. |
Summary
#1761 dropped
detachedon Windows from the five spawns whose child must outlive its parent. Without it, libuv puts a Windows child in a kill-on-close job the parent holds, so the child ends when the parent exits: theworkflow resumea session start's pull begins dies with the--bg-onlypass, and its run staysrunning. This putsdetached: trueback at those five sites and keeps #1761's headless conhost for the WMI launch, which is what hides the background pass.It also closes #1763: a
teamai/windows-hiderule fails anode:child_processcall in production source (src/, outsidesrc/__tests__/) whose options object literal does not setwindowsHide: true, and the 56 calls it found onmainnow set it,whereOnWindowsinsrc/utils/cli-path.tsamong them. The rule follows the module through named, namespace and default imports,await import(),requireandpromisify.Options built elsewhere are reported rather than trusted: the call site spreads them into a literal that sets the option (
{ ...options, windowsHide: true }). A variable can be built far from the call, so only a literal keeps the option checkable at the call; a shared helper would be one more hop for the same line. No call needs a visible window, so nothing is suppressed.simple-gitstays out of scope, as the issue says.Type of Change
Test Plan
New
src/__tests__/e2e/background-lifetime-windows.test.ts, run as the last step of thewindowsCI job, drives the built CLI on the runner:--bg-onlypass started by a parent that stays alive reaches its prePull script under a temp path that is a file.teamai-finished-sessionsrun the--bg-onlypass starts holds on a gate until every--bg-onlyprocess is gone, then succeeds.On the Windows runner, the head before rebasing onto a docs-only commit (same code):
Without the fix, (b) failed on every run: the run stayed
runningand noworkflow resumeprocess was alive.For #1763, after
npm run build, a session start through the real CLI on macOS, with a user-scope install of a local team repo, in a git repository with no remote, reaches the fixedgit remote get-url origincall inmr-hint.ts:whereOnWindowsruns only on Windows; thewindowsjob'sproviders-cli-cmdstep calls it there.npm run typecheckandnpm run lintpassnpx vitest runpasses (22720 tests), andnpx vitest run oxlint-plugin-teamaipasses (639, 18 of them the new rule'sruleHarnessfixtures)Related Issues
Fixes a regression from #1761. Closes #1763. Related to #1747. #1805 was fixed by #1845.
Notes for Reviewers
detachedalso sets DETACHED_PROCESS, which cancels CREATE_NO_WINDOW, so a console program that the resume, the runner or the git-hook pull starts (git, an AI tool) may open a window again. The--bg-onlypass itself still launches hidden through WMI. Keeping that work finishing came first; hiding its descendants is a follow-up.conhost --headlessthe way the WMI launch does was tried and does not work: a detached conhost never starts its child.~/.teamaiin the runner's own profile, because a WMI-created process does not inherit the caller's environment. It runs only underGITHUB_ACTIONS, sets aside a~/.teamaileft by earlier steps and restores it, and stays the last step of the job.