ace-hitl 0.25.1 → 0.26.0
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/CHANGELOG.md +6 -0
- data/handbook/workflow-instructions/hitl.wf.md +13 -0
- data/lib/ace/hitl/cli/commands/cancel.rb +15 -2
- data/lib/ace/hitl/cli.rb +1 -1
- data/lib/ace/hitl/organisms/hitl_manager.rb +2 -1
- data/lib/ace/hitl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 64cb514390029a16b5a139d1d0db8da63b36c8fc08b21df9525d2f84bb94c1c3
|
|
4
|
+
data.tar.gz: 20118ea180abf1437a63d32c48c72581ca6e0aa115b79422b83f77aabc9afc04
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e096433ca99b4cbc9455f21494d42d2cb08bc4dcf305e8e14d1e4c516a470ab8aa6a6e3eb723c3cb142570dc661197695cc30bb088c6c0713698ea6eda390446
|
|
7
|
+
data.tar.gz: d23bcb8c437f671d91d3661e3f27041939b4b3007acf680e19bb0c2c3315dd13f8250197cc60501786d4f7f875d20913db58c43694a65009f1442341f4a7982b
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.26.0] - 2026-11-12
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Expose canonical local case cancellation through `cancel --case --reason`, preserving audited reasons and idempotence without fabricating human answers or contacting relay services.
|
|
15
|
+
|
|
10
16
|
## [0.25.1] - 2026-11-10
|
|
11
17
|
|
|
12
18
|
### Fixed
|
|
@@ -165,3 +165,16 @@ Canonical lifecycle namespace: `hitl.event.*`
|
|
|
165
165
|
- Blockers always produce canonical `HITL: <id> <path>` failure reason.
|
|
166
166
|
- Human-required completion handoffs generate approval HITL events.
|
|
167
167
|
- Resolved HITL events are archived only after successful resume dispatch.
|
|
168
|
+
|
|
169
|
+
## Withdraw an obsolete local question
|
|
170
|
+
|
|
171
|
+
If the reason for an unanswered or unapplied question no longer exists, cancel
|
|
172
|
+
the exact local case with the evidence. Do not manufacture a human answer:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
ace-hitl cancel <case-id> --case --reason "Obsolete: verified new review commit and active next round"
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
This records terminal cancellation in the canonical case. Repetition is a no-op;
|
|
179
|
+
an applied effect must be closed instead. Without `--case`, cancel addresses the
|
|
180
|
+
relay request owner; it never guesses a different owner on lookup failure.
|
|
@@ -14,16 +14,29 @@ module Ace
|
|
|
14
14
|
include Ace::Support::Cli::Base
|
|
15
15
|
include LifecycleCommand
|
|
16
16
|
|
|
17
|
-
desc "Cancel
|
|
17
|
+
desc "Cancel a relay request or an explicit local case with an audited reason"
|
|
18
18
|
|
|
19
19
|
argument :id, required: true, desc: "HITL relay request id"
|
|
20
20
|
|
|
21
|
+
option :case, type: :boolean, desc: "Cancel an exact local case instead of a relay request; requires --reason"
|
|
22
|
+
|
|
21
23
|
option :reason, type: :string, desc: "Audited reason recorded in the public lifecycle record"
|
|
22
24
|
|
|
23
25
|
option :quiet, type: :boolean, aliases: %w[-q], desc: "Suppress non-essential output"
|
|
24
26
|
|
|
25
27
|
def call(id:, **options)
|
|
26
|
-
|
|
28
|
+
if options[:case]
|
|
29
|
+
reason = options[:reason].to_s.strip
|
|
30
|
+
raise Ace::Support::Cli::Error.new("local case cancellation requires --reason") if reason.empty?
|
|
31
|
+
state = Organisms::HitlManager.new.cancel_case(id, reason: reason)
|
|
32
|
+
emit({"case" => id, "state" => state.to_s})
|
|
33
|
+
else
|
|
34
|
+
emit(lifecycle_client.cancel(id, reason: options[:reason] || ""))
|
|
35
|
+
end
|
|
36
|
+
rescue Organisms::HitlManager::UnknownCaseError,
|
|
37
|
+
Organisms::HitlManager::AmbiguousReferenceError,
|
|
38
|
+
Organisms::HitlManager::LifecycleTransitionError => e
|
|
39
|
+
raise_lifecycle_error("not cancelled: #{e.message}")
|
|
27
40
|
rescue Lifecycle::Error, Providers::ProviderUnavailableError => e
|
|
28
41
|
raise_lifecycle_error(e.message)
|
|
29
42
|
end
|
data/lib/ace/hitl/cli.rb
CHANGED
|
@@ -47,7 +47,7 @@ module Ace
|
|
|
47
47
|
["wait", "Wait for an answer on a specific HITL event"],
|
|
48
48
|
["deliver", "Deliver an answer (stdin) to a pending HITL relay request"],
|
|
49
49
|
["consume", "Wait for and consume the answer of one own HITL relay request"],
|
|
50
|
-
["cancel", "Cancel
|
|
50
|
+
["cancel", "Cancel a relay request or explicit local case (--case)"],
|
|
51
51
|
["pending", "List answerable HITL relay requests (transport)"],
|
|
52
52
|
["states", "List public HITL lifecycle projections (transport)"],
|
|
53
53
|
["duty", "Project pending and escalated HITL requests (transport)"],
|
|
@@ -267,7 +267,7 @@ module Ace
|
|
|
267
267
|
# Only from the not-yet-applied states — an applied effect is
|
|
268
268
|
# history and is closed, not cancelled.
|
|
269
269
|
# @return [Symbol] :cancelled or :duplicate
|
|
270
|
-
def cancel_case(ref, scope: nil)
|
|
270
|
+
def cancel_case(ref, scope: nil, reason: nil)
|
|
271
271
|
event = exact_case(ref, scope: scope)
|
|
272
272
|
|
|
273
273
|
transition(event.file_path) do |frontmatter, _body|
|
|
@@ -276,6 +276,7 @@ module Ace
|
|
|
276
276
|
when "", "pending"
|
|
277
277
|
frontmatter["application"] = {"state" => "cancelled",
|
|
278
278
|
"cancelled_at" => timestamp}
|
|
279
|
+
frontmatter["application"]["reason"] = reason.to_s.strip unless reason.to_s.strip.empty?
|
|
279
280
|
:cancelled
|
|
280
281
|
when "cancelled"
|
|
281
282
|
:duplicate
|
data/lib/ace/hitl/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ace-hitl
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.26.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michal Czyz
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-11-
|
|
10
|
+
date: 2026-11-12 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: ace-hitl-contract
|