GeezerVison is showing github.com — aggregator: julesSummary presents a previous day's keeper totals as the last run's — the 'freshest note' is picked by lexicographic HHMM key, which rolls over at midnight · Issue #1587 · developing-today/code
aggregator: julesSummary presents a previous day's keeper totals as the last run's — the 'freshest note' is picked by lexicographic HHMM key, which rolls over at midnight #1587Descriptionaggregator: julesSummary presents a previous day's keeper totals as the last run's — the "freshest note" is picked by lexicographic HHMM key, which rolls over at midnight
What
julesSummary in pm-stack/aggregator/src/sources/jules.ts:81-99 picks the keeper run note whose totals it reports by taking the lexicographically largest jules_note_<HHMM> key in the keeper state:
if (/^jules_note_\d+$/.test(k) && typeof v === "string" && k > bestKey) { bestKey = k; bestText = v; }
The key carries a time-of-day only — no date. The keeper state file is long-lived (its items map persists across runs and days), so notes from more than one day coexist, and "largest HHMM" is not "freshest":
- After any run past midnight, yesterday's late-evening note (e.g.
jules_note_2359) outranks every note from today until a run lands after 23:59 — the summary shows yesterday's totals all day.
- An unpadded key the regex happily accepts (
jules_note_905) outranks a padded later one (jules_note_1458: "905" > "1458" lexicographically).
Meanwhile summary.at is taken from state.last_run (jules.ts:84-87) — the actual last run — so the two halves of the summary disagree. The consumer pairs them in one sentence: src/sources/live.ts:1015-1019 renders "last keeper run ${j.at} · last run totals: ${j.total} sessions — …", attributing the stale totals to the fresh run. The collector bakes this summary into the fleet feed (scripts/collect-fleet-feed.ts:438-444,559).
Evidence (verified this run)
Probe on the laptop (Bun 1.4.2) driving the verbatim jules.ts (sha256 15b46caf8b7a052a2b37fcbd6de0bca489a9e5ab9286e77a41f59ba6ccabf5f9, identical on main 7bd79a62 both sides; probe + log in the goal's hidden_files probe-2026-10-27-laneA-julesnote/):
- CONTROL — single note
jules_note_1458 (84 sessions / 77 completed / 6 failed), last_run 2026-10-27T14:58Z → totals 84/77/6. Correct.
- CASE 1 (midnight rollover) — notes
jules_note_2359 (84/77/6, yesterday) + jules_note_0010 (12/3/1, today), last_run 2026-10-28T00:10Z → summary returns 84/77/6 with at = 2026-10-28T00:10Z. The dashboard sentence claims today's 00:10 run listed 84 sessions; it listed 12.
- CASE 2 (stale all day) — notes
jules_note_2359 (84/77/6) + jules_note_0930 (20/9/2), last_run 2026-10-28T09:30Z → returns 84/77/6.
- CASE 3 (unpadded key) — notes
jules_note_905 (50/40/5) + jules_note_1458 (84/77/6), last_run 2026-10-27T14:58Z → returns 50/40/5.
Existing tests (test/slice2.test.ts, "parses keeper totals") cover only the single-note same-day state.
Why it matters
The Jules coverage line is how Drew (and the fleet's own health views) judge whether the Jules keeper is keeping up. After midnight it silently reports the previous day's session totals as the current run's — a wrong-but-plausible number, the worst kind of dashboard defect, and it persists for most of every day once the state file holds a late-evening note.
Acceptance criteria
julesSummary reports the totals of the note written by the run last_run names (e.g. match the note key against last_run's HHMM), or the note selection is otherwise date-aware; when no note can be tied to the last run, the totals are omitted rather than guessed from another run.
- The key comparison, if any remains, is numeric on a zero-padded HHMM (an unpadded
jules_note_905 must not outrank jules_note_1458).
- New tests cover: notes spanning midnight (2359 yesterday + 0010 today), a stale late-evening note alongside a morning note, and an unpadded key.
- The existing single-note test keeps passing;
mapJulesItems is unchanged.
Filed by new-issue-creator-code-a (lane A), 2026-10-27 run. Activitydeveloping-today commented on Oct 28, 2026 dezren39 commented on Oct 28, 2026 🤖 Agent note · state: filed
- Agent: new-issue-creator-code-a
- Session / ID: new-issue-creator-code-a cron run, 2026-10-27 23:35 CDT
- Found via: filed this run
- Task: Triage the julesSummary note-selection defect in pm-stack/aggregator/src/sources/jules.ts — verified this run with a Bun probe on the laptop driving the verbatim jules.ts (sha256 15b46caf…, identical both sides): the "freshest" keeper note is the lexicographically largest jules_note_ key, so a previous day's 2359 note outranks today's notes all day, and an unpadded 905 key outranks 1458; summary.at (from last_run) then attributes the stale totals to the fresh run in live.ts's coverage sentence. Control (single note) correct.
- Expectation: effort/s — tie the totals to the run last_run names (or omit totals when no note matches), numeric padded-HHMM comparison if any remains, plus rollover/unpadded regression tests; filed-only (the fallback when no note matches the last run is a small contract pin for triage).
- Links: probe + log in the goal's hidden_files/probe-2026-10-27-laneA-julesnote/ (probe.ts + out.log)
dezren39 commented on Oct 31, 2026 dezren39 commented on Oct 31, 2026 🤖 Agent note · picked up (resume) → merging
dezren39 commented on Oct 31, 2026 🤖 Agent note · done
- Agent: repo-worker-code (Lane B) · queue task 1847
- Result: PR fix(aggregator): tie julesSummary totals to the last_run note (#1587) #2949 squash-merged (9b689eb); this issue is closed. julesSummary now ties keeper totals to the note written by the run
last_run names, omits totals when no note ties to it, and compares HHMM numerically; rollover/stale/unpadded regression tests included. Verified: Codex clean on 65c8048, bun test test/slice2.test.ts 27/27 on the laptop.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|