Repository navigation
Conversation
why: vcspull is a declarative VCS synchronizer with no shell hook or template execution, so interactive directory trust prompts, non-TTY VCSPullError aborts, and mutable $XDG_STATE_HOME/vcspull/trusted state added friction without buying anything structural containment cannot provide (#619). what: - Enforce structural project containment in load_scoped_configs() and project_config_contained(), skipping out-of-directory project files with a one-line warning (suppressed on --json / --ndjson streams) - Remove vcspull trust, --trust-project, VCSPULL_YES, ensure_config_trusted(), and the trusted-directories state file - Report skipped project files in vcspull config ls as (outside directory, skipped) - Add ADR 0002, redirect cli/trust.md to configuration/scopes.md, and update CLI/config docs, MIGRATION, CHANGES, and tests
This was referenced Dec 6, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## fix/600-symlink-user-scopes #621 +/- ##
===============================================================
- Coverage 85.11% 85.09% -0.03%
===============================================================
Files 38 38
Lines 7762 7690 -72
Branches 1599 1589 -10
===============================================================
- Hits 6607 6544 -63
+ Misses 765 760 -5
+ Partials 390 386 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Closes #619
Stacked on #620 (
fix/600-symlink-user-scopes).Summary
--jsonand--ndjsonstreams.vcspull trust,--trust-project,VCSPULL_YES, and the trusted-directories state file.1. Owner and boundary
src/vcspull/_internal/scopes.pyandsrc/vcspull/config.py(load_scoped_configs(),project_config_contained()), CLI flag and subcommand removal acrosssrc/vcspull/cli/, and architecture decision recorddocs/project/adr/0002-structural-project-containment.md.sync/async, CLI/API, single/batch, orN/A): Checkedload_scoped_configs(),known_entries_for_writer(),project_config_contained(),vcspull config ls,list,status,search,sync,worktree,fmt(single-file and--all),migrate(single-file and--all),discover,add(including--aliasattach preflight), andimportacross all six remote services.scopes.pyandconfig.pyown scope resolution and containment policy, while CLI subcommands forwardreport=Falseon machine-readable--jsonand--ndjsonstreams.2. Failure before the fix (
N/Afor docs, lockfile bumps, or pure refactors)<base>commit, or<pre_fix_head>SHA if fixing a defect introduced in this PR):fix/600-symlink-user-scopes(scopes(fix): Deduplicate symlinked user configs #620)vcspull listorvcspull sync --allnon-interactively inside a directory tree containing an out-of-directory.vcspull.yamlaborted the entire command withVCSPullError(exit1) instead of skipping the project file and loading user and contained project configurations, and interactive runs printed unbounded destination prompts backed by mutable$XDG_STATE_HOME/vcspull/trustedstate.3. Verification and tool disclosure
N/A):uv run ruff format --check .,uv run ruff check .,uv run ty check --python-version 3.11 --error-on-warning .,uv run ty check --python-version 3.15 --error-on-warning .,uv run sphinx-build -W -b html docs docs/_build/html,uv run python scripts/runtime_dep_smoketest.py,uv run pytest, and the disposable-worktree production revert check ontests/test_scopes.pyandtests/cli/test_config.py..github/workarounds.tomlupdates (Noneif none):Noneuvandmiseconfiguration models, ran a two-round spike ratchet for Replacevcspull trustwith structural project containment #619, authored ADR 0002 and the containment refactor acrosssrc/,docs/,MIGRATION,CHANGES, andtests/, and ran all verification gates.Design decisions
project.vcspull.*files (escaping_destinations()) rather than interactive prompts and$XDG_STATE_HOME/vcspull/trusted, matchinguv's declarative workspace model; unlikemise,vcspullhas no shellcdhook and executes no templates or scripts from YAML.vcspull trust: truncating the prompt hides most escaping paths while keeping non-TTY exit1failures and persistent directory grants.projectfiles unconditionally: an unchecked.vcspull.yamlinside a cloned repository could target~/.ssh/or displace user entries outside its checkout.system,user(including symlinked dotfiles from scopes(fix): Deduplicate symlinked user configs #620), and explicit-f/--filemanifests unrestricted on disk.Verification
Before:
After:
Zero remaining matches for removed trust symbols across
src/andtests/:$ rg -n "trust_project|VCSPULL_YES|ensure_config_trusted|create_trust_subparser|trust_command" src/ tests/$ rg -n "trust_state_file|read_trusted|trust_directory|untrust_directory|requires_trust" src/ tests/Test plan
load_scoped_configs()skips escaping project files with one warning line while loading user and contained project scopes (tests/test_scopes.py)vcspull list --jsonsuppresses escaping-project skip warnings onstdoutand emits valid JSON (tests/cli/test_config.py)vcspull config lsmarks escaping project files as(outside directory, skipped)(tests/cli/test_config.py)vcspull fmt --all --writeskips escaping project files anddiscover --yesrefuses to modify an escaping project file without-f(tests/cli/test_config.py)vcspull trustand--trust-projectspellings exit2(tests/cli/test_config.py)src/andtests/sphinx-build -W) including ADR 0002 andcli/trust.htmlredirect