Skip to content

docs(list): correct stale phase comments in collect/mod.rs - #4254

Merged
max-sixty merged 1 commit into
mainfrom
nightly/clean-35965590465
Sep 24, 2026
Merged

max-sixty merged 1 commit into
mainfrom
nightly/clean-35965590465

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

The module docstring in src/commands/list/collect/mod.rs is the phase contract that src/commands/list/AGENTS.md points readers at, and three parts of it no longer matched the code. This PR updates those comments only; there is no behavior change.

  • The post-skeleton diagram listed integration_targets() as a spawn inside the rayon::scope. It can't run there: Repository::integration_targets takes the RefSnapshot, so it runs after the scope joins (collect/mod.rs). The diagram also left out the spawn that does run there: the snapshot capture, with prime_upstream_ahead_behind_cache nested inside it. The diagram now shows both, and places integration_targets after the join.
  • The "stale default branch warning" paragraph sat under Post-Skeleton Operations and called the check post-skeleton. The warning is actually computed and emitted before render_skeleton(). The paragraph also said the check reuses the branch list "fetched for --branches". But wt list (DeferredToParallel) always fetches local branches, so an extra for-each-ref only happens on the picker's Resolved path with branches hidden. The paragraph now sits next to fork fix: Remove PATH leak from snapshot tests #5 in the critical-path section and says exactly that.
  • A comment named collect_worktree_progressive and collect_branch_progressive as the place where URL templates get expanded. Neither function exists anymore. Expansion happens in work_items_for_worktree on the main thread, and branch-only rows have no URL, so the comment's "parallelizes the work" claim was dropped too.

These comments had no regression test to add. cargo doc --document-private-items builds cleanly, and the pre-commit hooks pass (fmt, clippy, typos).

The post-skeleton diagram listed integration_targets() inside the rayon
scope, though it needs the ref snapshot and runs after the join; the
snapshot capture that does run there was missing. The stale default
branch warning was described as post-skeleton, though it is emitted
before the skeleton. A comment named two functions that no longer exist
as the site of URL template expansion.
@worktrunk-bot worktrunk-bot added the nightly-cleanup Issues found by nightly code quality sweep label Sep 24, 2026
@max-sixty
max-sixty merged commit f4563a2 into main Sep 24, 2026
37 of 47 checks passed
@max-sixty
max-sixty deleted the nightly/clean-35965590465 branch September 24, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nightly-cleanup Issues found by nightly code quality sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants