fw metrics: quoted last_update timestamps crash the stale-task integer test
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
まず、96~99行付近の metrics.sh と、compat.sh の32~57行にある _date_to_epoch を読みます。last_update の値が引用符で囲まれているタスクファイルを使って再現してください。報告では、metrics.sh で引用符を取り除くか、compat.sh のフォールバック動作を修正することが提案されています。引用符で囲まれたタイムスタンプが整数式エラーを発生させなくなり、メトリクスレポートが無効な日付を引き続き安全に処理できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Shell
- スター
- 16
- フォーク
- 6
- 平均マージ
- 6時間 24分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DimitriGeelen/agentic-engineering-framework のほかの issue
-
area:cli bug severity:low status:fixed-on-bleeding-edge triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
DimitriGeelen/agentic-engineering-framework#100 · コメント 5 件 ·
-
area:cli bug severity:medium status:fixed-on-bleeding-edge triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
DimitriGeelen/agentic-engineering-framework#97 · コメント 5 件 ·
-
area:context bug severity:low status:fixed-on-bleeding-edge triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
DimitriGeelen/agentic-engineering-framework#96 · コメント 5 件 ·
-
area:docs bug severity:medium status:in-progress triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
DimitriGeelen/agentic-engineering-framework#95 · コメント 4 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
DimitriGeelen/agentic-engineering-framework の issue をすべて見る
似ている issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
melodic-software/claude-code-plugins#9619 ·
メンテナーはふだん 1 日以内に返信
-
area:ci area:kext enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug CLI documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
openai/codex#56630 · コメント 3 件 · リアクション 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
bioconda/bioconda-recipes#70683 ·
メンテナーはふだん 1 日以内に返信