Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Bug: audit.sh reads orchestrator warnings with head -1, truncating multi-line YAML scalars and disabling the TAG-FORMAT-DRIFT branch

Đang mở
#64 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
bash, python, yaml
Lĩnh vực
cli, tooling

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
  1. 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.
  2. YAML quoting artifacts leak into human-facing output: the — escape and the
    continuation backslash. Neither is content.
  3. 2 of 3 warnings are silently discarded. REMOVED: 12 tool(s) and TAG-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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DimitriGeelen/agentic-engineering-framework

Tất cả issue của DimitriGeelen/agentic-engineering-framework

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.