fix: agent_model reflects most recently used model, not genesis value
Two contributing bugs, both root-caused in musehub#132: - MusehubIdentity.agent_model was seeded once at first-ever auto-provisioning and never refreshed. - The derived-agent seed query ordered by commit timestamp ascending, picking the oldest commit instead of the newest.
Adds latest_agent_model_id() as the single source of truth for an agent's current model, computed live from its most recent commit across all repos. Wired into all three read sites that previously trusted the stale identity.agent_model column: the profile page's _resolve_identity, the derived-agent fallback branch, and build_profile_manifest (used by the profiles API and MCP tool).
sha256:a0ca8d1a4c81154489ff38bd6454fe654acdc5de66e5d42ebdae4cd01b6b078f
sha
+21
~2
symbols
sha256:271692dc2fa9c8ca85c4f38a2e9df4c937fdb2feedfb07ba7902b03c5d9f1dd3
snapshot
+21
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes
23 symbols
+
test_build_profile_manifest_uses_live_model_for_agent
function
async_function test_build_profile_manifest_uses_live_model_for_agent L170–188
+
test_latest_agent_model_id_returns_newest_commit
function
async_function test_latest_agent_model_id_returns_newest_commit L58–66
+
test_latest_agent_model_id_returns_none_without_commits
function
async_function test_latest_agent_model_id_returns_none_without_commits L70–75
+
test_resolve_identity_derived_agent_uses_newest_commit
function
async_function test_resolve_identity_derived_agent_uses_newest_commit L149–161
+
test_resolve_identity_human_unaffected
function
async_function test_resolve_identity_human_unaffected L125–140
+
test_resolve_identity_registered_agent_falls_back_when_no_commits
function
async_function test_resolve_identity_registered_agent_falls_back_when_no_commits L106–121
+
test_resolve_identity_registered_agent_uses_live_model
function
async_function test_resolve_identity_registered_agent_uses_live_model L84–102
← Older
Oldest on fix/agent-model-staleness
All commits
Newer
docs: record #132 fix — agent_model now computed live, not genes…
sha256:dc7111f654d6ad51046d4b2eac86c54c592b9df7f94a53f734d9109e49a0ec5a
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:a0ca8d1a4c81154489ff38bd6454fe654acdc5de66e5d42ebdae4cd01b6b078f --body "your comment"
No comments yet. Be the first to start the discussion.