fix: address review findings (rollback mainline, audit flag, confidence gate, test pattern, jq args)

- git revert uses --mainline 1 for merge commits
- inject dispatch passes all args so --audit flag is reachable
- confidence gate defaults to 0.0 (triggers gate) instead of 0.7 (bypasses)
- test-first grep uses word-boundary patterns to avoid false positives
- jq uses --arg instead of string interpolation for safe filtering
This commit is contained in:
2026-04-04 07:42:31 +02:00
parent f2b886880a
commit d9ec148bb3
3 changed files with 14 additions and 9 deletions

View File

@@ -157,10 +157,15 @@ TASK_UNDERSTANDING=$(grep -i "task understanding" "$CONF_FILE" | grep -oE '[0-9]
SOLUTION_COMPLETENESS=$(grep -i "solution completeness" "$CONF_FILE" | grep -oE '[0-9]+\.[0-9]+' | head -1)
RISK_COVERAGE=$(grep -i "risk coverage" "$CONF_FILE" | grep -oE '[0-9]+\.[0-9]+' | head -1)
# Fallback: if unparseable, treat as 0.7 (safe default — proceed but not overconfident)
TASK_UNDERSTANDING="${TASK_UNDERSTANDING:-0.7}"
SOLUTION_COMPLETENESS="${SOLUTION_COMPLETENESS:-0.7}"
RISK_COVERAGE="${RISK_COVERAGE:-0.7}"
# Fallback: if unparseable, emit warning and default to 0.0 (triggers gate, not bypasses it)
if [[ -z "$TASK_UNDERSTANDING" || -z "$SOLUTION_COMPLETENESS" || -z "$RISK_COVERAGE" ]]; then
echo "WARNING: Could not parse confidence scores from plan-creator.md" >&2
./lib/archeflow-event.sh "$RUN_ID" decision plan "" \
'{"what":"confidence_parse_failure","chosen":"warn","rationale":"one or more scores unparseable"}' "$SEQ_CREATOR_COMPLETE"
fi
TASK_UNDERSTANDING="${TASK_UNDERSTANDING:-0.0}"
SOLUTION_COMPLETENESS="${SOLUTION_COMPLETENESS:-0.0}"
RISK_COVERAGE="${RISK_COVERAGE:-0.0}"
```
**Pause branch** (Task understanding < 0.5):
@@ -268,7 +273,7 @@ After Maker returns:
After Maker completes, check `do-maker-files.txt` for test files:
```bash
TEST_FILES=$(grep -iE '(test|spec)' ".archeflow/artifacts/${RUN_ID}/do-maker-files.txt" || true)
TEST_FILES=$(grep -iE '([/_.-](test|spec)[/_.-]|\.(test|spec)\.|_(test|spec)\.|/tests?/|/__tests__/|/specs?/)' ".archeflow/artifacts/${RUN_ID}/do-maker-files.txt" || true)
```
If `TEST_FILES` is empty and domain is not `writing`: