Repository navigation
feat(daemon): typed DaemonStatus model for all surfaces (#774) - #792
Conversation
Add Pydantic DaemonStatus model with sub-models for ComponentState, SourceLagItem, IngestionThroughput, FTSReadiness, InsightFreshness. Add build_daemon_status() constructor with daemon liveness check via pidfile. Backward-compatible daemon_status_payload() still returns dict. Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 50 minutes and 23 seconds.Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4d2c791c7
ℹ️ 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".
There was a problem hiding this comment.
Pull request overview
Introduces a typed DaemonStatus Pydantic model in polylogue/daemon/status.py to serve as a shared daemon status representation across multiple surfaces, while keeping the existing dict-based daemon_status_payload() for backward compatibility.
Changes:
- Added Pydantic sub-models and a top-level
DaemonStatusmodel for structured daemon status. - Added
build_daemon_status()plus a pidfile-based liveness check helper. - Extended the legacy
daemon_status_payload()and plain-text formatting to include daemon liveness + component state.
Comments suppressed due to low confidence (1)
polylogue/daemon/status.py:270
daemon_status_payload()builds aDaemonStatus(which already computes DB info / FTS readiness / blob_dir_size_bytes) and then recomputes_db_size_info(),_fts_readiness_info(), and_blob_size_info()again._blob_size_info()does a fullrglob()+stat()walk, so this doubles an expensive filesystem traversal and can also produce inconsistent values if the filesystem changes between calls. Consider reusing the values fromstatus(and pass the already computedwatch_sourcesintobuild_daemon_statusto avoid callingdefault_sources()twice).
status = build_daemon_status(
sources=sources,
browser_capture_spool_path=browser_capture_spool_path,
)
db_info = _db_size_info()
blob_size = _blob_size_info()
fts = _fts_readiness_info()
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if isinstance(value, int | float) and not isinstance(value, bool): | ||
| return int(value) |
Add Pydantic DaemonStatus with liveness check, component state, throughput, FTS/insight readiness. Co-authored-by: Claude Opus 4.7 <[email protected]>
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Add Pydantic DaemonStatus with liveness check, component state, throughput, FTS/insight readiness.