Skip to content

fix: add missing cline and copilot to default agents seed#31

Merged
ashu17706 merged 1 commit intomainfrom
fix/copilot-fk-constraint
Feb 27, 2026
Merged

fix: add missing cline and copilot to default agents seed#31
ashu17706 merged 1 commit intomainfrom
fix/copilot-fk-constraint

Conversation

@ashu17706
Copy link
Contributor

@ashu17706 ashu17706 commented Feb 27, 2026

Summary

  • smriti_session_meta.agent_id has a FOREIGN KEY referencing smriti_agents(id), enforced by PRAGMA foreign_keys = ON
  • Only claude-code, codex, and cursor were seeded in DEFAULT_AGENTS
  • Ingesting copilot (or cline) sessions on a clean DB caused FOREIGN KEY constraint failed because those agent IDs didn't exist in smriti_agents
  • Added cline and copilot entries to the seed data

Closes #30

Test plan

  • bun test test/ingest.test.ts test/db.test.ts — 20 pass, 0 fail
  • Fresh DB: delete ~/.cache/qmd/index.sqlite, run smriti status, then smriti ingest copilot — ingested without FK errors
  • Existing DB: smriti ingest copilot on a DB that already has data — idempotent, no duplicates

🤖 Generated with Claude Code

The smriti_session_meta table has a FOREIGN KEY on agent_id referencing
smriti_agents, but only claude-code, codex, and cursor were seeded.
This caused FK constraint failures when ingesting copilot or cline
sessions on a clean database.

Closes #30

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ashu17706 ashu17706 merged commit 76457f6 into main Feb 27, 2026
5 checks passed
ashu17706 added a commit that referenced this pull request Mar 14, 2026
The smriti_session_meta table has a FOREIGN KEY on agent_id referencing
smriti_agents, but only claude-code, codex, and cursor were seeded.
This caused FK constraint failures when ingesting copilot or cline
sessions on a clean database.

Closes #30

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot mentioned this pull request Mar 14, 2026
4 tasks
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.

Bug: smriti ingest copilot fails with FOREIGN KEY errors on clean Windows DB

1 participant