Repository navigation
fix: close remaining gaps — #839 doc, #829 env consolidation - #907
Conversation
…rtial - #839: add resilience-fallback doc to is_context_dump - #829: consolidate 4 os.environ.get() calls through load_polylogue_config() (logging.py, formatting.py, query_progress.py, validation_flow.py) Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
Warning Rate limit exceeded
To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ 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 (5)
✨ 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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42692ed012
ℹ️ 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
This PR advances the unified configuration work (#829) by routing several previously environment-only toggles through load_polylogue_config(), and adds resilience-fallback documentation related to context/protocol artifact classification (#839).
Changes:
- Route
POLYLOGUE_FORCE_PLAIN,POLYLOGUE_SLOW_QUERY_NOTICE_SECONDS, andPOLYLOGUE_SCHEMA_VALIDATIONreads throughload_polylogue_config(). - Add documentation clarifying that text-based context/protocol classification is a fallback for pre-#839 archive rows.
- Minor refactors in affected modules to align with the shared config layer.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
polylogue/pipeline/services/validation_flow.py |
Starts reading schema validation mode via load_polylogue_config() (but currently has duplicate imports and an unnecessary conditional). |
polylogue/logging.py |
Switches POLYLOGUE_FORCE_PLAIN handling to the shared config layer (currently breaks when config yields True). |
polylogue/cli/shared/formatting.py |
Switches plain-mode forcing to shared config (currently missing the import and breaks when config yields True). |
polylogue/cli/query_progress.py |
Switches slow-query notice threshold to shared config (currently has duplicated/incorrect imports and now-unused os). |
polylogue/archive/message/model_runtime.py |
Documents the “authoritative stored type + fallback heuristics” behavior for context/protocol detection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| from polylogue.config import load_polylogue_config | ||
| from polylogue.paths import blob_store_root | ||
| from polylogue.config import load_polylogue_config | ||
| from polylogue.pipeline.services.process_pool import process_pool_executor | ||
| from polylogue.config import load_polylogue_config | ||
| from polylogue.pipeline.services.validation_runtime import _validate_record_sync, _ValidationOutcome | ||
| from polylogue.config import load_polylogue_config | ||
| from polylogue.pipeline.stage_models import ValidatedRawRecord, ValidateResult | ||
| from polylogue.config import load_polylogue_config | ||
| from polylogue.protocols import ProgressCallback, RawValidationStore | ||
| from polylogue.config import load_polylogue_config | ||
| from polylogue.storage.runtime import RawConversationRecord | ||
| from polylogue.config import load_polylogue_config |
| else: | ||
| env_force = os.environ.get("POLYLOGUE_FORCE_PLAIN") | ||
| env_force = load_polylogue_config().get("force_plain") | ||
| force_plain = bool(env_force and env_force.lower() not in {"0", "false", "no"}) |
| from polylogue.config import load_polylogue_config | ||
|
|
||
| import logging | ||
| import os |
| if env_var == "POLYLOGUE_SCHEMA_VALIDATION": | ||
| raw = str(load_polylogue_config().get("schema_validation", default)) | ||
| else: | ||
| raw = os.environ.get(env_var, str(default)) |
| from polylogue.config import load_polylogue_config | ||
| from polylogue.archive.query.retrieval_candidates import uses_action_read_model | ||
| from polylogue.config import load_polylogue_config | ||
| from polylogue.archive.query.spec import ConversationQuerySpec | ||
| from polylogue.config import load_polylogue_config |
| if TYPE_CHECKING: | ||
| from polylogue.storage.action_events.artifacts import ActionEventArtifactState | ||
| from polylogue.config import load_polylogue_config | ||
| from polylogue.storage.action_events.artifacts import ActionEventArtifactState |
| def plain_forced_by_env() -> bool: | ||
| env_force = os.environ.get("POLYLOGUE_FORCE_PLAIN") | ||
| env_force = load_polylogue_config().get("force_plain") | ||
| return bool(env_force and env_force.lower() not in _FALSEY_ENV_VALUES) | ||
|
|
| def slow_query_notice_threshold() -> float: | ||
| """Return the slow-query notice threshold, allowing local override.""" | ||
| raw_value = os.environ.get("POLYLOGUE_SLOW_QUERY_NOTICE_SECONDS") | ||
| raw_value = load_polylogue_config().get("slow_query_notice_seconds") | ||
| if raw_value is None: |
Two acceptance-criteria leftovers. - #839 (semantic artifacts): adds the resilience-fallback section to `polylogue/archive/message/model_runtime.py` documenting when the runtime classifier falls back from stored `message_type` to inline-text inspection — a behavior PR #836 introduced but had not yet documented in code comments. - #829 (config): consolidates four remaining `os.environ.get()` calls in `cli/query_progress.py`, `cli/shared/formatting.py`, `logging.py`, and `pipeline/services/validation_flow.py` through `load_polylogue_config()`, finishing the env-consolidation pass started in PR #910. Refs #829, #839
Two acceptance-criteria leftovers. - #839 (semantic artifacts): adds the resilience-fallback section to `polylogue/archive/message/model_runtime.py` documenting when the runtime classifier falls back from stored `message_type` to inline-text inspection — a behavior PR #836 introduced but had not yet documented in code comments. - #829 (config): consolidates four remaining `os.environ.get()` calls in `cli/query_progress.py`, `cli/shared/formatting.py`, `logging.py`, and `pipeline/services/validation_flow.py` through `load_polylogue_config()`, finishing the env-consolidation pass started in PR #910. Refs #829, #839
|
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. |
|
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. |
#839: resilience fallback doc. #829: consolidate 4 os.environ.get() calls through load_polylogue_config().