Bug: audit.sh reads orchestrator warnings with head -1, truncating multi-line YAML scalars and disabling the TAG-FORMAT-DRIFT branch
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 58/100
Hướng nghiên cứu
Start at agents/audit/audit.sh:4606 and inspect how the orchestrator warnings are read and how $ORCH_WARNS is used by the TAG-FORMAT-DRIFT branch at line 4608. Run the audit against an orchestrator-LATEST.yaml containing multi-line warnings and verify the complete warnings are readable and the dedicated branch is selected. The sibling errors: reader near line 4618 is noted as a possible related issue, but its behavior was not verified.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
- Framework version: 1.6.258
- Project: 050-email-archive (shared-tooling mode)
- Reported: 2026-09-25T00:18:41Z
Description
Summary
agents/audit/audit.sh:4606 reads the orchestrator scan's warnings with a line-oriented
pipeline:
ORCH_WARNS=$(awk '/^warnings:/{flag=1; next} /^errors:/{flag=0} flag' "$ORCH_LATEST" \
| head -1 | sed 's/^- //')
But orchestrator-LATEST.yaml writes those warnings as multi-line quoted scalars. So
head -1 takes one physical line, not one logical entry.
Three compounding effects
Live output on our host (framework v1.6.258, 2026-09-25):
[WARN] Orchestrator-arc MCP scan: drift detected
Evidence: "NEW: 6 unclassified tool(s) (manual review needed — outside T-1761 convention\
Mitigation: Update .context/audits/orchestrator-mcp-baseline.yaml or investigate ratchet/new-tool
- The entry is cut mid-word at the YAML line wrap — it ends on
convention\. The list of
tool names, the only actionable part, never appears. - YAML quoting artifacts leak into human-facing output: the
—escape and the
continuation backslash. Neither is content. - 2 of 3 warnings are silently discarded.
REMOVED: 12 tool(s)andTAG-FORMAT-DRIFT
never reach the reader, and the warning count is never printed, so nothing indicates loss.
The third effect also disables a remediation branch
audit.sh:4608 selects T-1649's dedicated TAG-FORMAT-DRIFT branch by grepping $ORCH_WARNS
— the same truncated, first-physical-line-only string:
if echo "$ORCH_WARNS" | grep -q "TAG-FORMAT-DRIFT"; then
So whenever tag-format drift is not the first physical line of the first warning, that branch
is unreachable and the generic "update the baseline" mitigation prints instead. That was
the live state on our host: tag-format drift was present in the scan output and the audit was
emitting the generic branch. Reading the full warning set fixes the branch selection as a side
effect.
Why this surfaced only now
Latent for as long as the reader has existed, but unobservable while the probe never produced
warnings to mangle — see the E2BIG bug in issue #63. Fixing the probe revealed the next defect
in the chain.
Patch (applied to our vendored copy; diff inline, deliberately NOT --attach-patch)
Read the warnings as YAML. Any elision is stated, because silent truncation was the defect.
Degrades to empty on parse failure, which the existing ${ORCH_WARNS:-see $ORCH_LATEST}
fallback already renders sensibly.
- ORCH_WARNS=$(awk '/^warnings:/{flag=1; next} /^errors:/{flag=0} flag' "$ORCH_LATEST" 2>/dev/null | head -1 | sed 's/^- //')
+ ORCH_WARNS=$(ORCH_LATEST="$ORCH_LATEST" python3 -c '
+import os, yaml
+try:
+ with open(os.environ["ORCH_LATEST"]) as fh:
+ doc = yaml.safe_load(fh) or {}
+except Exception:
+ raise SystemExit(0)
+warns = [" ".join(str(w).split()) for w in (doc.get("warnings") or [])]
+shown, rest = warns[:3], warns[3:]
+out = " | ".join(shown)
+if rest:
+ out += " (+%d more)" % len(rest)
+print(out)
+' 2>/dev/null)
Result on the same host — complete, readable, all three warnings, and TAG-FORMAT-DRIFT now
present in $ORCH_WARNS so the T-1649 branch becomes reachable:
NEW: 6 unclassified tool(s) (manual review needed — outside T-1761 convention scope):
termlink_fleet_governor_history, termlink_fleet_governor_status, termlink_hub_governor_status,
termlink_substrate_history, termlink_substrate_status, termlink_whoami | REMOVED: 12 tool(s)
gone from <termlink repo> (likely renamed or T-1166 deprecation completed): ... |
TAG-FORMAT-DRIFT: 4 non-canonical tag prefix(es) in live sessions: respawn=(3), fqdn=(1),
role=(1), stack=(1)
Note on the sibling errors: reader
audit.sh:~4618 reads the exit-2 path with the same shape
(awk ... | head -1 | sed 's/^- //') against the same file. We did not touch it — our host
does not reach that branch, so we could not verify a change to it. It is almost certainly the
same bug and is worth fixing in the same pass upstream.
Reported from consumer project Pen (050-email-archive), task T-2192, arc-009.
Related: issue #63 (the E2BIG probe failure that made this observable).
Reported via fw upstream report from field installation
- Ngôn ngữ chính
- Shell
- Star
- 16
- Fork
- 6
- Merge trung bình
- 6 giờ 24 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DimitriGeelen/agentic-engineering-framework
-
area:doctor bug severity:low status:accepted triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DimitriGeelen/agentic-engineering-framework#100 · 3 bình luận ·
-
area:doctor bug severity:medium status:accepted triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
DimitriGeelen/agentic-engineering-framework#97 · 3 bình luận ·
-
area:context bug severity:low status:accepted triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
DimitriGeelen/agentic-engineering-framework#96 · 3 bình luận ·
-
area:cli bug severity:medium status:accepted triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
DimitriGeelen/agentic-engineering-framework#95 · 3 bình luận ·
-
area:watchtower bug severity:low status:released triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
DimitriGeelen/agentic-engineering-framework#94 · 4 bình luận ·
Tất cả issue của DimitriGeelen/agentic-engineering-framework
Issue tương tự
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
mattpocock/skills#1307 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status: ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
melodic-software/claude-code-plugins#8537 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
vladmandic/sdnext#5161 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
severity: low
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 89/100
luainkernel/lunatik#1980 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
go: new version 1.27.3Đang mởout-of-date
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
CachyOS/CachyOS-PKGBUILDS#2022 ·
Maintainer thường phản hồi trong vòng 1 ngày