Skip to content

fix: close remaining gaps — #839 doc, #829 env consolidation - #907

Merged
Sinity merged 1 commit into
masterfrom
feature/fix/batch-closeable-2
May 7, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/fix/batch-closeable-2

Conversation

@Sinity

@Sinity Sinity commented May 7, 2026

Copy link
Copy Markdown
Owner

#839: resilience fallback doc. #829: consolidate 4 os.environ.get() calls through load_polylogue_config().

…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]>
Copilot AI review requested due to automatic review settings May 7, 2026 12:45
@Sinity
Sinity merged commit ba83bfb into master May 7, 2026
@Sinity
Sinity deleted the feature/fix/batch-closeable-2 branch May 7, 2026 12:45
@coderabbitai

coderabbitai Bot commented May 7, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 47 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 89abf237-cacb-4a0c-80f3-60286c9b2176

📥 Commits

Reviewing files that changed from the base of the PR and between 92f2335 and 42692ed.

📒 Files selected for processing (5)
  • polylogue/archive/message/model_runtime.py
  • polylogue/cli/query_progress.py
  • polylogue/cli/shared/formatting.py
  • polylogue/logging.py
  • polylogue/pipeline/services/validation_flow.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fix/batch-closeable-2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread polylogue/cli/shared/formatting.py Resolved
Comment thread polylogue/logging.py Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and POLYLOGUE_SCHEMA_VALIDATION reads through load_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.

Comment on lines +10 to +22
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
Comment thread polylogue/logging.py
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"})
Comment thread polylogue/logging.py
from polylogue.config import load_polylogue_config

import logging
import os
Comment on lines +34 to +37
if env_var == "POLYLOGUE_SCHEMA_VALIDATION":
raw = str(load_polylogue_config().get("schema_validation", default))
else:
raw = os.environ.get(env_var, str(default))
Comment on lines +15 to +19
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
Comment on lines 24 to +26
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
Comment on lines 19 to 22
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)

Comment on lines 53 to 56
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:
Sinity added a commit that referenced this pull request May 7, 2026
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
Sinity added a commit that referenced this pull request May 7, 2026
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
@Sinity

Sinity commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

  • 64.F057 / P1: fixed-already at the checked revision: polylogue/logging.py:332-335 checks for bool before the string-specific lower() call. TOML or environment coercion producing force_plain=true now sets the boolean directly and does not raise AttributeError during logging initialization.

Only the rows listed above are dispositioned. Held findings remain open.

@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

  • 60.F058 / P1: fixed-already at the checked revision: polylogue/cli/shared/formatting.py:15 now takes already-resolved force_plain and no_color values. The startup predicate only checks those values and terminal status; it no longer calls an undefined configuration loader.

Only the rows listed above are dispositioned. Held findings remain open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants