Problem
Sparkline trend indicators in the HTML report match history entries by manifest filename (manifest_file.name — the path basename). This means:
raki run -m /tmp/soda-trend.yaml writes history under soda-trend.yaml
raki run -m ~/dev/soda/raki-eval.yaml writes history under raki-eval.yaml
- Even if both manifests have
name: soda-development, they don't share history
Real-world usage evaluates multiple projects (raki sessions, soda sessions, alcove sessions), each with their own manifest file in different locations. The current filename matching prevents trend accumulation across runs of the same logical evaluation.
Proposed fix
Match history entries by the manifest's name: field (from the YAML content) instead of the filename.
Changes needed
-
HistoryEntry — already has a manifest field. Change append_history_entry() to store manifest.name (the YAML name: field) instead of manifest_file.name (the filename).
-
build_sparkline_data() — already accepts manifest: str. No change needed — callers pass the value.
-
CLI (cli.py) — change the sparkline call from:
manifest=manifest_file.name, # filename
to:
manifest=manifest.name, # YAML name field
-
Backward compatibility — old history entries store filenames. The match will miss them, causing a one-time loss of trend data after upgrade. Document this in the changelog.
-
load_run_ids() and duplicate detection — also uses manifest field. Update find_last_matching_entry() to match by manifest name instead of filename for consistency.
Acceptance criteria
Supersedes
This replaces the original "fallback to unfiltered history" approach. Matching by name is cleaner than falling back — it groups evaluations by intent (what project am I evaluating?) rather than by file path.
Plan
- In
cli.py, change sparkline call from manifest=manifest_file.name to manifest=manifest.name
- In
history.py, change append_history_entry() to store manifest.name (YAML name field) instead of manifest_file.name
- Update
find_last_matching_entry() to match by manifest name for consistency
- Tests: two runs with different filenames but same
name: field share trend history
- Tests: different
name: fields produce separate histories
- Towncrier fragment (
changes/320.feature)
Problem
Sparkline trend indicators in the HTML report match history entries by manifest filename (
manifest_file.name— the path basename). This means:raki run -m /tmp/soda-trend.yamlwrites history undersoda-trend.yamlraki run -m ~/dev/soda/raki-eval.yamlwrites history underraki-eval.yamlname: soda-development, they don't share historyReal-world usage evaluates multiple projects (raki sessions, soda sessions, alcove sessions), each with their own manifest file in different locations. The current filename matching prevents trend accumulation across runs of the same logical evaluation.
Proposed fix
Match history entries by the manifest's
name:field (from the YAML content) instead of the filename.Changes needed
HistoryEntry— already has amanifestfield. Changeappend_history_entry()to storemanifest.name(the YAMLname:field) instead ofmanifest_file.name(the filename).build_sparkline_data()— already acceptsmanifest: str. No change needed — callers pass the value.CLI (
cli.py) — change the sparkline call from:to:
Backward compatibility — old history entries store filenames. The match will miss them, causing a one-time loss of trend data after upgrade. Document this in the changelog.
load_run_ids()and duplicate detection — also usesmanifestfield. Updatefind_last_matching_entry()to match by manifest name instead of filename for consistency.Acceptance criteria
append_history_entry()storesmanifest.name(YAML name field) inHistoryEntry.manifestbuild_sparkline_data()called withmanifest=manifest.namein CLImanifest.namefor matchingname:field share trend historychanges/320.feature)Supersedes
This replaces the original "fallback to unfiltered history" approach. Matching by name is cleaner than falling back — it groups evaluations by intent (what project am I evaluating?) rather than by file path.
Plan
cli.py, change sparkline call frommanifest=manifest_file.nametomanifest=manifest.namehistory.py, changeappend_history_entry()to storemanifest.name(YAML name field) instead ofmanifest_file.namefind_last_matching_entry()to match by manifest name for consistencyname:field share trend historyname:fields produce separate historieschanges/320.feature)