Skip to content

slack: metrics/viz/replay demand a path and run id the user cannot know — default to the bot's own last run #49

Description

@Shashankss1205

What happens

The bot writes each run's trace to a generated location like slack-runs/20260802-184219-ded7684e/trace.jsonl — a timestamp and hex id the user never typed and, on a phone, cannot reasonably retype. The reader commands then require exactly that: /grapharc metrics alone replies error: the following arguments are required: path, run_id. To ask about the run the bot itself just narrated, the user must scrape the path out of the previous status message and copy a run id out of a code block.

Observed in a real session: demo stage0metrics → usage error; only metrics slack-runs/…/trace.jsonl 15737eca286d (path and id copied from the bot's own earlier message) worked.

Why it matters

The Slack surface's pitch is "one command away from a phone". The natural follow-up to every run — "show me the numbers / the diagram / the replay" — is precisely the command that fails. The bot has the missing information; it generated it.

What to consider

  • Bare metrics / viz / replay (and trace, diff where sensible) resolve to the most recent run under the bot's own slack-runs/ for that channel (or workdir-wide as a fallback), including the run id when the trace holds exactly one run.
  • Say what was resolved in the reply (metrics for slack-runs/…/trace.jsonl · run 15737eca…), so the default never silently answers about the wrong run.
  • Explicit path+id keeps working unchanged; the confinement check (_confined) applies to the resolved path like any other.

Acceptance criteria

In a fresh channel: demo stage0 then bare metrics answers about that run and names it; bare metrics with no prior run replies with a helpful message, not an argparse usage dump.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions