Repository navigation
fix(cli): doctor ledger lock, catalog timeout and host check; sibling watcher starts at the log end - #401
Merged
Conversation
… watcher starts at the log end
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
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.
What
Follow-ups from the cora 0.19.0 agent-reviewer scan (the doctor and sibling findings, verified against the code) plus the three guarded
unwraps cora reported.Why
tole doctorruns could overwrite each other's ledger entry (unlocked load/record/save) and race on the temp file.base_url_okaccepted URLs without a host (https://?x).Changes
doctor.rs:Ledger::updateholds an exclusive advisoryflockondoctor-ledger.json.lock(owner-only) across load/record/save, the same pattern as the agents-root lock (no lock on non-unix, single writer). The catalog tier usesCATALOG_TIMEOUT= 20 s.base_url_okrequires a host after any userinfo and before/,?,#.openai.rs(tole-core, additive):fetch_model_ids_with_timeout;fetch_model_idskeeps its 3 s behaviour for the picker.sibling_watch.rs:SiblingWatcher::from_endstarts at the last line boundary (reads only the tail; a half-written last line is read once complete).tole-cliuses it for the child watcher.main.rs,session_host.rs:if let Some(search) = WebSearchTool::from_env()instead ofis_some()+unwrap().Testing
from_endskips history but sees later activity, and waits for a half-written last line.cargo check --no-default-features(core and cli) pass; cora review --staged clean.