Skip to content

trace --format dot|pdf: the tasks an artifact rests on, as a graph - #33

Merged
Marius1311 merged 1 commit into
mainfrom
trace-graph
Nov 18, 2026
Merged

Marius1311 merged 1 commit into
mainfrom
trace-graph

Conversation

@Marius1311

Copy link
Copy Markdown
Member

Closes #32. A trace can now be drawn: a compact graph of the tasks an artifact rests on, laid out by Graphviz. The design was settled on real traces; the issue records it and what was rejected.

The command

  • analysis-workflow trace <artifact> [key] --format dot prints DOT text.
  • --format pdf --output <file> renders it with Graphviz's dot; a .svg or .png suffix gives that type. Without dot on PATH it says so and names the fix (pixi add graphviz).
  • Graphviz is a conda package of the analysis repo, not a dependency of this package: nothing changes in pyproject.toml.

The picture

  • One node per task: a bar with its name, author and date; a shaded band for what it consumed that no task made, one row per place with a coloured bar and the first three items; a white band for what it produced on this path.
  • Source data in the repo has one colour; each place outside it (another repo, the home directory) has its own, assigned over all tasks of the repo so it is the same in every figure.
  • One arrow per pair of tasks. Only the artifact asked about is highlighted.
  • A one-line title and a small legend of the bars, no wider than a node.

Mermaid goes. --format mermaid and Trace.as_mermaid are removed, so there is one graph format. The trace-lineage skill saves the PDF and gives its path in the report.

Also: task_field(task, "Author" | "Date") reads a task README's header, beside task_id.

+361 −24 lines; version 0.12.0.

Tests: 185 pass, 1 skipped. New, on the DOT text: a node per task and an arrow per pair, the marker on the artifact alone, author and date in the bar; places outside the repo named and coloured the same in two different traces; items past the third counted; no graph for an artifact no task made; the command's dot and pdf forms. CI has no Graphviz, so there the pdf test checks the message; where dot is installed it checks the file. Rendered by hand with Graphviz 14.1.2 on a real branching trace of five tasks: the output matches the agreed design.

Not done: a rendered check of a task that is not in the checkout, and of more than six places outside a repo; both are handled in code and untested by eye.

🤖 Generated with Claude Code

…drawn by Graphviz; release 0.12.0

One node per task: what it produced on this path, and what it consumed that no task made, by where that lives.
One arrow per pair of tasks. Mermaid goes: one graph format.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T16:45:44.064871Z 3008d78 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Marius1311
Marius1311 merged commit 10495d6 into main Nov 18, 2026
3 checks passed
@Marius1311
Marius1311 deleted the trace-graph branch November 18, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

trace: draw the tasks an artifact rests on as a graph (Graphviz)

1 participant