feat: GM Workbench generation scratchpad — GenerationResult (#138) #217
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/138-generation-scratchpad"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Foundation item 3/3 of v3.10.0 GM Workbench. Targets the integration branch. Builds on #134.
Closes #138.
What
The persistence + async-status layer the whole Workbench polls.
GenerationResultmodel (generation_results, migrationf0a1b2c3d4e5):statusTEXT + CHECK (pending/ready/failed), JSONBparams/output/token_usage(none_as_null=True),campaign_idFK CASCADE,session_id/created_bySET NULL,pinned, indexes oncampaign_id+(campaign_id, tool_id).token_usagecaptured from day one for future metering.generation_result_service.py:create_result/mark_ready/mark_failed(thepending→ready/failedlifecycle #136's sync + Celery tools write into),list_results(filter by tool/pinned),set_pinned,delete_result,delete_expired.GET …/workbench/history?tool_id=&pinned=,POST …/history/{id}/pin+/unpin,DELETE …/history/{id}(404 on cross-campaign).prune_generation_resultsbeat task deletes unpinned rows > 30 days; pinned never swept.api/workbench.js+ a minimalGenerationHistorylist (pin/delete/re-open, tool filter), surfaced inCampaignPlanning— the full right-rail is #153.Verification (Docker)
test_workbench_history.py); migrationf0a1b2c3d4e5up/down/up clean against real Postgres 16;ruff check/formatclean.GenerationHistory.test.jsx) + build; eslint 0 errors. (Fixed 4 tests wheregetByText(tool_id)was ambiguous — the id renders in both the row and the filter option; scoped to the row/action button.)🤖 Generated with Claude Code