Skip to content

Fix: remove session model hook route#108

Open
ivke995 wants to merge 9 commits into
mainfrom
fix/remove-session-model-hook-route
Open

Fix: remove session model hook route#108
ivke995 wants to merge 9 commits into
mainfrom
fix/remove-session-model-hook-route

Conversation

@ivke995

@ivke995 ivke995 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread cli/src/services/agent_trace_db/mod.rs Outdated
@ivke995 ivke995 force-pushed the fix/remove-session-model-hook-route branch 2 times, most recently from 4628b81 to fd4bd54 Compare July 1, 2026 15:01
ivke995 and others added 9 commits July 1, 2026 18:02
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.
@ivke995 ivke995 force-pushed the fix/remove-session-model-hook-route branch from 18bfa85 to 1e456bc Compare July 1, 2026 16:03
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.

2 participants