Skip to content

[pull] main from Tencent:main - #81

Merged
pull[bot] merged 2 commits into
Walternater:mainfrom
Tencent:main
Sep 29, 2026
Merged

pull[bot] merged 2 commits into
Walternater:mainfrom
Tencent:main

Conversation

@pull

@pull pull Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

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 : )

Smilewithoutfalling and others added 2 commits September 29, 2026 16:17
…tes nothing (#896)

`--dry-run` promises no changes made. On a fresh self-mode clone one write still
gets through: an empty `<home>/.teamai/locks/` is created and left behind. It is
only the directory, not a lock file, but it is a real filesystem change and the
suite can see it -- `dry-run-load-path.test.ts` declares it as a tolerated entry
for `pull` today, which is the honest way of saying the preview is not clean.

The mechanism is already on main: #866 gave `acquireLock` an `options.dryRun` that
reads the lock state instead of taking it, and `pull.ts:1873`, `push.ts:784` and
`push.ts:839` pass it. The queue lock does not:

  learnings-publish.ts:75  syncLock === null || await acquireLock(syncLock)   <- not passed
  learnings-publish.ts:93  listPendingForInstall(localConfig)                 <- not passed
  pending-learnings.ts:77  withQueueLock(...) -> acquireQueueLock(home)       <- not passed
  pending-learnings.ts:66  if (await acquireLock(lockPath))                   <- takes the real lock

`pull` counts the queue so it can report how many learnings it would publish, and
counting takes the queue lock, because the queue owns it. Taking that lock is a
write: `acquireLock` ensures the lock parent (`update.ts:404`) and `releaseLock`
removes the lock FILE but not that directory (`update.ts:464`), so the directory
outlives the command.

This threads the flag down. Three signatures gain an optional `{ dryRun?: boolean }
= {}` and forward it; existing callers (`migrate.ts:413`, `migrate.ts:891`, and the
`withQueueLock` inside `savePendingLearning`) send `{ dryRun: undefined }` and are
unchanged.

`readPendingForInstall` deliberately does not get the parameter: its only caller is
behind `if (locked && !dryRun)` (`learnings-publish.ts:94`), so a preview never
reaches it.

The test gets stricter -- `pull`'s allowed list goes from `[PULL_LOCK_DIR]` to `[]`.
`snapshotTree` records directories as `"<rel>/" = 'dir'`, so an empty directory is
counted; that is why the entry had to be written at all.

Verification:
- before: `vitest run src/__tests__/dry-run-load-path.test.ts` -> 22 passed
- after: same -> 22 passed, with `pull`'s allowed list empty
- mutation: reverting `acquireLock(lockPath, options)` to `acquireLock(lockPath)`
  turns the case red and names the cause, "appeared": ["home\\.teamai\\locks/"]
- no collateral: `lock-atomic` 22/22, `pull-post-checks` 13/13,
  `pull-placement-reconcile` 2/2; `tsc --noEmit` rc=0 and
  `oxlint --deny-warnings` rc=0
- the locally-failing files (`pending-learnings`, `git-kind-learnings`,
  `checkout-refusal-silent`) fail identically on the unmodified base: POSIX path
  assertions on Windows and EBUSY from git-worktree fixtures in workers
…ing it (#822) (#865)

* fix(pull): keep a skill, rule or agent you edited instead of overwriting it (#822)

Pull records the sha256 of the bytes it writes at each skill, rule and
agent destination in the checkout's record (`delivered`), and the
pre-push sync records its writes too. On a full sync, a copy that no
longer matches the record is kept and named, with a warning when the
team version moved since; push repeats that warning. Tombstone cleanup
and the rules sweep keep an edited copy the same way. `--force` keeps
edits, `--dry-run` prints `Would keep`, and `doctor` does not fail on a
kept copy. Without a record (first pull on this version, a new
worktree) pull overwrites as before.

* fix(rules): drop a copy the rules reclaim removes from the delivered record (#822)

#815 removes an unedited copy of a team rule when none reaches the
directory, but the pull's delivered record kept its hash. Forget it there,
as the stale-rule sweep does, so the record matches what is on disk.
@pull pull Bot locked and limited conversation to collaborators Sep 29, 2026
@pull pull Bot added the ⤵️ pull label Sep 29, 2026
@pull
pull Bot merged commit 417e704 into Walternater:main Sep 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants