Repository navigation
fix: publish teamwiki after codebase --deep-enrich in team repo - #1560
Conversation
When deep enrichment writes into the team clone, take the import lock and push the generated evidence docs plus router/index updates via autoPushTeamRepo, matching codebase --reconcile and import. Also point incomplete deep-enrich retry messages at teamai codebase --deep-enrich --project <slug> for team-repo imports. Fixes Tencent#1537 Co-authored-by: hstealth <Hstealth@users.noreply.github.com>
Use shellArg(slug) for team-repo retry commands and drop the unused importArgs parameter from failIncompleteDeepEnrich. Co-authored-by: hstealth <Hstealth@users.noreply.github.com>
|
No findings in the specified PR diff. The description includes sufficient real-CLI verification: generated graph docs reached Review was read-only; no PR code was run, built, or installed. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Approving at d8820c4. This closes #1537. In a team repo, codebase --deep-enrich now takes the teamwiki lock and publishes what it wrote, as --reconcile already does.
What I checked
- The publish list covers every path deep enrich writes: the project's evidence directory (docs and
_review/progress.json), plusteamwiki/router.mdandteamwiki/index.md.pushRepoDirectlydrops paths that do not exist beforegit add, so a wiki with noindex.mddoes not fail. cacheDir, the one argument the import passes and this command does not, is never read indeep-enrich.ts. Pointing the retry hint atcodebase --deep-enrichinstead of a full re-import loses nothing, now that the command publishes.- The new team-repo test fails on main's
codebase-cmd.ts(expected false to be true) and passes at the head. npm run build,npx tsc --noEmitandnpm run lintpass.npx vitest run codebase-deep-enrich import-dir import-repo-list codebase-reconcile commands-reference: 88 passed.- Real CLI with the built head: isolated HOME, a local bare remote and a stub
claudethat fails.teamai import --dir "./my svc"exits 1 and printsRun `teamai codebase --deep-enrich --project 'my svc'` to retry.- I left an uncommitted
teamwiki/product/login.mdin the clone, then ran that printed command as-is. It exits 1 (AI docs missing, as expected) and prints✔ Pushed to team knowledge repo. The remote gets[teamai] Deep enrich: my svcwith the graph docs,router.mdandprogress.json. - The member's product page stays out of that commit and uncommitted in the clone.
- The branch merges cleanly into current main (2ee2087), and no file overlaps.
CI review: no findings. I agree.
Note, not blocking: if main moves during a long deep-enrich run, the push is rejected and the error says to run teamai pull and rerun. That matches --reconcile and import, so it is not a change in this PR.
…ent#1560) In a team repo, `teamai codebase --deep-enrich --project <slug>` now takes the teamwiki lock and publishes what it wrote (the project's evidence directory, `teamwiki/router.md` and `teamwiki/index.md`), as `--reconcile` and `import` do, so the clone is left clean and the next `teamai push` no longer fails. `--output` and `--dry-run` do not publish. An incomplete deep enrich after a team-repo import now suggests `teamai codebase --deep-enrich --project <slug>` (slug shell-quoted) instead of re-running the import. Fixes Tencent#1537.
Problem
Fixes #1537.
In a team repo (no
--output),teamai codebase --deep-enrich --project <slug>wrote deep-enrich artifacts into the local team clone, printed success, and exited 0 without committing or pushing. The clone stayed dirty (teamwiki/router.md, new files underteamwiki/evidence/code/...), and a laterteamai pushfailed with uncommitted teamwiki changes.Fix
Follow the same pattern as
teamai codebase --reconcileandteamai import:deepEnrichfinishes writing, callautoPushTeamRepowith the project evidence directory plusteamwiki/router.mdandteamwiki/index.md(the paths deep enrich updates).Pushed to team knowledge repo (...)when a commit is pushed.--outputand--dry-runbehavior is unchanged (no publish).Incomplete deep-enrich retry hints for team-repo imports now recommend
teamai codebase --deep-enrich --project <slug>(withshellArgquoting when the slug contains shell metacharacters) instead of re-running the full import.Tests
src/__tests__/codebase-deep-enrich.test.tsfor team-repo publish (remote receives graph docs, clone clean) and dry-run (no publish).import-dir.test.tsandimport-repo-list.test.ts.Verification
Real CLI (isolated
HOME, local bare remote,kind: gitmember config):Result: exit code 1 (AI docs missing without a tool on PATH, as expected),
✔ Pushed to team knowledge repo (...),git -C <team-clone> status --shortempty, andteamwiki/evidence/code/svc/docs/graph-g1-relations.mdpresent onorigin/main.