fw metrics: quoted last_update timestamps crash the stale-task integer test
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
Direzione di ricerca
Inizia leggendo metrics.sh intorno alle righe 96–99 e _date_to_epoch in compat.sh, righe 32–57; riproduci il problema con un file di task il cui valore di last_update sia racchiuso tra virgolette. Il report suggerisce di rimuovere le virgolette in metrics.sh oppure correggere il comportamento di fallback in compat.sh. Il lavoro è completato quando i timestamp tra virgolette non producono più errori nelle espressioni intere e il report delle metriche continua a gestire in modo sicuro le date non valide.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Shell
- Stelle
- 16
- Fork
- 6
- Merge medio
- 6h 24m
- PR unite (30g)
- 5
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DimitriGeelen/agentic-engineering-framework
-
area:cli bug severity:low status:fixed-on-bleeding-edge triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
DimitriGeelen/agentic-engineering-framework#100 · 5 commenti ·
-
area:cli bug severity:medium status:fixed-on-bleeding-edge triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
DimitriGeelen/agentic-engineering-framework#97 · 5 commenti ·
-
area:context bug severity:low status:accepted triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
DimitriGeelen/agentic-engineering-framework#96 · 3 commenti ·
-
area:cli bug severity:medium status:accepted triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DimitriGeelen/agentic-engineering-framework#95 · 3 commenti ·
-
area:watchtower bug severity:low status:released triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
DimitriGeelen/agentic-engineering-framework#94 · 4 commenti ·
Tutte le issue di DimitriGeelen/agentic-engineering-framework
Issue simili
-
e2e-failure ready-to-code
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
redhat-developer/rhdh-plugin-export-overlays#4485 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
maintenance
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
fix(session-flow): redact.py misses bare sk-ant-oat01- tokens and stateless ghs_ tokens with dotsApertaneeds-human
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
melodic-software/claude-code-plugins#9026 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug raised-by:verifier
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
medici-finance/assay#4008 ·
I maintainer di solito rispondono entro 1 giorno
-
bug: `curl NAME` exports an unquoted, uninterpolated command that is not runnableForse già presa @dannyward630 l’ha presa oggi. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
yunaremaia/git-api#61 ·
I maintainer di solito rispondono entro 1 giorno