Repository navigation
feat: store conversations in the home dir, grouped by project (#1122) - #1128
Conversation
|
@infer Can you finalise the work on this PR? make it ready for review. use /ponytail:ponytail /go /go-concurrency |
|
Model: Todos
Pull Request✅ Infer Result: SuccessPR #1128 is finalized, ready for review. Every CI blocker is fixed, all checks pass, and everything is committed and pushed. What was doneCI blockers fixed (commit
Docs updated in the PR (commit Verification: the three previously failing packages pass with Wrap-up: PR retitled Model: Tokens: 14,319,747 in · 49,134 out · 14,368,881 total (83 requests) Tool calls: 115 total · 100% success rate TracesStatsTriggered by edenreich · Infer Action · OSS |
…jects flag loadConversationMetadata scanned the SELECT id, title, count, messages, ... column list with id, project, title, count targets, so the messages JSON landed in the int MessageCount target and every save failed to reload (test + postgres CI red). Move project next to id in the SELECT to match the scan.
…n stores Document the new defaults from #1122: jsonl stores under ~/.infer/projects/<project-slug>/conversations, shared SQLite at ~/.infer/conversations.db, project-scoped listings with --all-projects, and the conversations.project column.
Co-authored-by: Eden Reich <[email protected]>
…regressions - d1: track applied versions in schema_migrations so the non-idempotent project-column migration (007) runs once instead of failing with "duplicate column" on every startup after the first - daemon: resolve the github artifact poller's conversations dir through NewStorageFromConfig so the per-project default applies; reject an empty ConversationsDir in NewArtifactPoller - jsonl: scope ListConversationsNeedingTitles to the current project so the title worker stops re-failing sibling projects' conversations every run - factory: replace orDefault with stdlib cmp.Or - conversations: scope listing by project.Path() to match how sessions are stamped - computer: use unsafe.Add(nil, addr) for the darwin data-symbol deref so go vet's unsafeptr check passes - tests: cover D1 migration idempotency and jsonl cross-project listing
Co-authored-by: Eden Reich <[email protected]>
|
🎉 This PR is included in version 0.185.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Resolves #1122
Store conversations in the home directory, grouped per project, instead of the project directory.
What changed (salvaged work, reviewed and finalized)
projectmetadata field.Projectfield (absolute cwd), stamped in PersistentConversationRepository.SaveConversation. Server backends (postgres, redis, d1) group by this field; postgres/sqlite got a 007 migration adding theprojectcolumn with an index; d1 uses the same shared SQL schema./conversations) scopes to the current project via ListSavedConversations;infer conversations listdoes the same and gets a--all-projectsflag.conversations/conversations.db*entries from .infer/.gitignore. No migration of old project-dir stores - they are orphaned by design.--all-projectscan walk sibling project stores only under the default layout.Fixes on top of the salvaged draft
test/postgresCI jobs were red. The SELECT now listsprojectright afteridto match the scan; storage conformance (sqlite + postgres) is green.--all-projectsflag was read with Flags().GetBool but never registered, so list was permanently project-scoped and the flag silently did nothing. Registered + unit test.Docs in this PR
conversation-storage.md (new Per-Project Grouping section, paths, schema, interface), configuration-reference.md (SQLite path default), directory-structure.md (conversation stores under ~/.infer), commands-reference.md (list scoping + --all-projects), browser-extension-protocol.md (store location).
Follow-up tracking
Verification