Repository navigation
[pull] main from Tencent:main - #73
Merged
Merged
Conversation
* fix(pull): report hooks and MCP entry warnings on a dry run `pull --dry-run` returned before the hooks and MCP reconcile stages, so the warnings those stages raise never reached the maintainer who ran the dry run to see exactly them: an unknown entry id, a per-entry `roles:` key, a hooks.yaml that does not parse. A dry run must resolve and warn, then skip the write (#822, item 3). MCP already had the capability — `McpReconcileOptions.dryRun` gates every write in mcp-reconcile.ts and `teamai mcp inject --dry-run` uses it — so `reconcileMcpAllScopes` only forwards it. Hooks had no dry-run path at all, so `reconcileTeamHooksForConfig` gained one: it resolves the entries, reports what it found, and stops before the first write. `resolveTeamHooks` takes a `preview` flag so the transparency line reads "Would apply N team hook(s)" instead of claiming they were applied. The tests drive `pull()` rather than the reconcile functions, the way pull-env-shape-warning.test.ts does: the defect was in the orchestration layer, so that is where it has to be pinned. They cover the dry-run warning, the zero writes, the unchanged real-pull behavior, and the dryRun forwarding. * fix(pull): preview-word the MCP dry-run summary and update the design doc Review follow-up: with dryRun forwarded, the MCP summary still read as a completed apply — "N change(s) ... Restart your AI tool session to load them" after a run that wrote nothing. A dry run now reads "Would make N change(s)" and omits the restart instruction; a real pull keeps the applied wording. docs/designs/multi-project-management.md still said `pull --dry-run` prints no hooks or MCP warnings; it now describes the resolve-and-warn behavior this PR ships. The new tests pin the wording on each side of the dry-run boundary: the dry-run case failed on the previous commit, the real-pull case passed. * fix(pull): preview-word the hooks debug trail on a dry run The [scope] "Reconciled N team hook(s)" debug line still claimed a reconcile after a run that wrote nothing. It now reads "Would apply N team hook(s)" on a dry run and keeps "Reconciled" on a real pull; both wordings are pinned by the dry-run tests. * fix(hooks): report the Pi skip on a dry run, like a real reconcile does The per-entry `tools: [pi]` case: a real pull warns "Pi supports built-in lifecycle hooks only; skipping N custom team hook(s)" during the per-tool pass, but the dry run returned before that pass, so its "Would apply" line promised hooks no tool will run. Extract the Pi report from the loop so both paths print the same warning — the dry run gated on the same toolPaths and agent filters the real pass uses — and pin it with a test that is RED without the fix. --------- Co-authored-by: ydflow <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )