gabriel / musehub public
feat BREAKING task/promote-commit-provenance-columns #1 / 1
AI Agent gabriel · 135 days ago · May 4, 2026 · Diff

feat: promote agent_id, model_id, commit_branch to first-class columns

- Migration 0019: add agent_id, model_id, commit_branch columns to musehub_commits - Wire service writes new columns on every push (+ on_conflict_do_update) - deploy/backfill_provenance_columns.py: backfills 1458 historical rows - Symbol detail timeline shows correct original author branch, agent, and model - UI: agent_id/model_id rendered as purple/blue pill badges in timeline row 2 - TDD: 3 wire push tests + 4 backfill tests (all green)

sha256:166edc6d5441e5d18c7ddf7480692143862fc3222eaa406370e393a9326f48c4 sha
+40 ~3 symbols
sha256:344bd098672a7d6edd6a0e8fc1959c4935c274831561576fe31a177660950021 snapshot
+40
symbols added
~3
symbols modified
0
dead code introduced
Semantic Changes 43 symbols
+ branch_labels variable variable branch_labels L18–18
+ depends_on variable variable depends_on L19–19
+ down_revision variable variable down_revision L17–17
+ downgrade function function downgrade L50–53
+ annotations import import annotations L11–11
+ op import import op L13–13
+ sa import import sa L14–14
+ revision variable variable revision L16–16
+ upgrade function function upgrade L22–47
~ deploy/backfill_provenance_columns.py .py 13 symbols added
+ backfill_provenance_columns function async_function backfill_provenance_columns L43–94
+ AsyncSession import import AsyncSession L20–20
+ annotations import import annotations L13–13
+ argparse import import argparse L15–15
+ asyncio import import asyncio L16–16
+ create_async_engine import import create_async_engine L20–20
+ db import import db L24–24
+ get_database_url import import get_database_url L23–23
+ sa import import sa L19–19
+ sessionmaker import import sessionmaker L21–21
+ time import import time L17–17
+ main function function main L97–108
+ run function async_function run L27–40
+ _insert_commit function async_function _insert_commit L44–65
+ _make_repo function async_function _make_repo L21–41
+ _utc function function _utc L17–18
+ AsyncSession import import AsyncSession L10–10
+ annotations import import annotations L6–6
+ create_repo import import create_repo L14–14
+ datetime import import datetime L9–9
+ db import import db L13–13
+ pytest import import pytest L8–8
+ sa import import sa L11–11
+ timezone import import timezone L9–9
+ test_backfill_dry_run_makes_no_changes function async_function test_backfill_dry_run_makes_no_changes L149–183
+ test_backfill_populates_agent_id_and_model_id function async_function test_backfill_populates_agent_id_and_model_id L69–106
+ test_backfill_populates_commit_branch function async_function test_backfill_populates_commit_branch L110–145
+ test_backfill_skips_already_populated_rows function async_function test_backfill_skips_already_populated_rows L187–223
~ musehub/db/musehub_models.py .py 1 symbol modified
~ tests/test_wire_push_stream.py .py 3 symbols added
+ test_t6_push_commit_branch_empty_when_wire_commit_has_no_branch function async_function test_t6_push_commit_branch_empty_when_wire_commit_has_no_branch L805–835
+ test_t6_push_stores_agent_id_and_model_id_as_columns function async_function test_t6_push_stores_agent_id_and_model_id_as_columns L728–758
+ test_t6_push_stores_commit_branch_from_wire_commit function async_function test_t6_push_stores_commit_branch_from_wire_commit L762–801
← Older Oldest on task/promote-commit-provenance-columns
All commits
Newer → Latest on task/promote-commit-provenance-columns

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:166edc6d5441e5d18c7ddf7480692143862fc3222eaa406370e393a9326f48c4 --body "your comment"