knowledge: uv remove exact-syncs and deletes undeclared packages (uv add does not) — 1 ingested, 2 dropped as dups of #51 - #62
Open
choiyounggi wants to merge 1 commit into
Conversation
This was referenced Aug 7, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Knowledge flush — 3 candidate(s): 1 ingested, 2 dropped
Verified best-practice
1. A dependency command that resyncs the environment deletes undeclared packages —
confidence: verifiedCandidate as harvested: "run
uv add/uv removeonly after background jobsfinish; register dev tools like pytest/ruff in a dependency-group instead of
uv pip install, so they survive a sync."Sources checked (live this session):
uv syncperforms 'exact'syncing by default, which means it will remove any packages that are not present
in the lockfile";
--inexactretains them; "uv runuses 'inexact' syncing bydefault, ensuring that all required packages are installed but not removing
extraneous packages."
[dependency-groups]; "thedevgroup is synced by default."uv add: "The lockfile and projectenvironment will be updated to reflect the added dependencies."
How it was verified — local reproduction, uv 0.11.5 (aarch64-apple-darwin),
throwaway project:
packaging, then installediniconfigad-hoc withuv pip install(undeclared, absent from
uv.lock).uv add typing-extensions→iniconfigsurvived.uv remove packaging→iniconfigdeleted along with the intended package.Repeated a second time with the same result.
uv remove packaging --no-sync→iniconfigpreserved.uv {add,remove,sync,run} --help: onlyuv syncexposes--inexact, onlyuv runexposes--exact;uv addanduv removeexposeneither.
uv remove --no-sync: "Avoid syncing the virtual environment afterre-locking the project."
iniconfigbefore the resync kept running and still resolved the cached module, while a
later
import tomli_win that same process raisedModuleNotFoundError.Correction applied to the candidate. The candidate treats
uv addanduv removeas symmetric ("uv add/remove re-syncs the whole environment"). Thereproduction refutes that:
addis inexact and harmless to undeclared packages,removeis exact and has no--inexactescape hatch. The ingested page carriesthe measured per-command exactness table rather than the symmetric claim, so the
"wait for the job" directive is scoped to the commands that actually prune.
2 & 3. Dropped — see Open-PR check
No independent verification was performed on the two orchestration candidates
because both are pending duplicates; neither is being promoted to a page here.
Existing-layer check
Routed via
INDEX.md→platforms("toolchain version pinning", "backgroundservices") rather than the harvested
infrastructurehint, whose seeded scope isCI/CD, containers, rollout, observability, path-valued config and multi-agent
orchestration — none of which covers a local package manager mutating a project
virtualenv. Then read the
platformsdomain index and every toolchains/processespage whose "load when" line overlaps.
Pages read: platforms-toolchains-version-management, platforms-toolchains-compiler-sysroot-on-macos, platforms-processes-background-services, infrastructure-agent-orchestration-pane-delivery-confirmation, infrastructure-agent-orchestration-worktree-isolated-workers
Overlaps found.
platforms-toolchains-version-managementwas the only mergedpage mentioning uv at all (
uv sync --frozen,.python-version). Its trigger isversion drift across machines and its directives are about pinning and
committing lockfiles — it never covers a sync deleting packages, nor the timing
hazard of mutating dependencies mid-run. Different trigger → new page, not a
merge (a merge would have forced two cases onto one page, against the one-case
rule).
Conflicts flagged: none. Nothing in the merged wiki asserts the opposite
behavior;
version-management's "install from lockfiles (npm ci,uv sync --frozen)" line is consistent with the new page and is not modified.Created:
wiki/platforms/toolchains/environment-resync-removes-undeclared-packages.md(63 body lines, within the 120 limit; positive-guidance form; the two prohibitions
appear only as paired
Instead ofrows).Related links added, both ways:
platforms-toolchains-version-management↔ new page (lockfile/reproducibilityadjacency), and
platforms-processes-background-services↔ new page (the timinghazard is against a job running in the background).
Plumbing:
wiki/platforms/index.mdtoolchains table gains a routing row;log.mdgains the dated ingest entry.Open-PR check
Listed with
gh pr list --repo choiyounggi/dev-loop --state open --search "head:knowledge/"—10 open heads: #61, #58, #57, #56, #55, #52, #51, #50, #49, #47. Each head was
fetched and diffed against
origin/mainunderwiki/.wiki/diffs foruv (add|remove|sync|pip)andsite-packagesreturned 0 hits on all 10worktree_escapeguardrail escalates read-only cross-worktree accessinfrastructure-agent-orchestration-worktree-isolated-workersalready carries this case, and its local reproduction is more accurate than the candidate: reads alone (grep,awk,cat,git -C … status) pass; the escalation fires only when a main-root mention survives the strip and a write verb or absolute-path redirect also matchesruntime_unavailablevsagent_unconfigured,--terminalwith--worktree)infrastructure-agent-orchestration-pane-delivery-confirmationcarries the idle-prompt-before-binding rule and the three-stage field observation verbatimBoth dropped candidates are recurring re-emissions, not un-retired rows: they
already appear in
~/.dev-loop/queue/.processed.jsonl15× and 10× respectively,and PRs #56, #57 and #58 each recorded dropping the same pair as in-flight
duplicates of #51. They will keep re-entering the queue from live orchestration
sessions until #51 merges; retiring them again here is correct and cheap.
Routing decision
platforms/toolchains/environment-resync-removes-undeclared-packages(new page)toolchainsalready owns package/version tooling behavior (version-management,compiler-sysroot-on-macos). The harvestedinfrastructurehint was re-routed:infrastructure's seeded scope is pipelines, containers, rollout, observability and orchestration, none of which covers a local package manager pruning a project virtualenv.worktree_escapeguardrail read-vs-writeinfrastructure/agent-orchestration/worktree-isolated-workersin open PR #51infrastructure/agent-orchestration/pane-delivery-confirmationin open PR #51