@windyroad/itil 2.4.3 → 2.4.4

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.
@@ -497,5 +497,5 @@
497
497
  }
498
498
  },
499
499
  "name": "wr-itil",
500
- "version": "2.4.3"
500
+ "version": "2.4.4"
501
501
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wr-itil",
3
- "version": "2.4.3",
3
+ "version": "2.4.4",
4
4
  "description": "ITIL problem-management workflows for AI coding agents",
5
5
  "author": {
6
6
  "name": "Windy Road Technology",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/itil",
3
- "version": "2.4.3",
3
+ "version": "2.4.4",
4
4
  "description": "ITIL-aligned IT service management for Claude Code and Codex",
5
5
  "bin": {
6
6
  "windyroad-itil": "./bin/install.mjs"
@@ -27,11 +27,10 @@
27
27
  # non-strict.
28
28
  #
29
29
  # CLI VERSION PIN (set in `.github/workflows/ci.yml`):
30
- # CI installs `@anthropic-ai/claude-code@2.1.150` before invoking
30
+ # CI installs `@anthropic-ai/claude-code@2.1.280` before invoking
31
31
  # this script. The exact pin protects against Anthropic-side CLI
32
- # behaviour change silently breaking the gate. 2.1.150 is the
33
- # version ci-gate-claude-plugin-install-dry-run-per-plugin-pre-publish-confirmation-11-implementation-problem iter 6 empirically tested against. Bump the pin
34
- # only after re-running the iter-6 probe against the new version.
32
+ # behaviour change silently breaking the gate. 2.1.280 is the
33
+ # version re-checked against the ci-gate-claude-plugin-install-dry-run-per-plugin-pre-publish-confirmation-11-implementation-problem iter-6 probe before the bump.
35
34
  #
36
35
  # LOOP CONTRACT:
37
36
  # - Walks `packages/*/.claude-plugin/plugin.json` from CWD.
@@ -41,7 +41,7 @@ Continuously work the highest-priority actionable problem until the backlog is d
41
41
  3. Run the relevance and stop-condition checks. Before declaring `ALL_DONE`, run the repository's unconditional pre-completion gates and rescan the backlog.
42
42
  4. Dispatch exactly the selected ticket through the isolated Codex command below. Do not select or work a second ticket inside that process.
43
43
  5. Wait for that same process. Do not cancel, replace, retry, or fan out merely because normal model execution is slow.
44
- 6. Classify the exit and JSONL metadata before reading the final-output file. On success, validate the summary with `<itil-plugin-root>/bin/wr-itil-verify-iter-summary` and consume it. On failure, apply the recovery contract below and halt.
44
+ 6. Classify the exit and stdout JSONL before consuming the final-output file. On success, validate the summary with `<itil-plugin-root>/bin/wr-itil-verify-iter-summary` and consume it. Malformed telemetry may be paired with an independently validated summary for truthful reporting only; it never authorizes recovery or continuation. On failure, retain the private evidence directory, apply the recovery contract below, and halt.
45
45
  7. Run inter-iteration verification. If the iteration produced committed shippable work, complete the repository's governed push and release cadence when risk is within appetite. Above-appetite risk is a remediation instruction: reduce scope or split the change; never ask the user to approve risk above appetite.
46
46
  8. Report only material progress, then rescan and repeat.
47
47
 
@@ -62,8 +62,13 @@ Run the nested process in the outer session's installed Codex environment. Do no
62
62
 
63
63
  ```bash
64
64
  ITERATION_CHECKOUT="$(git rev-parse --show-toplevel)"
65
- ITERATION_JSONL="$(mktemp)"
66
- ITERATION_FINAL="$(mktemp)"
65
+ ITERATION_RUN_DIR="$(
66
+ umask 077
67
+ mktemp -d "${TMPDIR:-/tmp}/wr-itil-work-problems.XXXXXX"
68
+ )"
69
+ ITERATION_JSONL="$ITERATION_RUN_DIR/stdout.jsonl"
70
+ ITERATION_STDERR="$ITERATION_RUN_DIR/stderr.log"
71
+ ITERATION_FINAL="$ITERATION_RUN_DIR/final.txt"
67
72
 
68
73
  export WR_SUPPRESS_PENDING_QUESTIONS=1
69
74
  export WR_SUPPRESS_OVERSIGHT_NUDGE=1
@@ -77,24 +82,26 @@ codex exec \
77
82
  --json \
78
83
  --output-last-message "$ITERATION_FINAL" \
79
84
  "$ITERATION_PROMPT" \
80
- >"$ITERATION_JSONL" 2>&1
85
+ >"$ITERATION_JSONL" 2>"$ITERATION_STDERR"
81
86
  ITERATION_EXIT=$?
82
87
  ```
83
88
 
84
- The two output channels are load-bearing and must stay separate:
89
+ The three output channels are load-bearing and must stay separate:
85
90
 
86
- - `ITERATION_JSONL` carries progress and error metadata only. Parse it as JSONL; never scrape the final agent message from this stream.
91
+ - `ITERATION_JSONL` carries stdout progress and error metadata only. Validate every non-empty line independently as JSON before scanning all valid records for `error` and `turn.failed`; never scrape the final agent message from this stream.
92
+ - `ITERATION_STDERR` carries diagnostics only. Never parse it as JSONL or print its raw contents, which may contain sensitive material.
87
93
  - `ITERATION_FINAL` carries the final agent message. Read `ITERATION_SUMMARY` only from this file after the exit and metadata checks pass.
88
94
 
89
- Always remove both temporary files after their contents have been classified and consumed.
95
+ Remove `ITERATION_RUN_DIR` only after an error-free exit, fully valid JSONL, one validated selected-ticket summary, and completed checkout attribution. On any failure, retain the private directory and report its path plus the first malformed line number when applicable; do not print raw artifact contents.
90
96
 
91
97
  ## Error classification and recovery
92
98
 
93
99
  Classify in this order:
94
100
 
95
- 1. A non-zero process exit halts the loop. Use the exit code plus JSONL error messages to report `quota exhausted`, `rate limited`, `authentication failed`, `service overloaded`, or `execution failed`; do not call a quota failure merely unavailable.
96
- 2. Exit zero with a JSONL `error` or `turn.failed` event also halts before summary parsing. Apply the same message classification. A final-output file does not override an error event.
97
- 3. Exit zero without an error event permits final-output parsing. The file must contain exactly one valid `ITERATION_SUMMARY` for the selected ticket; otherwise halt as `invalid iteration summary`.
101
+ 1. A non-zero process exit halts the loop. Use the exit code plus valid JSONL error records and separately retained stderr diagnostics to report `quota exhausted`, `rate limited`, `authentication failed`, `service overloaded`, or `execution failed`; do not call a quota failure merely unavailable.
102
+ 2. Exit zero with fully valid JSONL containing an `error` or `turn.failed` event also halts before summary parsing. Apply the same message classification. A final-output file does not override an error event.
103
+ 3. Exit zero with any malformed JSONL line is `telemetry-inconclusive`. Record the first offending line number and independently validate the final-output file. Exactly one valid summary for the selected ticket may be used to report the worker's outcome and commit truthfully, but it does not authorize recovery, push, release, or another iteration because the malformed line may conceal an error event. Retain all three artifacts and halt.
104
+ 4. Exit zero with fully valid JSONL and no error event permits final-output parsing. The file must contain exactly one valid `ITERATION_SUMMARY` for the selected ticket; otherwise halt as `invalid iteration summary`.
98
105
 
99
106
  After every exit, record the checkout delta against the pre-iteration status for diagnosis, without mutation. Recovery may begin only after exit zero, error-free JSONL, and exactly one valid `ITERATION_SUMMARY` for the selected ticket. Missing, multiple, or wrong-ticket summaries halt without recovery. Then compare the checkout with the recorded pre-iteration status:
100
107
 
@@ -104,6 +111,8 @@ After every exit, record the checkout delta against the pre-iteration status for
104
111
  - Ambiguous, unstaged, or unrelated changes hard-block recovery. Report their paths and halt without mutation.
105
112
  - When a failed iteration created known disposable paths, restore only the explicit verified path list with path-scoped Git commands. Never use a broad reset, clean, checkout, restore, or stash operation.
106
113
 
114
+ Never retry a failed or telemetry-inconclusive worker automatically. It may already have changed or committed the checkout; redispatch can duplicate or conflict with coherent work.
115
+
107
116
  ## Fix Proposal Rule
108
117
 
109
118
  A fix proposal is a release row on an existing story map, never a new file under `docs/rfcs/`. The row has an identity from `<itil-plugin-root>/bin/wr-itil-next-rfc-id`, at least one story card, and a story whose `problems:` list names the driving problem. Creating a new map, activity column, job, or uncovered architectural choice requires a queued human decision rather than a silent edit.