carson 2.15.0 → 2.15.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 +4 -4
- data/API.md +3 -2
- data/RELEASE.md +40 -0
- data/VERSION +1 -1
- data/lib/carson/runtime/audit.rb +8 -2
- data/lib/carson/runtime/local.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d3142430a752f707dc361e222db4581ad007baf32da8e041fc2f4c83475fe26a
|
|
4
|
+
data.tar.gz: aaefa0ac48072fa8ef9427b79617dac2f82492828b596bb8f9755c2c71c093f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8ccd8f2cf691b6d44bd6435d49db141cf01ee4dbf93f1c8b7c37b63ac82ce923ef72c10455118628d2431fa312a344530822bc2d5e4aaecdc89b3487ec34e26e
|
|
7
|
+
data.tar.gz: a24f069a42dfb80d938aef2e1cb2e397180d59b52b658d80cb47824d26151b06d62dc6904b95e004d3a9440bacb0c9f76a162cea78d406335ae9e5b874bca4e1
|
data/API.md
CHANGED
|
@@ -56,6 +56,7 @@ carson <command> [subcommand] [arguments]
|
|
|
56
56
|
|---|---|
|
|
57
57
|
| `carson version` | Print installed Carson version. |
|
|
58
58
|
| `carson inspect` | Verify Carson-managed hook installation and repository setup. |
|
|
59
|
+
| `carson check` | Report required CI check status for the current branch's open PR. Exits 0 for passing or pending; exits 2 for failing. Never exits 8. |
|
|
59
60
|
|
|
60
61
|
## Exit status contract
|
|
61
62
|
|
|
@@ -118,7 +119,7 @@ Environment overrides:
|
|
|
118
119
|
},
|
|
119
120
|
"check_wait": 30,
|
|
120
121
|
"merge": {
|
|
121
|
-
"authority":
|
|
122
|
+
"authority": true,
|
|
122
123
|
"method": "squash"
|
|
123
124
|
}
|
|
124
125
|
}
|
|
@@ -130,7 +131,7 @@ Environment overrides:
|
|
|
130
131
|
- `agent.provider`: `"auto"`, `"codex"`, or `"claude"`.
|
|
131
132
|
- `agent.codex` / `agent.claude`: provider-specific options (reserved).
|
|
132
133
|
- `check_wait`: seconds to wait for CI checks before classifying (default: `30`).
|
|
133
|
-
- `merge.authority`: `
|
|
134
|
+
- `merge.authority`: `true` (default) — Carson may merge autonomously. Set to `false` to require explicit enablement.
|
|
134
135
|
- `merge.method`: `"squash"` (default), `"merge"`, or `"rebase"`.
|
|
135
136
|
|
|
136
137
|
`lint` schema:
|
data/RELEASE.md
CHANGED
|
@@ -5,6 +5,46 @@ Release-note scope rule:
|
|
|
5
5
|
- `RELEASE.md` records only version deltas, breaking changes, and migration actions.
|
|
6
6
|
- Operational usage guides live in `MANUAL.md` and `API.md`.
|
|
7
7
|
|
|
8
|
+
## 2.15.1 — Codex Review Fixes
|
|
9
|
+
|
|
10
|
+
### What changed
|
|
11
|
+
|
|
12
|
+
- `carson check` now correctly exits 2 for cancelled, errored, or timed-out CI checks. Previously, only `fail`-bucketed checks were treated as failing — all other non-passing states (cancelled, error) fell through to "all passing".
|
|
13
|
+
- Pre-push auto-commit now aborts the in-flight push and prints "Push again to include them." Previously the commit was created locally but not included in the push that triggered it.
|
|
14
|
+
- `--push-prep` now stages and commits untracked managed files. Previously, new managed files introduced by a gem upgrade were silently omitted.
|
|
15
|
+
- `API.md`: `merge.authority` default corrected from `false` to `true` to match the implementation.
|
|
16
|
+
- `API.md`: `carson check` added to the Info commands table.
|
|
17
|
+
- `docs/develop.md`: Architecture rationale updated — `govern.rb` acknowledged as a known exception to the adapter shell-out rule.
|
|
18
|
+
- Test coverage added for `check` bucket classification, `managed_dirty_paths` untracked handling, and CLI dispatch.
|
|
19
|
+
|
|
20
|
+
### No migration required
|
|
21
|
+
|
|
22
|
+
No configuration or workflow changes needed.
|
|
23
|
+
|
|
24
|
+
## 2.15.0 — JIT Auto-Commit on Pre-Push + `carson check`
|
|
25
|
+
|
|
26
|
+
### What changed
|
|
27
|
+
|
|
28
|
+
- Pre-push hook now calls `carson template apply --push-prep` automatically. Any uncommitted changes to Carson-managed template files or `.github/linters/` are committed before the push reaches GitHub — no manual `git add` / `git commit` needed after a gem upgrade or `lint policy` run.
|
|
29
|
+
- `--push-prep` flag scopes the behaviour to pre-push only; interactive `carson template apply` is unchanged.
|
|
30
|
+
- `carson check` command added: wraps `gh pr checks --required`, exits 0 for pending or passing and 2 for failing. Useful for callers that need a clean CI status signal without `gh`'s confusing "Error: Exit code 8" for pending runs.
|
|
31
|
+
- CI smoke tests guarded against live audit exit codes with `|| true` so a pending or failing CI run on the default branch does not cause false test failures.
|
|
32
|
+
|
|
33
|
+
### No migration required
|
|
34
|
+
|
|
35
|
+
Run `bash install.sh` to pick up the updated pre-push hook in all governed repos.
|
|
36
|
+
|
|
37
|
+
## 2.14.2 — Docs Enrichment
|
|
38
|
+
|
|
39
|
+
### What changed
|
|
40
|
+
|
|
41
|
+
- `docs/design.md` enriched with signal system, output design, prompt principles, and vocabulary guide.
|
|
42
|
+
- `docs/develop.md` enriched with architecture rationale, new-command walkthrough, and testing approach.
|
|
43
|
+
|
|
44
|
+
### No migration required
|
|
45
|
+
|
|
46
|
+
Documentation only. No behavioural changes.
|
|
47
|
+
|
|
8
48
|
## 2.14.1 — Auto-Refresh on Install
|
|
9
49
|
|
|
10
50
|
### What changed
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.15.
|
|
1
|
+
2.15.1
|
data/lib/carson/runtime/audit.rb
CHANGED
|
@@ -104,8 +104,8 @@ module Carson
|
|
|
104
104
|
end
|
|
105
105
|
|
|
106
106
|
checks_data = JSON.parse( checks_stdout )
|
|
107
|
-
failing = checks_data.select { |e| e[ "bucket" ].to_s == "fail" || e[ "state" ].to_s.upcase == "FAILURE" }
|
|
108
107
|
pending = checks_data.select { |e| e[ "bucket" ].to_s == "pending" }
|
|
108
|
+
failing = checks_data.select { |e| check_entry_failing?( entry: e ) }
|
|
109
109
|
total = checks_data.count
|
|
110
110
|
# gh exits 8 when required checks are still pending (not a failure).
|
|
111
111
|
is_pending = !checks_success && checks_exit == 8
|
|
@@ -181,8 +181,8 @@ module Carson
|
|
|
181
181
|
return report
|
|
182
182
|
end
|
|
183
183
|
checks_data = JSON.parse( checks_stdout )
|
|
184
|
-
failing = checks_data.select { |entry| entry[ "bucket" ].to_s == "fail" || entry[ "state" ].to_s.upcase == "FAILURE" }
|
|
185
184
|
pending = checks_data.select { |entry| entry[ "bucket" ].to_s == "pending" }
|
|
185
|
+
failing = checks_data.select { |entry| check_entry_failing?( entry: entry ) }
|
|
186
186
|
report[ :checks ][ :status ] = checks_success ? "ok" : ( checks_exit == 8 ? "pending" : "attention" )
|
|
187
187
|
report[ :checks ][ :required_total ] = checks_data.count
|
|
188
188
|
report[ :checks ][ :failing_count ] = failing.count
|
|
@@ -361,6 +361,12 @@ module Carson
|
|
|
361
361
|
[ critical, advisory ]
|
|
362
362
|
end
|
|
363
363
|
|
|
364
|
+
# Returns true when a required-check entry is in a non-passing, non-pending state.
|
|
365
|
+
# Cancelled, errored, timed-out, and any unknown bucket all count as failing.
|
|
366
|
+
def check_entry_failing?( entry: )
|
|
367
|
+
!%w[pass pending].include?( entry[ "bucket" ].to_s )
|
|
368
|
+
end
|
|
369
|
+
|
|
364
370
|
# Failing means completed with a non-successful conclusion.
|
|
365
371
|
def default_branch_check_run_failing?( entry: )
|
|
366
372
|
status = entry[ "status" ].to_s.strip.downcase
|
data/lib/carson/runtime/local.rb
CHANGED
|
@@ -416,7 +416,7 @@ module Carson
|
|
|
416
416
|
end
|
|
417
417
|
return EXIT_ERROR if error_count.positive?
|
|
418
418
|
|
|
419
|
-
|
|
419
|
+
return EXIT_BLOCK if push_prep && push_prep_commit!
|
|
420
420
|
EXIT_OK
|
|
421
421
|
end
|
|
422
422
|
|
|
@@ -754,7 +754,8 @@ module Carson
|
|
|
754
754
|
|
|
755
755
|
git_system!( "add", *dirty )
|
|
756
756
|
git_system!( "commit", "-m", "chore: sync Carson managed files" )
|
|
757
|
-
puts_line "Carson committed managed file updates."
|
|
757
|
+
puts_line "Carson committed managed file updates. Push again to include them."
|
|
758
|
+
true
|
|
758
759
|
end
|
|
759
760
|
|
|
760
761
|
def managed_dirty_paths
|
|
@@ -767,7 +768,6 @@ module Carson
|
|
|
767
768
|
|
|
768
769
|
stdout_text, = git_capture_soft( "status", "--porcelain", "--", *candidates )
|
|
769
770
|
stdout_text.to_s.lines
|
|
770
|
-
.reject { |l| l.start_with?( "??" ) }
|
|
771
771
|
.map { |l| l[ 3.. ].strip }
|
|
772
772
|
.reject( &:empty? )
|
|
773
773
|
end
|