fw metrics: quoted last_update timestamps crash the stale-task integer test
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Bắt đầu bằng cách đọc metrics.sh quanh các dòng 96–99 và _date_to_epoch trong compat.sh, các dòng 32–57; tái hiện bằng một tệp tác vụ có giá trị last_update được đặt trong dấu ngoặc kép. Báo cáo đề xuất loại bỏ dấu ngoặc kép trong metrics.sh hoặc sửa hành vi fallback trong compat.sh. Hoàn tất khi các dấu thời gian được đặt trong dấu ngoặc kép không còn gây ra lỗi biểu thức số nguyên và báo cáo chỉ số vẫn xử lý an toàn các ngày không hợp lệ.
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.769
- Project: 1409-sprind (shared-tooling mode)
- Reported: 2026-09-21T15:49:38Z
Description
Symptom
fw metrics prints its report but also emits repeated stderr noise:
metrics.sh: line 99: [: 0
0: integer expression expected
The occurrence count scales with the number of active tasks whose last_update:
frontmatter is YAML-quoted (observed 25x in a 49-active-task repo this run).
Root cause, traced to source
metrics.sh:96extracts the timestamp:grep "^last_update:" "$f" | sed 's/last_update: //' | cut -dT -f1.
When the YAML value is single-quoted (e.g.last_update: '2026-09-19T12:26:14Z'— which
fw bvp estimate/fw task updatewrite whenever the YAML dumper judges a quote necessary),
thecut -dT -f1leaves a stray leading quote:'2026-09-19.date -d "'2026-09-19"fails to parse (tested live:date: invalid date "'2026-09-19"),
and so do the BSD-date and python3 fallbacks inside_date_to_epoch(compat.sh:32-57)._date_to_epoch's final fallback (compat.sh:56-57) doesecho "0"; return 1— it prints
"0" to stdout and signals failure.- The caller,
metrics.sh:98, islast_ts=$(_date_to_epoch "$last_update" 2>/dev/null || echo 0).
Because step 3 returned exit code 1, the||fires too, appending a second "0".last_ts
is now the two-line string"0\n0". metrics.sh:99:if [ "$last_ts" -lt "$seven_days_ago" ] && ...— a two-line value fed to
[ -lt ]produces exactly the observed error text.
Minimal repro
f=.tasks/active/<any task with a quoted last_update:>.md
raw=$(grep "^last_update:" "$f" | sed 's/last_update: //' | cut -dT -f1)
date -d "$raw" +%s # fails with a leading-quote artifact
Suggested fix
Either (a) strip surrounding quotes before cut in metrics.sh:96 (e.g. pipe through
tr -d "\"'" first), or (b) make _date_to_epoch's final fallback silent (no echo) and let
callers own their own || echo 0, removing the double-echo. (a) is the smaller, more local fix.
Context
Found while investigating WR3-05 (SPRIND Streichliste value-review round 3), which observed
the symptom once without root-causing it. .agentic-framework/ is vendored/read-only in that
project (T-1017), so this report is filed rather than patched locally.
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:cli bug severity:low status:fixed-on-bleeding-edge 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 · 5 bình luận ·
-
area:cli bug severity:medium status:fixed-on-bleeding-edge 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 · 5 bình luận ·
-
area:context bug severity:low status:fixed-on-bleeding-edge 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 · 5 bình luận ·
-
area:docs bug severity:medium status:in-progress 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 · 4 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ự
-
e2e-failure ready-to-code
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
redhat-developer/rhdh-plugin-export-overlays#4485 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue spells
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
maintenance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
fix(session-flow): redact.py misses bare sk-ant-oat01- tokens and stateless ghs_ tokens with dotsĐang mởneeds-human
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
melodic-software/claude-code-plugins#9026 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug raised-by:verifier
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
medici-finance/assay#4008 ·
Maintainer thường phản hồi trong vòng 1 ngày