Originally created by: Akarsh-Hegde
Summary
This is a comprehensive staging merge that bundles 275 commits of development work from pre-main into main. The branch has been thoroughly tested through the staging release pipeline and encompasses major features, stability fixes, and infrastructure improvements.
Major Features
1. Multi-Model Provisioning Pipeline (PR [#344])
- Implemented full provisioning of all three required models: LLM, reranker, and embedder
- Added real-time progress tracking for model downloads with heuristic-based speed calculation
- Integrated background downloading with UI feedback during first-run setup
- Addresses the 3-model bootstrapping issue where onboarding previously prefetched only the LLM
2. In-Process OAuth Integration (PR [#338])
- Implemented PKCE-based OAuth flow for Jira and Linear integrations
- Added browser-driven in-process authentication with no external dependencies
- Maintains backward compatibility with token-based fallback
- Reduces credential management friction in the onboarding flow
- Critical fix: Disabled HuggingFace Xet for model downloads to resolve 4+ hour hangs at 57% progress
- Implemented bounded retry-with-resume mechanism for resumable download failures
- Improved robustness of the download loop against transient network errors
- Downloads are now link-bound rather than hanging on stalled checksums
4. In-Process Capture Foundation (Branch: feat/in-process-capture)
- Migrated screen capture to run in-process within the tray binary
- Eliminates dependency on child screenpipe process
- Reduced TCC permission prompts from multiple entries to single "Screen Recording" entry
- Prerequisite for Bucket 2 cutover; Bucket 1 implementation landed in PR [#321]
5. Enhanced Observability
- Auto-sync of OpenObserve dashboards on git push
- Full OTLP tracing export for ML model inference and daemon telemetry
- Structured logging across Python services and Rust daemon
Stability Improvements
- capture: Fall back to OCR when browser accessibility tree is Chrome-only
- etl: Suppress VS Code frames when focused terminal is a coding agent (reduces false activity classification)
- setup: Comprehensive code review findings addressed across multiple PRs (#341, [#342], [#343], [#346], [#347], [#348])
- integrations: Fixed OAuth initialization and removed debug-mode credential leaks
Testing & Validation
- All commits pass
cargo fmt, cargo clippy -D warnings, cargo test
- UI builds successfully with no TypeScript errors
- Security audit passes with no findings
- Staging release pipeline validated with auto-update channel
- Integration tests maintained for ETL pipeline changes
Migration Notes
- No database migrations required for this merge
- Environment variable changes are additive (backward compatible with existing
.env files)
- Existing Jira/Linear token credentials continue to work (OAuth is opt-in)
- No breaking changes to daemon or UI APIs
- [#350]: Fix prefetch Xet hangs
- [#348]: Prefetch speed calculation refinement
- [#346]: Capture frame filtering for coding agents
- [#345]: ETL VS Code terminal suppression
- [#344]: Multi-model provisioning
- [#343]: Prefetch and setup review follow-ups
- [#342]: OAuth review follow-ups
- [#338]: In-process OAuth implementation
Branch Status
- Parent: main (1.62.0)
- Status: All checks passing, ready for merge
- Automated Merge: Enabled via semantic-release after approval
๐ค Generated with Claude Code
Summary by CodeRabbit
Originally posted by: coderabbitai[bot]
๐ Walkthrough
## Walkthrough Prefetch downloads now read `MERIDIAN_PREFETCH_MAX_ATTEMPTS`, disable the Hugging Face Xet transfer path, and retry `snapshot_download(...)` with capped backoff. The `/prefetch_status` comments now describe byte-delta speed tracking and shared mutable state. ## Changes **Prefetch retry flow** |Layer / File(s)|Summary| |---|---| |**Retry config and download loop**`services/agents/routes/prefetch.py`|Parses `MERIDIAN_PREFETCH_MAX_ATTEMPTS` at import time, forces `HF_HUB_DISABLE_XET`, retries `snapshot_download(...)` with exponential backoff up to the configured limit, and updates `/prefetch_status` comments to describe byte-delta speed tracking and shared mutable state.| ## Sequence Diagram(s) :::mermaid sequenceDiagram participant "prefetch.py" as prefetch participant "os.environ" as env participant "hf_constants" as hf participant "snapshot_download" as download prefetch->>env: read MERIDIAN_PREFETCH_MAX_ATTEMPTS prefetch->>hf: set HF_HUB_DISABLE_XET = True prefetch->>download: call snapshot_download(...) download-->>prefetch: raise on failure prefetch->>prefetch: wait with exponential backoff prefetch->>download: retry until max attempts ## Estimated code review effort ๐ฏ 4 (Complex) | โฑ๏ธ ~40 minutes ## Possibly related PRs - [[Meridiona/meridian#349](https://github.com/Meridiona/meridian/issues/349)](https://github.com/Meridiona/meridian/pull/349): Touches the same `services/agents/routes/prefetch.py` progress and speed-tracking code paths. ## Poem > I hopped through retries, soft and slow, > With Xet left out and caches in tow. > A byte-delta breeze sang small and bright, > Till downloads landed snug and right. > ๐
๐ฅ Pre-merge checks | โ 5
โ Passed checks (5 passed)
| Check name | Status | Explanation | | :------------------------: | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | โ Passed | The title accurately reflects that this is a staging-branch merge into main, which matches the PR's overall purpose. | | Description check | โ Passed | The description covers the PR summary, testing, checklist notes, and related PRs, so it is mostly complete despite not matching the template exactly. | | Docstring Coverage | โ Passed | Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. | | Linked Issues check | โ Passed | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | โ Passed | Check skipped because no linked issues were found for this pull request. |โจ Finishing Touches
๐ Generate docstrings
- [ ] Create stacked PR - [ ] Commit on current branch๐งช Generate unit tests (beta)
- [ ] Create PR with unit tests - [ ] Commit unit tests in branch `pre-main`Comment
@coderabbitai helpto get the list of available commands.Originally posted by: Akarsh-Hegde
CodeRabbit Review Findings โ Response
โ Fixed โ
_env_positive_int()parsing logic (lines 95-102)The retry override parsing in
MERIDIAN_PREFETCH_MAX_ATTEMPTSnow properly validates positive integers:Before:
After:
Now rejects
0or negative values with a warning and returns the default (5), consistent with theValueErrorfallback behavior. Prevents invalid settings from being silently converted into different retry policies.โ Fixed โ Try-except block structure (line 150)
Moved the successful download return into an
elseblock for clarity (Ruff TRY300):Before:
After:
โญ๏ธ Skipped โ Performance warning on try-except in loop (PERF203, lines 151-163)
This is a bounded retry loop with max 5 attempts. The performance overhead of try-except at this scale is negligible. The existing
# noqa: BLE001comment already documents the intentional broad exception catch for retry-with-resume semantics. No structural change needed.All pre-push checks pass โ
Ticket changed by: Akarsh-Hegde