Skip to content

fix: dashboard Recent lists a planned task twice (row + its draft) #652

Closed

Description

@Jammy2211

Overview

The PyAutoMind dashboard's Recent feed lists a planned task twice: once as its planned.md row and once as the draft prompt that row's - prompt: names. recent_events promises one row per task, and three of the 50 feed rows are duplicates on Mind main today (hpc-keep-off-home-phase-b, interferometer-primary-beam-persistence-mirror, delaunay-nn-numba-remeasure). Reproduced on PyAutoBrain main 678dba7.

Plan

  • In recent_events, treat a planned row and the draft its prompt: names as one task.
  • Keep whichever of the pair has the later date; on a tie keep the planned row (the more specific event, with its own copy payload). This honours the docstring's "appears once, on its latest date".
  • Only dated planned rows take part. An undated planned row hides nothing, so its draft still shows.
  • Add a hermetic test in tests/test_intake_dashboard.py: a planned row naming a dated draft yields exactly one Recent row, and the later date wins in both orders.
  • Run the census check against live Mind: it should print [].

Tier: notify — merge mode: auto-merge on green (in-turn wait, then /prm close-out)

Detailed implementation plan

Affected Repositories

  • PyAutoBrain (primary)

Branch Survey

Repository Current Branch Dirty?
./PyAutoBrain main clean (untracked .worktrees/ only)

Suggested branch: feature/dashboard-recent-planned-dedupe

Implementation Steps

  1. agents/conductors/intake/_intake.py recent_events: build {prompt_path: planned_date} from dated planned rows (first token of prompt:, as _registry_payload does). When adding backlog records, skip a record whose path is in the map and whose date is no later than the planned date. When adding planned rows, skip one whose draft record is dated later.
  2. tests/test_intake_dashboard.py: new tests for the dedupe, including both date orders and an undated planned row.
  3. Run pytest tests/test_intake_dashboard.py and the prompt's census check against live Mind.

Key Files

  • agents/conductors/intake/_intake.py — recent_events
  • tests/test_intake_dashboard.py — Recent-feed tests

Original Prompt

Click to expand starting prompt

Dashboard Recent feed lists a planned task twice: its planned.md row and its draft prompt

Type: bug
Target: PyAutoBrain
Repos:

  • PyAutoBrain
    Themes:
  • dashboard
    Difficulty: small
    Autonomy: safe
    Priority: normal
    Status: formalised
    Consequence: notify
    Witness: a new test in tests/test_intake_dashboard.py builds a Mind with a planned.md row whose - prompt: names a dated draft and asserts recent_events yields exactly one row for that task; against PyAutoMind main (e9c34daa4) the census check below prints the three slugs today and [] after the fix
    Review-minutes: 3
    Unattended: ready
    Lane: any
    Filed: 2026-11-16

The Mind dashboard is generated by PyAutoBrain (agents/conductors/intake/_intake.py),
so the fix lives there; the symptom is on PyAutoMind's dashboard.md / dashboard.html.

Reproduce

Against PyAutoMind main (e9c34daa4), from PyAutoBrain/agents/conductors/intake:

python3 -c "
import _intake as I; from pathlib import Path
c = I.census(Path('<PyAutoMind>'))
paths = {e['path'] for e in c['recent']}
print([e['slug'] for e in c['planned'] if e.get('prompt') in paths
       and any(r['path'] == 'planned.md#' + I._anchor(e['slug']) for r in c['recent'])])"
# ['hpc-keep-off-home-phase-b', 'interferometer-primary-beam-persistence-mirror',
#  'delaunay-nn-numba-remeasure']

On the rendered page these show as pairs, e.g. in Recent:

| 2026-11-12 | filed  | <a href="planned.md#hpc-keep-off-home-phase-b">hpc-keep-off-home-phase-b</a> |
| 2026-11-12 | filed  | <a href="draft/maintenance/workspaces/hpc_keep_temp_off_home_phase_b.md">Phase B: …</a> |
| 2026-11-12 | issued | <a href="planned.md#delaunay-nn-numba-remeasure">delaunay-nn-numba-remeasure</a> |
| 2026-11-05 | filed  | <a href="draft/feature/autolens_profiling/delaunay_nn_numba_optimal_remeasure_after_677.md">…</a> |

Expected

recent_events' own docstring: "One row per task, not per event: a task that was
filed and later issued appears once, on its latest date". A planned row and the draft
its prompt: names are one task, so it should appear once, on the latest of the two
dates. Three of the 50 feed rows are spent on duplicates today.

Actual

recent_events adds every dated backlog record ("filed") and then every dated
planned.md row, with no de-duplication between a planned row and its prompt:.
In-flight rows avoid this because census keys them by prompt (by_prompt).

Likely fix location

PyAutoBrain agents/conductors/intake/_intake.py, recent_events (~line 1502): collect
the prompt paths of the planned rows and skip backlog records whose path is one of
them (the planned row carries the later, more specific event and its own copy payload).
Alternatively keep whichever of the pair has the later date.

Activity

  1. Jammy2211 commented on Nov 16, 2026

    @Jammy2211
    ContributorAuthor

    Library PR opened: #654

    All five gate legs passed:

    • Tests: Brain suite 2197 passed (failures that also occur on main are noted in the PR).
    • Smoke: n/a.
    • Review: independent Opus, CLEAN.
    • Adversary: Sonnet, CLEAN.
    • Heart: scoped to PyAutoBrain, GREEN.

    The effective level is supervised (bug cap), so under --auto the ship sign-off resolved to decide-and-flag. The PR carries decision-taken, and the merge is the human's /prm.

    Workspace impact: (iii) none. This changes the internal renderer only; the dashboard re-renders on the next Mind refresh after merge.

  2. Jammy2211 commented on Nov 16, 2026

    @Jammy2211
    ContributorAuthor

    Shipped

    Merged in #654 (merge 4b96e81).

    • recent_events in agents/conductors/intake/_intake.py now lists a planned task once: the later-dated of its planned.md row and the draft its - prompt: names; a tie keeps the planned row; an undated planned row hides nothing.
    • 3 new tests in tests/test_intake_dashboard.py (two fail on main). On live Mind the three duplicated rows are gone and the feed stays at 50 rows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions