forge-orkes 0.64.2 → 0.64.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.
package/package.json
CHANGED
|
@@ -111,6 +111,28 @@ PHASES="$(awk '
|
|
|
111
111
|
report_field() { # report_field <file> <key> — a TOP-LEVEL `key:` (col 0)
|
|
112
112
|
grep -E "^$2:" "$1" 2>/dev/null | head -1 | sed -E "s/^$2:[[:space:]]*//; s/[[:space:]]*(#.*)?$//; s/^\"//; s/\"$//"
|
|
113
113
|
}
|
|
114
|
+
report_field_flat() { # report_field_flat <file> <key> — report_field + YAML block scalars
|
|
115
|
+
# A long interrupt question is naturally written as a block scalar (`key: |` /
|
|
116
|
+
# `key: >`), and report_field's single-line read returns the literal indicator —
|
|
117
|
+
# so the §8 ping carried "|" as the whole question (seen live: m-40 phase
|
|
118
|
+
# 73-approval-prompt-digest, 2026-07-22). When the value is a block-scalar
|
|
119
|
+
# indicator, collect the block's more-indented lines and FLATTEN to one line
|
|
120
|
+
# (newlines → spaces) so the ping payload stays a single TSV field. Blank lines
|
|
121
|
+
# inside the block are kept-as-separators; the first non-blank column-0 line
|
|
122
|
+
# (the next top-level key) ends the block. Plain scalars pass through unchanged.
|
|
123
|
+
_ff="$(report_field "$1" "$2")"
|
|
124
|
+
case "$_ff" in
|
|
125
|
+
'|'*|'>'*)
|
|
126
|
+
awk -v k="$2" '
|
|
127
|
+
hit && /^[^[:space:]]/ { exit }
|
|
128
|
+
hit { sub(/^[[:space:]]+/, ""); sub(/[[:space:]]+$/, "");
|
|
129
|
+
if (length($0)) printf "%s%s", (n++ ? " " : ""), $0; next }
|
|
130
|
+
!hit && index($0, k ":") == 1 { hit = 1 }
|
|
131
|
+
' "$1"
|
|
132
|
+
;;
|
|
133
|
+
*) printf '%s' "$_ff" ;;
|
|
134
|
+
esac
|
|
135
|
+
}
|
|
114
136
|
report_nested() { # report_nested <file> <key> — an INDENTED `key:` (checks.*/usage.*)
|
|
115
137
|
# The report nests checks.failed and usage.model under their parent block;
|
|
116
138
|
# report_field's `^key:` anchor can't see them. Each nested key we read
|
|
@@ -501,7 +523,7 @@ for phase in $PHASES; do
|
|
|
501
523
|
continue
|
|
502
524
|
fi
|
|
503
525
|
# Retry exhausted → HALT the slice early, failure evidence attached.
|
|
504
|
-
_ev="$(
|
|
526
|
+
_ev="$(report_field_flat "$report" evidence)"
|
|
505
527
|
slice_notify halt slice \
|
|
506
528
|
"slice HALTED at phase $phase ($idx/$total) after 1 retry — verdict=$verdict checks.failed=$cfailed; evidence: $report${_ev:+ ; $_ev}"
|
|
507
529
|
printf '[runner] phase %s: HALTED after retry — failure evidence at %s\n' "$phase" "$report" >&2
|
|
@@ -582,7 +604,7 @@ for phase in $PHASES; do
|
|
|
582
604
|
# The park happens BEFORE the next phase launches, so an irreversible action
|
|
583
605
|
# (declared in the report, deferred by the phase) is caught pre-execution.
|
|
584
606
|
interrupt="$(report_field "$report" interrupt)"
|
|
585
|
-
ipayload="$(
|
|
607
|
+
ipayload="$(report_field_flat "$report" interrupt_payload)"
|
|
586
608
|
|
|
587
609
|
# A design fork must arrive as something to LOOK AT — the payload is a
|
|
588
610
|
# sketch/mockup PATH that exists, never prose describing a visual (§8).
|
|
@@ -31,9 +31,13 @@ interrupt: none
|
|
|
31
31
|
|
|
32
32
|
interrupt_payload: ""
|
|
33
33
|
# interrupt_payload — REQUIRED (may be empty string when interrupt==none).
|
|
34
|
-
# For ambiguity/irreversible/budget: the question text to put in the ping.
|
|
34
|
+
# For ambiguity/irreversible/budget: the question text to put in the ping. A long
|
|
35
|
+
# question may be a YAML block scalar (`interrupt_payload: |` + indented lines) —
|
|
36
|
+
# the runner flattens it to ONE line (newlines → spaces) for the ping, so write
|
|
37
|
+
# it to read well as a single line too.
|
|
35
38
|
# For a `fork` (design decision): a PATH to a sketch/mockup the operator LOOKS AT —
|
|
36
39
|
# never prose describing a visual (brief §8: a fork arrives as something to see).
|
|
40
|
+
# A fork payload must stay a single-line path, never a block scalar.
|
|
37
41
|
|
|
38
42
|
checks:
|
|
39
43
|
passed: 0
|