Skip to content

fix(analysis): aggregate — recover missing task names, open DBs by absolute path - #46

Open
maui314159 wants to merge 1 commit into
adrianco:mainfrom
maui314159:fix/aggregate-task-recovery
Open

maui314159 wants to merge 1 commit into
adrianco:mainfrom
maui314159:fix/aggregate-task-recovery

Conversation

@maui314159

Copy link
Copy Markdown
Contributor

Two fixes for aggregation, both cases where data vanished without an error.

  1. task_for returned "unknown" whenever workspace.yaml was missing. Some archived experiments keep only their retort.db, so their rows aggregated with no task and could not be grouped. Now falls back to sniffing the generated artifacts: both workhorse tasks stamp their identity into every run's output (brazil-bench names its MCP server BrazilianSoccerMcp/brazilian_soccer_mcp and ships Kaggle CSV fixtures; rest-api-crud gets built as bookapi/book-api/bookshop). Returns None — never a guess — when neither signature is found, so an unrecognised experiment still falls through to "unknown" rather than being mislabelled.

  2. Open each DB by absolute path. SQLite's URI opener is unreliable with a relative file: path in mode=ro: depending on the DB's WAL/-shm state it spuriously raises "unable to open database file", which the OperationalError handler below swallows by design. Observed live: 20 of 21 experiment DBs silently dropped out of the aggregate with no error surfaced.

Code-only; no experiment data included.

🤖 Generated with Claude Code

https://claude.ai/code/session_014UvPfQ4piCd1CAKXcdMW7X

Two fixes for local aggregation, both cases where data vanished without
an error.

1. `task_for` returned "unknown" whenever workspace.yaml was missing.
   Some archived local experiments kept only their retort.db, so their
   rows aggregated with no task and could not be grouped. Fall back to
   sniffing the generated artifacts: both tasks stamp their identity into
   every run's output (brazil-bench names its MCP server
   BrazilianSoccerMcp/brazilian_soccer_mcp and ships Kaggle CSV fixtures;
   rest-api-crud gets built as bookapi/book-api/bookshop). Returns None —
   never a guess — when neither signature is found, so an unrecognised
   experiment still falls through to "unknown" rather than being
   mislabelled.

2. Open each DB by ABSOLUTE path. SQLite's URI opener is unreliable with
   a relative `file:` path in mode=ro: depending on the DB's WAL/-shm
   state it spuriously raises "unable to open database file", which the
   OperationalError handler below swallows by design. Observed live: 20
   of 21 local experiment DBs silently dropped out of the aggregate with
   no error surfaced.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant