carson 3.30.1 → 3.30.3

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.
@@ -23,16 +23,20 @@ module Carson
23
23
  DISPOSITION_TOKENS = %w[accepted rejected deferred].freeze
24
24
 
25
25
  # Runtime wiring for repository context, tool paths, and output streams.
26
- def initialize( repo_root:, tool_root:, output:, error:, in_stream: $stdin, verbose: false )
26
+ # work_dir: the actual directory for git/gh command execution. When running
27
+ # from a worktree, this is the worktree path; repo_root remains the canonical
28
+ # main tree root for config, ledger, and path resolution.
29
+ def initialize( repo_root:, tool_root:, output:, error:, in_stream: $stdin, verbose: false, work_dir: nil )
27
30
  @repo_root = repo_root
31
+ @work_dir = work_dir || repo_root
28
32
  @tool_root = tool_root
29
33
  @output = output
30
34
  @error = error
31
35
  @in = in_stream
32
36
  @verbose = verbose
33
37
  @config = Config.load( repo_root: repo_root )
34
- @git_adapter = Adapters::Git.new( repo_root: repo_root )
35
- @github_adapter = Adapters::GitHub.new( repo_root: repo_root )
38
+ @git_adapter = Adapters::Git.new( repo_root: @work_dir )
39
+ @github_adapter = Adapters::GitHub.new( repo_root: @work_dir )
36
40
  @template_sync_result = nil
37
41
  end
38
42
 
@@ -47,7 +51,7 @@ module Carson
47
51
 
48
52
  private
49
53
 
50
- attr_reader :repo_root, :tool_root, :output, :error, :in, :config, :git_adapter, :github_adapter
54
+ attr_reader :repo_root, :work_dir, :tool_root, :output, :error, :in, :config, :git_adapter, :github_adapter
51
55
 
52
56
  # Ruby 2.6 treats bare `in` awkwardly because of pattern-matching parsing.
53
57
  # Keep the original ivar/reader for compatibility, but expose a safe helper name.
@@ -95,7 +99,7 @@ module Carson
95
99
  # Passive repository record for the current runtime context.
96
100
  # Uses main_worktree_root so the repo_path stored in the ledger is always the
97
101
  # canonical main tree path, regardless of which worktree the command runs from.
98
- # This ensures govern (which looks up by main tree path) finds worktree deliveries.
102
+ # This ensures receive (which looks up by main tree path) finds worktree deliveries.
99
103
  def repository_record
100
104
  Repository.new( path: main_worktree_root, runtime: self )
101
105
  end
@@ -372,9 +376,9 @@ require_relative "runtime/local"
372
376
  require_relative "runtime/audit"
373
377
  require_relative "runtime/loop_runner"
374
378
  require_relative "runtime/housekeep"
375
- require_relative "runtime/repos"
379
+ require_relative "runtime/list"
376
380
  require_relative "runtime/review"
377
- require_relative "runtime/govern"
381
+ require_relative "runtime/receive"
378
382
  require_relative "runtime/setup"
379
383
  require_relative "runtime/status"
380
384
  require_relative "runtime/abandon"
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: 3.30.1
4
+ version: 3.30.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hailei Wang
@@ -53,12 +53,12 @@ files:
53
53
  - RELEASE.md
54
54
  - VERSION
55
55
  - carson.gemspec
56
+ - config/.github/hooks/command-guard
57
+ - config/.github/hooks/pre-commit
58
+ - config/.github/hooks/pre-merge-commit
59
+ - config/.github/hooks/pre-push
60
+ - config/.github/hooks/prepare-commit-msg
56
61
  - exe/carson
57
- - hooks/command-guard
58
- - hooks/pre-commit
59
- - hooks/pre-merge-commit
60
- - hooks/pre-push
61
- - hooks/prepare-commit-msg
62
62
  - icon.svg
63
63
  - lib/carson.rb
64
64
  - lib/carson/adapters/agent.rb
@@ -78,8 +78,8 @@ files:
78
78
  - lib/carson/runtime/abandon.rb
79
79
  - lib/carson/runtime/audit.rb
80
80
  - lib/carson/runtime/deliver.rb
81
- - lib/carson/runtime/govern.rb
82
81
  - lib/carson/runtime/housekeep.rb
82
+ - lib/carson/runtime/list.rb
83
83
  - lib/carson/runtime/local.rb
84
84
  - lib/carson/runtime/local/hooks.rb
85
85
  - lib/carson/runtime/local/merge_proof.rb
@@ -89,8 +89,8 @@ files:
89
89
  - lib/carson/runtime/local/template.rb
90
90
  - lib/carson/runtime/local/worktree.rb
91
91
  - lib/carson/runtime/loop_runner.rb
92
+ - lib/carson/runtime/receive.rb
92
93
  - lib/carson/runtime/recover.rb
93
- - lib/carson/runtime/repos.rb
94
94
  - lib/carson/runtime/review.rb
95
95
  - lib/carson/runtime/review/data_access.rb
96
96
  - lib/carson/runtime/review/gate_support.rb
File without changes
File without changes
File without changes
File without changes
File without changes