carson 4.1.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f0dff052fa48cda5c1c0819ff109a9e93c70579c3e450d8af3e82bb55140b54
4
- data.tar.gz: b2543300a607dccd88aaa3286e3c37b34cb4e847a30b3fb202ee76cc223125fb
3
+ metadata.gz: d709f0737b7411687d882b100598ae5d86bef2cf05cc39b493e567c03e687aa4
4
+ data.tar.gz: 968d6124cc0406f21f44ce6430e4635954f8aecb77bca53ff7d1d111cce2dbe3
5
5
  SHA512:
6
- metadata.gz: c0b1853fe814ad941a983d4d0676eb1912ec818b3387b3d74ab61241cb413bea296a797b6bb2f7fbbca8b30f978fc6df203a27a1879727bd753c3a615efdf8ec
7
- data.tar.gz: 3a51ccae965f6f0008123396c0347a3758c8ad28fac60ceabf8a058bb44538afd2988155b9ec895fe0419f0ddf82279c5f86517f2626dec5dfe96b2375877153
6
+ metadata.gz: fae3226c3f11a5fb7a7269d086a8c1f1dfc2bbd5e4ca71b2823663891189fb1bc8a8da3eb67dd93a6462f20857f3ead10c4cd456efd618eb830b650b75b92f44
7
+ data.tar.gz: 67bf606c7221408e585145f2e37452e260ed417de8016c7f0f776b70218db821cd4c9ba7ef564cf2d689336fe989d7a2bcceb22b0be492d3f6a4a649b85a8906
data/RELEASE.md CHANGED
@@ -7,6 +7,12 @@ Release-note scope rule:
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 4.1.1
11
+
12
+ ### Fixed
13
+
14
+ - **`carson refresh` blocked by active worktrees** (#492) — `portfolio_repo_safety` counted active worktrees and blocked template application when any existed. Template apply writes to `.github/` in the main working tree only; template propagate creates its own `/tmp/` worktree. Neither interacts with agent worktrees. Speculative guard removed; uncommitted-changes check retained.
15
+
10
16
  ## 4.1.0
11
17
 
12
18
  ### Breaking
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.1.0
1
+ 4.1.1
@@ -311,8 +311,8 @@ module Carson
311
311
  end
312
312
 
313
313
  # Refreshes hooks only for a governed repo using a scoped Runtime.
314
- # Used when the full refresh is blocked by active worktrees or uncommitted
315
- # changes — hooks write to ~/.carson/hooks/ and do not touch the working tree.
314
+ # Used when the full refresh is blocked by uncommitted changes
315
+ # hooks write to ~/.carson/hooks/ and do not touch the working tree.
316
316
  def refresh_hooks_single_repo( repo_path: )
317
317
  scoped_runtime = build_scoped_runtime( repo_path: repo_path )
318
318
  scoped_runtime.refresh_hooks!
@@ -330,8 +330,12 @@ module Carson
330
330
 
331
331
  # Checks whether a governed repo is safe for batch operations.
332
332
  # Returns { safe: true/false, reasons: [...] }.
333
- # Safe means: no active worktrees beyond main, no uncommitted changes.
333
+ # Safe means: no uncommitted changes in the main working tree.
334
334
  # Non-git directories pass through as safe — let the command handle the error.
335
+ #
336
+ # Active worktrees are NOT checked. Template apply writes to .github/ in the
337
+ # main working tree only; template propagate creates its own /tmp/ worktree.
338
+ # Neither interacts with agent worktrees.
335
339
  def portfolio_repo_safety( repo_path: )
336
340
  git = Adapters::Git.new( repo_root: repo_path )
337
341
 
@@ -341,17 +345,6 @@ module Carson
341
345
 
342
346
  reasons = []
343
347
 
344
- # Sweep stale worktrees (merged branches) before counting active ones
345
- # so only genuinely active worktrees block the operation.
346
- scoped_runtime = build_scoped_runtime( repo_path: repo_path )
347
- scoped_runtime.sweep_stale_worktrees!
348
- worktrees = scoped_runtime.worktree_list
349
- main_root = scoped_runtime.realpath_safe( repo_path )
350
- active = worktrees.reject { |worktree| worktree.path == main_root }
351
- if active.any?
352
- reasons << "#{active.count} active worktree#{active.count == 1 ? '' : 's'}"
353
- end
354
-
355
348
  # Uncommitted changes in the main working tree.
356
349
  stdout, _, success, = git.run( "status", "--porcelain" )
357
350
  if success && !stdout.strip.empty?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carson
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hailei Wang