Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 67 additions & 6 deletions .workspace/dagu/dags/discovery.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# dagu-feature-bundle: @a4s/[email protected].108 source=pablontiv/a4s@2a0c2b100719627eb3d9214d798ab7c57a47f661 bootstrap=bootstrap-backscroll-v0-3-108 dagu=2.20.1
# dagu-feature-bundle: @a4s/[email protected].118 source=pablontiv/a4s@e6ed98efc72c6ed984ed55787e309073def77c18 bootstrap=bootstrap-backscroll-v0-3-118 dagu=2.20.1
labels:
- workspace=backscroll
- dagu-feature-bundle=0.3.108
- dagu-feature-bundle=0.3.118
queue: backscroll
type: graph
dotenv: []
Expand All @@ -25,7 +25,7 @@ params:
default: ""
env:
- RUN: ${context.run.id}
- DAGU_FEATURE_BUNDLE: "dagu-feature-bundle=0.3.108 source=pablontiv/a4s@2a0c2b100719627eb3d9214d798ab7c57a47f661 bootstrap=bootstrap-backscroll-v0-3-108"
- DAGU_FEATURE_BUNDLE: "dagu-feature-bundle=0.3.118 source=pablontiv/a4s@e6ed98efc72c6ed984ed55787e309073def77c18 bootstrap=bootstrap-backscroll-v0-3-118"
steps:
- id: snapshot
run: |
Expand Down Expand Up @@ -92,9 +92,28 @@ steps:
exactamente un objeto JSON por línea en
${steps.snapshot.outputs.OUT_DIR}/findings-<lente>.jsonl. Un archivo vacío
representa cero hallazgos. SOURCE=${SOURCE}.
form:
type: object
properties:
CANCEL: {type: string, enum: ['yes', 'no']}

- id: check_findings
- id: discover_cancellation
depends: discover
env:
- CANCEL: ${steps.discover.outputs.CANCEL}
- CHECKPOINT: discover
- OUT_DIR: ${steps.snapshot.outputs.OUT_DIR}
run: &cancellation_gate |
set -euo pipefail
if [[ "$CANCEL" == yes ]]; then
jq -n --arg run "$RUN" --arg checkpoint "$CHECKPOINT" \
'{run:$run,checkpoint:$checkpoint,outcome:"cancelled",nativeExpected:"failed"}' > "$OUT_DIR/cancellation.json"
printf 'Cancellation requested at %s; terminating before successors; evidence=%s\n' "$CHECKPOINT" "$OUT_DIR"
exit 77
fi

- id: check_findings
depends: discover_cancellation
env:
- OUT_DIR: ${steps.snapshot.outputs.OUT_DIR}
run: |
Expand Down Expand Up @@ -170,9 +189,21 @@ steps:
y escribe ${steps.snapshot.outputs.OUT_DIR}/verdicts.jsonl. Debe haber un
veredicto por id actual. LIVE_TARGET=${LIVE_TARGET}; si está definido, la
comprobación en vivo es exclusivamente de lectura y se marca live=true.
form:
type: object
properties:
CANCEL: {type: string, enum: ['yes', 'no']}

- id: check_verdicts
- id: validate_cancellation
depends: validate
env:
- CANCEL: ${steps.validate.outputs.CANCEL}
- CHECKPOINT: validate
- OUT_DIR: ${steps.snapshot.outputs.OUT_DIR}
run: *cancellation_gate

- id: check_verdicts
depends: validate_cancellation
env:
- OUT_DIR: ${steps.snapshot.outputs.OUT_DIR}
run: |
Expand Down Expand Up @@ -230,9 +261,21 @@ steps:
The body includes ## Problem, ## Change, and ## Acceptance. Each confirmed
finding appears exactly once. Derive a stable kebab-case unit id from the
sorted finding IDs.
form:
type: object
properties:
CANCEL: {type: string, enum: ['yes', 'no']}

- id: check_units
- id: consolidate_cancellation
depends: consolidate
env:
- CANCEL: ${steps.consolidate.outputs.CANCEL}
- CHECKPOINT: consolidate
- OUT_DIR: ${steps.snapshot.outputs.OUT_DIR}
run: *cancellation_gate

- id: check_units
depends: consolidate_cancellation
env:
- OUT_DIR: ${steps.snapshot.outputs.OUT_DIR}
run: |
Expand Down Expand Up @@ -316,3 +359,21 @@ steps:
outputs:
- name: BACKEND_RUN_ID

handler_on:
exit:
env:
- OUT_DIR: ${steps.snapshot.outputs.OUT_DIR}
- SNAPSHOT: ${steps.snapshot.outputs.SNAPSHOT}
run: |
set -euo pipefail
# Cancellation disposes its immutable snapshot while preserving findings and audit evidence.
if [[ -f "$OUT_DIR/cancellation.json" && "$SNAPSHOT" == "$OUT_DIR/snapshot" && -d "$SNAPSHOT" ]]; then
[[ "$(git -C "$SNAPSHOT" rev-parse --show-toplevel)" == "$SNAPSHOT" &&
"$(git -C "$SNAPSHOT" rev-parse --path-format=absolute --git-common-dir)" == "$(git -C "$PRIMARY" rev-parse --path-format=absolute --git-common-dir)" &&
-z "$(git -C "$SNAPSHOT" status --porcelain --untracked-files=all)" &&
-z "$(git -C "$SNAPSHOT" branch --show-current)" ]]
chmod -R u+w "$SNAPSHOT"
git -C "$PRIMARY" worktree remove "$SNAPSHOT"
printf 'cleanup snapshot=%s evidence=%s\n' "$SNAPSHOT" "$OUT_DIR"
fi

Loading
Loading