Repository navigation
[pull] main from Tencent:main - #80
Merged
Merged
Conversation
…on only on change (#871) (#874) * fix(update): leave an npm link checkout alone instead of replacing it with the registry package When the running CLI is not under node_modules (an npm link checkout), resolveInstallPrefix returns null and doUpdate ran a prefix-less npm install -g. That lands in npm's default global prefix, where npm link put its symlink, so the next hook run swapped the checkout for the published package. Skip the install and say how to update instead. * fix(hooks): report OMP, OpenCode and Pi hook injection only when the file changes These injectors rewrote their file and logged success on every pull, so an up-to-date pull listed them as injected while Claude and Codex, which already compare before writing, printed nothing. Use writeIfChanged and log at debug level when the file is current. * fix(update): refuse an unsupported install before prompting, and keep the skip in debug.log Review follow-ups: resolve the install target before the prompt policy so nobody confirms an update that is then skipped; persist the skip warning because hooks discard stderr; word it for every null target, not only a link; tell the user to pull before rebuilding; pass --registry in the suggested install command. * fix(hooks): report Hermes and OpenClaw hook injection only when something changes Both are reached by the pull reconcile and still logged success on every run. OpenClaw now writes its two files with writeIfChanged; Hermes also reports whether its config.yaml entry and allowlist were written. * fix(update): persist the vendored-install skip to debug.log too Adversarial review follow-up: the Stop hook discards stderr, so the vendored-layout refusal left no trace while the linked-checkout refusal next to it is persisted.
…misused-promises (#836) (#863) * ci(lint): enable type-aware linting with no-floating-promises and no-misused-promises tsc does not report a promise nobody awaits or an async callback handed to an API that ignores its result. In a CLI that is an error nobody sees. oxlint's --type-aware mode checks both through oxlint-tsgolint. - package.json: add oxlint-tsgolint 7.0.2003 (oxlint 1.85.0 needs >=7.0.2001) and pass --type-aware to `npm run lint`. The package ships prebuilt binaries as optional dependencies with no install script, so CI's `npm ci --ignore-scripts` needs no change. - .oxlintrc.json: turn on typescript/no-floating-promises and typescript/no-misused-promises. Under src/__tests__/**, no-misused-promises skips checksVoidReturn.arguments: vi.spyOn(fse, ...) types the spy from fs-extra's last overload, the callback one that returns void, so every correct async mockImplementation is flagged. - --type-aware also turns on oxlint's default type-aware rules. The ones with hits on main stay off, since each is its own evaluation under #836. The rest of the defaults have no hits and stay on. Fixes, all behavior-neutral: - dashboard.ts: the SSE debounce and the PID check become named async functions called with `void`; both already catch everything they throw. The HTTP handler becomes handleRequest, and createServer catches its rejection, logs it and answers 500. - import-repo-list.ts: track in-flight imports in a Set, so the unused array splice returned is gone. - scripts/mock-teamai-server.mjs: same handler wrapper as the dashboard, so a malformed JSON body answers 500 instead of an unhandled rejection. - ai-client.test.ts: schedule the mock process events with queueMicrotask. Refs #836. * ci(lint): turn on typescript/no-useless-default-assignment 1 prod hit, type-only: syncTeamUpdatesToLocal's last parameter was `placedRules: Record<string, string> | undefined = undefined`; it is now `placedRules?: Record<string, string>`. Refs #836. * ci(lint): list only the type-aware rules that would otherwise run as off consistent-return, no-unnecessary-boolean-literal-compare, no-unnecessary-type-arguments, no-unnecessary-type-assertion, no-unnecessary-type-conversion, no-unnecessary-type-parameters and no-unsafe-type-assertion are not default rules, so listing them as off changed nothing. The config keeps off only the nine default type-aware rules that --type-aware would turn on. `oxlint --type-aware --print-config` gives the same set of active rules before and after. Refs #836.
* fix(env): make doctor and uninstall act on their own scope's env block (#876) A shell profile can carry a user-scope block and a project-scope block, but doctor, uninstall and the active-profile resolver only ever read the first `# [teamai:env:start]` pair. Doctor in a project then blamed the #661 backslash for the user scope's block, uninstall's plan missed a second block of its own, and its cleanup step removed the first block whatever scope it belonged to. Add findEnvBlocks/findEnvBlockFor, which pick a block by the env.sh it sources (the ownership test uninstall already used), and use them in all three consumers. With only another scope's block present, doctor now says the profile carries no block for this env.sh. The ownership test also accepts the all-backslash spelling of the path, so a #661 block of this scope keeps its diagnosis. The marker format and how pull writes the profile are unchanged. * fix(env): keep the user scope's env block when a project pulls (#876) Each pull replaced the first `# [teamai:env:start]` block in the shell profile, whichever scope it belonged to, so a member with a user and a project scope got only the last-pulled scope's env in new shells. Injection now picks the block by the env.sh it sources. A scope replaces its own block. Otherwise a project takes over another project's block, never the user scope's (recognised by the env.sh the user-scope config resolves to), and a user scope goes in right before the project block. The user block therefore precedes the project block, so a project value wins on a shared key, and the project block stays last-wins. Other blocks are left alone; the marker format and the skip-when-unchanged write are unchanged. * fix(env): address #876 review findings on env block ownership - Drop the all-backslash spelling from candidateSpellings; the #661 doctor tests now use a Windows-form data home instead. - envBlockReferencesDataHome requires a path boundary before a raw spelling, so /home/me/.teamai/env.sh no longer claims a block that sources /data/home/me/.teamai/env.sh. - resolveActiveShellProfile falls back to the first file along the sourcing chain that holds any teamai block when none holds this scope's, so a first user pull or a second project pull on the Git Bash chain lands next to the existing block instead of after the .bashrc source line. - injectShellProfile uses one "user scope's block" predicate for both scopes; a block that sources no env.sh (pre-env.sh inline exports) is the user scope's, so a project pull no longer takes it over. - Tests build well-formed blocks with EnvHandler.generateShellBlock. Refs #876 * fix(env): match an env.sh path only up to its end (#876) * fix(env): keep the user block when the user config does not parse (#876)
…unborn HEAD (#897) A busy event loop stretched the usage rewrite wait past its 5s budget because the wait counted sleeps. Bound it by wall time. The viz fixture also cloned a bare repo whose HEAD stayed on master under git 2.39, so worktree add failed with "invalid reference: HEAD". Co-authored-by: Cursor <[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 : )