perf(index): integrate post-#721 catch-up delta into #707 - #733
Conversation
|
|
Retriggering pull_request CI; reopening immediately. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b1baaee82
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let sessions = match ProjectSessionRetirementOwnerV1::from_ready(sessions) { | ||
| Ok(sessions) => sessions, | ||
| Err(sessions) => { | ||
| let reason = sessions.graph_unavailable_reason(); | ||
| owners.sessions = Some(sessions); |
There was a problem hiding this comment.
Retire sessions even when graph attachment failed
When the background relation-graph open settles to Detached—for example, after the corrupt .grafeo case added in this commit—from_ready returns the owner here, and this branch reinserts it and returns an error. Project eviction and remote deletion both call retire_project_session_relation_graph, but the completed open task will never change this detached state, so every retry fails and the relational database can never be retired; handle detached owners with a database-only retirement path as the memory-graph code does.
AGENTS.md reference: AGENTS.md:L156-L158
Useful? React with 👍 / 👎.
| self.project_owners | ||
| .wait_for_session_graph(project_id) | ||
| .await?; |
There was a problem hiding this comment.
Cancel graph startup before waiting for capacity retirement
If session relation-graph startup is slow or stuck, this unbounded wait blocks retire_project_session_relation_graph; the project-capacity reuse path awaits that retirement before admitting another project. The startup task is already retained with cancellation authority and a stored task key, so retirement should cancel/join it instead of waiting indefinitely for background graph work to settle.
AGENTS.md reference: AGENTS.md:L156-L158
Useful? React with 👍 / 👎.
| .tool_activity_publish_running | ||
| .compare_exchange(false, true, Ordering::AcqRel, Ordering::Acquire) | ||
| .is_err() | ||
| { | ||
| return; |
There was a problem hiding this comment.
Preserve activity events while a publish is in flight
Whenever one detached activity write is still running—especially while the session-store writer is busy—every concurrent tool call hits this failed compare-exchange and returns without recording or accumulating its unit. A burst can therefore be persisted as a single call, permanently undercounting dashboard activity and usage data; retain a pending count or coalesce those calls into the next published pulse rather than dropping them.
Useful? React with 👍 / 👎.
|
Behind-the-scenes remake is ready; not merged, and your
That also clears this PR’s Clippy fail ( or merge the branch into this head. I will not land #733. |
cb2d3dc
into
codex/tracedecay-total-redesign-plan-reopened
Nest Unbound|Unavailable or-patterns, collapse the nested hint/witness and session-drain ifs, and box the large Attached graph-owner payload so clippy::all matches what #733 CI already failed on.
Summary
codex/code-index-catchup-pipeline(source head6f6d6e4062) into feat: consolidate TraceDecay V2 PR8-PR13 delivery #707 after the exact perf(index): substantially accelerate text catch-up #721 landing merge8b1afa2e.tracedecay_usecases::retentionauthority and addingDurableGenerationCardinalityV1there; no obsoletecrate::retentionpath is resurrected.branch_generations.rsnow uses the relocated retention path. Merge commit3b1baaee82.Concurrent with the #728-into-#707 integration. Re-fetch/remerge #707 after that PR lands if the histories diverge.
Test plan
--all-features, isolated target)