Repository navigation
[pull] main from Alishahryar1:main - #251
Merged
Merged
Conversation
## Why Messaging stores conversations and tracked platform messages in a JSON file with delayed whole-file writes and separate file-write coordination. Move that state into `fcc.db` so related changes commit atomically and database constraints protect conversation links. ## How - Add numbered migration 4 for messaging trees, nodes, prompt/status references, tracked messages, and a one-time import receipt, with scoped keys, foreign keys, constraints and indexes. - Give the application ownership of the shared database and process lock. Code and messaging release storage only after their workers drain. - Commit admissions and successor claims before launching harness work. Publish workflow admission counters immediately after successful stop/clear commits, before notifications and cleanup. A failed write preserves those counters and the healthy tree workers. - Permit stop and partial clear while interrupted workers are cleaning up. Apply the cleanup readiness check only to new admissions, and validate delayed failure feedback against surviving runnable status references. - Accepted storage-failure behavior: interrupt the affected conversation and queued replies, retire worker ownership, and report the failure. A later admission reconciles interrupted history in the same transaction as its new change. Completed harness work and interrupted queued prompts are never replayed. No retry scheduler is added. - Keep voice handoff draining outside the workflow lock and platform calls outside SQL. Already cancelled transcriptions remain cancelled if a subsequent tree mutation fails. - Drain workers during shutdown even if their interrupted state cannot be saved. Existing startup normalization handles those saved runnable rows on restart. Publish terminal success only after its save commits. - Import supported legacy formats and both platforms at startup, including when messaging is disabled. Delete the old JSON and writer temporary files after a complete committed import. - Isolate each legacy tree and managed-message write with a savepoint. Reject constraint-invalid or unencodable records without retaining partial trees or references. Reserve reference and message IDs only after successful insertion, so rejected records cannot suppress later valid data. - Commit the actual recovered counts and one-time receipt with the recovered rows. Database failures, receipt failures, and commit failures roll back the entire import and preserve its source for retry. - Accepted import behavior: recover valid records or start fresh, preserve incomplete originals, and show a one-time nonblocking warning. Later startups intentionally do not repeat that notice or reimport the retained source. Cleanup failures continue to warn and retry cleanup. No manual repair or confirmation is required. - Preserve native continuation IDs, literal prompt-versus-status reply links, and managed-message retention. Remove the JSON writer, debounce timers, persistence cache and flush machinery, and update the smoke inventory. - Correct two existing browser-test synchronization defects: wait for the captured OpenAI login request and keep simulated Claude Desktop startup state consistent across its two status endpoints. - Updates require FCC to be stopped. Externally modified SQLite files remain outside the supported contract. <!-- greptile_comment --> <!-- greptile_summary --> <h2><a href="https://app.greptile.com/api/retrigger?id=70108129"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a>Confidence Score: 5/5</h2> <!-- greptile-risk --> No blocking findings remain. The outstanding import-warning issue is non-blocking. <h2><a href="https://app.greptile.com/api/ide/codex?prompt=IMPORTANT%3A%20Work%20in%20the%20repository%20%22alishahryar1%2Ffree-claude-code%22%20on%20the%20existing%20branch%20%22ali%2Fmessaging-sqlite%22.%20Checkout%20that%20branch%20%E2%80%94%20do%20NOT%20create%20a%20new%20branch%20or%20open%20a%20new%20PR.%20Push%20your%20changes%20to%20%22ali%2Fmessaging-sqlite%22.%0A%0A%23%23%23%20Issue%201%0Asrc%2Ffree_claude_code%2Fruntime%2Fmessaging_import.py%3A188-190%0AA%20partial%20or%20unreadable%20import%20keeps%20the%20original%20history%20file%2C%20but%20its%20receipt%20makes%20later%20startups%20return%20without%20a%20warning.%20Users%20who%20miss%20the%20first%20warning%20may%20not%20realize%20that%20some%20history%20was%20not%20restored.%20This%20is%20a%20non-blocking%20visibility%20issue.%0A%0ANote%3A%20If%20this%20suggestion%20doesn't%20match%20your%20team's%20coding%20style%2C%20reply%20to%20this%20and%20let%20me%20know.%20I'll%20remember%20it%20for%20next%20time!%0A%0A---%0A%0AFor%20each%20issue%20above%2C%20determine%20whether%20it%20is%20valid%20and%20should%20be%20fixed.%20If%20so%2C%20fix%20it%20directly.&repo=alishahryar1%2Ffree-claude-code&pr=1919&platform=github"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodexDark.svg?v=7"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodex.svg?v=7"><img alt="Fix All in Codex" src="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodex.svg?v=7" align="right"></picture></a>Findings</h2> 1. <img alt="P2" src="https://greptile-static-assets.s3.amazonaws.com/badges/p2.svg?v=9" align="top"> **Import warning disappears** <a href="https://github.com/Alishahryar1/free-claude-code/pull/1919#discussion_r4114540349">▶</a> <details open><summary>Summary</summary> The PR moves messaging trees and managed-message history into the application-owned SQLite database. It adds a one-time legacy JSON import that rejects invalid records while preserving the source after a partial import, and updates messaging and browser-test coverage. </details> <!-- greptile_confidence_score:5 --> <sub>Reviews (4) · Last reviewed commit: ["Recover malformed legacy messaging recor..."](https://github.com/alishahryar1/free-claude-code/commit/3dfb1e4d1cb641699df8bfc403e8bdbe5f3e9409)</sub> <!-- /greptile_comment -->
This branch had an error being deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )