fix(push): honor explicit branches and protect dirty team clones - #690
Conversation
|
Findings
|
A real incident for the
|
|
Please resolve the conflicts and P1 findings. |
|
Hi @dvd233 — still on this? Conflicts + the two P1s are the only blockers left. Happy to take it over if you're busy. |
|
Hi @jeff-r2026 — I picked this back up and pushed the closeout as Resolved:
Verification:
|
|
Findings
Resolved
|
|
Hi @jeff-r2026 — thanks for the follow-up. I pushed commit The remaining findings are addressed:
Local verification for this follow-up:
The remote checks should rerun against |
|
Update for accuracy: #690 was merged as The previous statement that checks would rerun against |
Summary
Fixes #663.
teamai push --branch <name>for new resource and team-config pushes.teamai.yamlchange to the explicit new branch.reset --hard/clean -fd; abort with sorted unsafe paths when user changes are present while preserving only restorable TeamAI-owned changes.teamai.yamlchanges as unsafe; content-only changes are restorable only after their content is captured.Type of Change
Test Plan
npm run typechecknpm run buildTargeted unit verification:
npx vitest run src/__tests__/push-role.test.ts src/__tests__/push-pending-pr.test.ts --reporter=dot— 108 passedReal CLI E2E verification:
npx vitest run --config vitest.e2e.config.ts src/__tests__/push-role-skill-e2e.test.ts --reporter=verbose— 20 passed--branchresource pushes, config-only pushes, existing open-PR branch reuse, mixed existing-PR plus explicit-new-branch routing, and dirty-clone protection for mode-only and content-plus-modeteamai.yamlchanges.The earlier full
npm testrun on the Windows host recorded 4,401 passed, 106 failed, 8 skipped. The failures are concentrated in platform-sensitive tests covering symlink privileges, POSIX-only path expectations, Unix file modes, and npm PATH resolution; the focused push unit tests and the real CLI E2E suite above pass after this follow-up patch. The full suite was not re-run for this follow-up because the failures are environment-limited.Related Issues
Fixes #663
Notes for Reviewers
The explicit branch applies to newly created push groups; an existing open PR's recorded branch remains authoritative. If both kinds of group are present, the pending config change follows the new explicit branch; if there is no new group, it remains with the existing PR. TeamAI-owned config changes remain supported when their content is captured and its mode is unchanged, while deleted, mode-only, content-plus-mode, or unrelated dirty-clone paths must be committed or stashed before pushing. The branch was merged with the current
upstream/mainin the previous closeout commit to resolve the PR conflicts.