Fix: remove session model hook route#108
Open
ivke995 wants to merge 9 commits into
Open
Conversation
davidabram
reviewed
Jul 1, 2026
4628b81 to
fd4bd54
Compare
Remove the session-model hook subcommand from CLI parsing and runtime dispatch, and stop generating the Claude SessionStart hook that invoked it. Keep the existing session_models database fallback in place for later cleanup tasks. Plan: remove-session-models-direct-claude-model-id Task: T01 Co-authored-by: SCE <sce@crocoder.dev>
Remove the session_models migration/API surface and stop resolving diff-trace attribution from session-level fallback rows. Keep diff_traces.payload_type as the active 015 migration after retiring the old session_models migration, with direct payload metadata persisted as-is. Plan: remove-session-models-direct-claude-model-id Tasks: T02 Plan: claude-rust-diff-trace Tasks: T03 Co-authored-by: SCE <sce@crocoder.dev>
Extract model metadata from supported Claude PostToolUse diff-trace payloads, normalize Claude model IDs with the claude/ prefix, and persist nullable direct attribution through the existing diff_traces insert path. Update tests for present, nested, and omitted Claude model metadata. Plan: remove-session-models-direct-claude-model-id Task: T03 Co-authored-by: SCE <sce@crocoder.dev>
Rename the diff-trace persistence test to reflect that model and tool metadata now come directly from the payload, and mark the session-model fallback removal task complete. Plan: remove-session-models-direct-claude-model-id Task: T04 Co-authored-by: SCE <sce@crocoder.dev>
Clarify that diff_traces.model_id is the only active model-attribution storage for diff traces. Document best-effort Claude model metadata extraction and nullable missing attribution, and remove stale current-state wording about active session-model intake. Plan: remove-session-models-direct-claude-model-id Task: T05 Co-authored-by: SCE <sce@crocoder.dev>
Plan: remove-session-models-direct-claude-model-id Task: T06 Record final validation evidence, success-criteria checks, and residual risk notes for the session-model removal plan.
Remove the RETIRED_AGENT_TRACE_MIGRATION_IDS constant, the DbSpec::retired_migration_ids() trait method, all overrides, and the retired-IDs filtering logic in migration_metadata_problems(). This mechanism was introduced to accommodate already-upgraded databases with the old 015_create_session_models migration, but all development databases have since been recreated and no ongoing compatibility is needed. Also remove the unused MAX_TRACE_FILE_CREATE_ATTEMPTS constant from hooks/mod.rs (dead code). Update context files to reflect the removal and add a follow-up note to the predecessor completed plan.
Stop requiring the session_models table for trace DB readiness and remove session model counts from trace status statistics, text output, JSON output, aggregation, and related tests. Co-authored-by: SCE <sce@crocoder.dev>
Avoid returning Result from the internal diff-trace persistence helper since errors are already handled fail-open and converted into user-facing status messages by the caller.
18bfa85 to
1e456bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.