Skip to content

Property tests for path/git-ref validators and backend resolver (#70, #72) - #224

Merged
leynos merged 9 commits into
mainfrom
proptest-validators-backend
Jul 27, 2026
Merged

Property tests for path/git-ref validators and backend resolver (#70, #72)#224
leynos merged 9 commits into
mainfrom
proptest-validators-backend

Conversation

@leynos

@leynos leynos commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

Adds Hypothesis property-based coverage for the argument validators (safe_path, git_ref) and the stream-backend resolver, backed by small refactors that expose pure, verifiable seams.

Changes

cuprum/builders/args.py (#70)

  • Introduce PathRejection and GitRefRejection enums whose member values are the exact error messages, and classify_path_string / classify_git_ref helpers that return the first failing category (or None).
  • The validators now raise from the classifier, so the rejection reason is inspectable rather than pass/fail only. Existing behaviour and messages are unchanged.

cuprum/_backend.py (#72)

  • Split a pure _resolve_backend(requested, rust_available) decision from the cached, environment-reading, logging wrapper, plus _probe_rust_availability encapsulating each mode's probe-failure policy.
  • All existing structured log events are preserved (resolution debug, forced-unavailable warning, auto-probe-failed debug).

Tests

  • test_args_validators_property.py: totality, validator/classifier consistency, and category coverage (NUL, .. segments, whitespace, leading dash), plus round-trip/idempotence for valid inputs.
  • test_backend_resolver_property.py: the resolver never leaks AUTO, honours PYTHON, respects forced-Rust availability, and env parsing rejects invalid values (only empty/auto resolve to AUTO).
  • Regenerated the test_maturin_build wheel-manifest snapshot to include the two new modules.

Verification

make check-fmt lint typecheck test markdownlint all green (779 Python items, 33 Rust nextest).

Closes #70
Closes #72

🤖 Generated with Claude Code

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Separate Rust availability probing from backend resolution, add public path and git-ref rejection classifiers, and introduce Hypothesis property tests covering validators, backend selection, environment parsing, documentation, and wheel contents.

Changes

Backend and argument validation

Layer / File(s) Summary
Stream-backend probing and resolution
cuprum/_backend.py, cuprum/unittests/test_backend.py, cuprum/unittests/test_backend_resolver_property.py, cuprum/unittests/__snapshots__/test_maturin_build.ambr, docs/developers-guide.md, docs/cuprum-design.md
Separate environment parsing, Rust probing, and pure backend mapping while preserving forced-Rust errors, structured logging, property coverage, documentation, and packaged test entries.
Path and git-ref rejection classifiers
cuprum/builders/args.py, cuprum/unittests/test_args_validators_property.py, docs/developers-guide.md
Add ordered rejection enums and classifier helpers, reuse classifier messages in validators, and test rejection categories and valid round trips.

Sequence Diagram(s)

sequenceDiagram
  participant get_stream_backend
  participant _probe_rust_availability
  participant _resolve_backend
  get_stream_backend->>_probe_rust_availability: Probe Rust availability
  _probe_rust_availability-->>get_stream_backend: Return availability state
  get_stream_backend->>_resolve_backend: Resolve requested backend
  _resolve_backend-->>get_stream_backend: Return Rust/Python or raise ImportError
Loading

Possibly related PRs

Suggested labels: Issue

Poem

Rust waits by the gate,
Python keeps the stream awake,
Paths name each mistake,
Git refs reject the ache,
Fuzzers test each trail,
Wheels carry the tale.

🚥 Pre-merge checks | ✅ 19 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Developer Documentation ⚠️ Warning docs/cuprum-design.md still says get_stream_backend() delegates to _check_rust_available(), which conflicts with the new probe→resolve seam. Rewrite Section 13.4 to keep one authoritative backend model: remove the stale _check_rust_available() delegation wording and align the prose/diagram with the implemented _parse_backend_value_probe_rust_availability → `resolve...
✅ Passed checks (19 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the PR scope and includes the linked issue references #70 and #72.
Description check ✅ Passed The description directly describes the validator and backend resolver changes in this changeset.
Linked Issues check ✅ Passed The PR adds the requested Hypothesis coverage and pure backend resolution seams, and the tests cover the stated behaviours for #70 and #72.
Out of Scope Changes check ✅ Passed The changes stay within the validator, backend, test, snapshot, and documentation work required by the linked issues.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Testing (Overall) ✅ Passed PASS: The new Hypothesis suites cross-check classifier outputs, validator exceptions, backend resolution, and logging, with cache isolation via an autouse reset; they would fail on plausible regres...
User-Facing Documentation ✅ Passed PASS: The PR only adds internal classifier/probe seams; docs/users-guide.md already covers the public validators and backend selection, and it is not changed here.
Module-Level Documentation ✅ Passed PASS: Every changed Python module carries a top-level docstring naming its role, utility, and links to related components where needed.
Testing (Unit And Behavioural) ✅ Passed PASS: the new properties target pure helper seams, while public get_stream_backend/is_rust_available and pipeline-dispatch tests cover the functional boundary; no E2E gap here.
Testing (Property / Proof) ✅ Passed Hypothesis properties now pin the new path/git-ref and backend invariants across input ranges, and no exhaustive proof is needed here.
Testing (Compile-Time / Ui) ✅ Passed PR introduces no compile-time (Rust/TypeScript) outputs. Structured logging is tested via caplog with focused assertions on event types and key fields. Validator error messages are property-tested...
Unit Architecture ✅ Passed PASS: The PR splits env parsing, probing, and resolution into pure/impure seams, keeps side-effects at get_stream_backend’s boundary, and tests the seams directly.
Domain Architecture ✅ Passed PASS: Keep the new pure helpers in boundary modules; the PR isolates env/path concerns from the domain and leaves domain code untouched.
Observability ✅ Passed Backend resolution logs at probe, decision, and failure boundaries with bounded fields (requested_backend, resolved_backend, rust_available, event); no metrics/tracing are needed.
Security And Privacy ✅ Passed PASS: The PR only refactors validators/backend resolution and adds tests/docs; no credentials, auth changes, over-broad permissions, or sensitive-data exposure appear in the touched files.
Performance And Resource Use ✅ Passed Pure helpers and fixed-size checks add no unbounded loops or repeated I/O; backend probing stays cached and property tests are bounded.
Concurrency And State ✅ Passed Backend state stays behind one owner (set_rust_availability_for_testing), caches are explicitly cleared, and the new helpers are pure; no async/lock/interleaving risk was added.
Architectural Complexity And Maintainability ✅ Passed The new enums and backend seams are small, explicit testability helpers with documented reuse; public API stays unchanged and no extra layers, deps, or hidden lifecycle hooks were added.
Rust Compiler Lint Integrity ✅ Passed Patch touches only docs; no Rust sources, lint suppressions, or clone changes appear in the diff.
📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #72

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch proptest-validators-backend

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

codescene-access[bot]

This comment was marked as outdated.

@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: 1637734d72

ℹ️ 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 cuprum/unittests/test_backend_resolver_property.py Outdated
Comment thread cuprum/builders/args.py Outdated
Comment thread cuprum/unittests/test_args_validators_property.py Outdated
codescene-access[bot]

This comment was marked as outdated.

@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
cuprum/_backend.py (1)

211-286: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Move the Rust probe inside the try block (cuprum/_backend.py:272-283). Forced RUST failures can raise from _probe_rust_availability() before the except ImportError handler, so the "Rust stream backend requested but unavailable" warning never runs on that path. Initialise rust_available = None, call the probe inside the try, and log both forced-backend failure paths.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cuprum/_backend.py` around lines 211 - 286, Update get_stream_backend so
rust_available is initialized to None and _probe_rust_availability(requested)
runs inside the existing try block before _resolve_backend. Keep the ImportError
warning handler covering both probe and resolution failures, then preserve
normal resolution logging and return behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cuprum/unittests/test_backend_resolver_property.py`:
- Around line 101-121: Update test_read_backend_env_rejects_invalid_values so
the valid branch asserts the exact expected StreamBackend member for each
normalized input, rather than only checking membership in set(StreamBackend).
Preserve the existing AUTO checks for empty and "auto", and verify every other
valid value maps to its corresponding enum member.

---

Outside diff comments:
In `@cuprum/_backend.py`:
- Around line 211-286: Update get_stream_backend so rust_available is
initialized to None and _probe_rust_availability(requested) runs inside the
existing try block before _resolve_backend. Keep the ImportError warning handler
covering both probe and resolution failures, then preserve normal resolution
logging and return behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b2101eb8-a093-4e90-9dd9-8f3b4552cb47

📥 Commits

Reviewing files that changed from the base of the PR and between aa1fd32 and 1637734.

📒 Files selected for processing (5)
  • cuprum/_backend.py
  • cuprum/builders/args.py
  • cuprum/unittests/__snapshots__/test_maturin_build.ambr
  • cuprum/unittests/test_args_validators_property.py
  • cuprum/unittests/test_backend_resolver_property.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/shared-actions (auto-detected)
  • leynos/pylint-pypy-shim (auto-detected)
  • leynos/whitaker (auto-detected)

Comment thread cuprum/unittests/test_backend_resolver_property.py Outdated
codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot added the Issue label Jul 26, 2026

@coderabbitai coderabbitai 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.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cuprum/_backend.py`:
- Around line 48-81: The private helper _parse_backend_value has an
unnecessarily elaborate public-style docstring; replace it with a concise
single-line summary. Apply the same documentation-only change to the private
helper _resolve_backend, removing its Parameters, Returns, Raises, and Examples
sections while preserving both implementations unchanged.
- Around line 298-313: Update get_stream_backend so its try/except ImportError
encloses both _probe_rust_availability and _resolve_backend, ensuring
probe-raised failures receive the same cuprum.stream_backend_unavailable warning
and structured context as resolution failures. Preserve the existing requested,
rust_available, and resolved values for logging, while handling the
probe-failure case without referencing an uninitialized rust_available value.

In `@cuprum/unittests/test_args_validators_property.py`:
- Line 55: Update every assertion in the property tests, including the
assertions around result types, accepted and rejected paths, and validator
outcomes, to include a concise diagnostic message using the assertion’s
invariant. Preserve each existing assertion condition and add messages that make
shrunk Hypothesis counterexamples identify the failed expectation.

In `@cuprum/unittests/test_backend_resolver_property.py`:
- Around line 37-119: Group the five property tests into related test classes,
such as resolver behavior and backend-value parsing, while preserving each
test’s existing assertions and Hypothesis decorators. Convert each function into
a test_ prefixed method within its appropriate class, including the existing
resolver helpers and parser symbols unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1a24acdc-23ca-44ec-ae70-7133aa5378cc

📥 Commits

Reviewing files that changed from the base of the PR and between aa1fd32 and 7684962.

📒 Files selected for processing (6)
  • cuprum/_backend.py
  • cuprum/builders/args.py
  • cuprum/unittests/__snapshots__/test_maturin_build.ambr
  • cuprum/unittests/test_args_validators_property.py
  • cuprum/unittests/test_backend_resolver_property.py
  • docs/developers-guide.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/shared-actions (auto-detected)
  • leynos/pylint-pypy-shim (auto-detected)
  • leynos/whitaker (auto-detected)

Comment thread cuprum/_backend.py
Comment thread cuprum/_backend.py
def test_classify_path_string_is_total(raw: str, *, allow_relative: bool) -> None:
"""``classify_path_string`` returns a value or ``None`` but never raises."""
result = classify_path_string(raw, allow_relative=allow_relative)
assert result is None or isinstance(result, PathRejection)

@coderabbitai coderabbitai Bot Jul 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add diagnostic messages to every assertion.

Attach a failure message to each assertion so shrunk Hypothesis counterexamples identify the broken invariant immediately. As per coding guidelines, use assert …, "message" over bare asserts. As per path instructions, use assert …, "message" over bare asserts.

Also applies to: 65-65, 69-69, 75-75, 85-87, 96-100, 107-107, 115-119, 125-125, 137-138

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cuprum/unittests/test_args_validators_property.py` at line 55, Update every
assertion in the property tests, including the assertions around result types,
accepted and rejected paths, and validator outcomes, to include a concise
diagnostic message using the assertion’s invariant. Preserve each existing
assertion condition and add messages that make shrunk Hypothesis counterexamples
identify the failed expectation.

Sources: Coding guidelines, Path instructions

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@coderabbitai Has this now been resolved in the latest commit?

Use codegraph analysis to determine your answer.

If this comment is now resolved, please mark it as such using the API. Otherwise, please provide an AI agent prompt for the remaining work to be done to address this 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.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== Current PR head =='
git rev-parse HEAD

echo '== Code-structure outline =='
ast-grep outline cuprum/unittests/test_args_validators_property.py --items all --type function

echo '== Assertion AST nodes =='
ast-grep run --pattern 'assert $COND, $MSG' --lang python cuprum/unittests/test_args_validators_property.py || true
echo '-- bare assertion AST nodes --'
ast-grep run --pattern 'assert $COND' --lang python cuprum/unittests/test_args_validators_property.py || true

echo '== Assertion source context =='
rg -n -C 1 '^\s*assert\b' cuprum/unittests/test_args_validators_property.py

echo '== Matching review threads =='
gh api graphql \
  -F owner='leynos' \
  -F name='cuprum' \
  -F number=224 \
  -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      reviewThreads(first: 100) {
        nodes {
          id
          isResolved
          path
          line
          comments(first: 20) {
            nodes {
              author { login }
              body
              url
            }
          }
        }
      }
    }
  }
}' \
  --jq '.data.repository.pullRequest.reviewThreads.nodes[]
    | select(.path == "cuprum/unittests/test_args_validators_property.py")
    | select(any(.comments.nodes[]; .author.login == "coderabbitai" and (.body | contains("Add diagnostic messages to every assertion."))))
    | {id, isResolved, path, line, comments: [.comments.nodes[] | {author: .author.login, url}]}'

Length of output: 7491


@leynos, leave this thread unresolved. Codegraph analysis on latest commit e6fd9b335ea0e228266d7b99d3419e1ba4bd576b found 18 bare assertions and no assertions with diagnostic messages in cuprum/unittests/test_args_validators_property.py, including the anchor at Line 59.

Use this AI-agent prompt:

In `cuprum/unittests/test_args_validators_property.py`, add a concise diagnostic message to every `assert` statement in the property-based tests.

Preserve every existing assertion condition and test control-flow branch. Make each message state the invariant being checked and include the relevant generated values where useful, so a shrunk Hypothesis counterexample is immediately actionable.

Cover all current assertions, including:
- classifier totality and return-type assertions;
- validator/classifier consistency and exception-message equality;
- NUL, parent-segment, whitespace, leading-dash, and non-absolute rejection-category assertions;
- valid path classification, normalization, and idempotence;
- accepted Git-ref classification and round-trip assertions.

Keep the change limited to assertion messages. Do not alter validator behaviour, strategies, or production code. Verify the final file contains no bare `assert` statements.

Comment on lines +37 to +119
@given(requested=_REQUESTED, rust_available=_AVAILABILITY)
def test_resolver_never_returns_auto(
requested: StreamBackend,
rust_available: bool | None, # noqa: FBT001 - property input, not a flag.
) -> None:
"""The resolver always collapses to a concrete backend (never ``AUTO``)."""
try:
resolved = _resolve_backend(requested, rust_available=rust_available)
except ImportError:
# Forced Rust without availability is the only permitted failure.
assert requested is StreamBackend.RUST
assert not rust_available
return
assert resolved in {StreamBackend.RUST, StreamBackend.PYTHON}


@given(rust_available=_AVAILABILITY)
def test_python_is_honoured_unconditionally(
rust_available: bool | None, # noqa: FBT001 - property input, not a flag.
) -> None:
"""Requesting ``PYTHON`` always resolves to ``PYTHON``."""
assert (
_resolve_backend(StreamBackend.PYTHON, rust_available=rust_available)
is StreamBackend.PYTHON
)


@given(rust_available=_AVAILABILITY)
def test_forced_rust_respects_availability(
rust_available: bool | None, # noqa: FBT001 - property input, not a flag.
) -> None:
"""Forced ``RUST`` resolves iff available, else raises ``ImportError``."""
if rust_available:
assert (
_resolve_backend(StreamBackend.RUST, rust_available=rust_available)
is StreamBackend.RUST
)
else:
with pytest.raises(ImportError, match="Rust extension is not available"):
_resolve_backend(StreamBackend.RUST, rust_available=rust_available)


@given(rust_available=_AVAILABILITY)
def test_auto_follows_availability(
rust_available: bool | None, # noqa: FBT001 - property input, not a flag.
) -> None:
"""``AUTO`` picks ``RUST`` iff available, otherwise ``PYTHON``."""
resolved = _resolve_backend(StreamBackend.AUTO, rust_available=rust_available)
expected = StreamBackend.RUST if rust_available else StreamBackend.PYTHON
assert resolved is expected


# Environment values can never contain a NUL byte (the OS rejects them), so
# fuzz over NUL-free text. Seed the known tokens (with case/whitespace noise)
# so the accept paths are exercised alongside the garbage.
_ENV_VALUE = st.one_of(
st.text(
alphabet=st.characters(codec="ascii", exclude_characters="\x00"),
max_size=12,
),
st.sampled_from(["", "auto", "RUST", " Python ", "\tauto\n", "turbo", "rustc"]),
)


@given(raw=_ENV_VALUE)
def test_parse_backend_value_maps_exactly_or_rejects(raw: str) -> None:
"""Parsing maps to the exact member (empty/auto -> AUTO), else raises.

The raw value is injected directly rather than written to ``os.environ``,
so the property never mutates global process state (avoiding the shared
environment-guard requirement in AGENTS.md and any cross-thread races).
"""
normalised = raw.strip().lower()
valid = {member.value for member in StreamBackend}
if normalised == "":
# Empty/whitespace resolves to AUTO.
assert _parse_backend_value(raw) is StreamBackend.AUTO
elif normalised in valid:
# A recognized value maps to exactly that member, never a different one.
assert _parse_backend_value(raw).value == normalised
else:
with pytest.raises(ValueError, match=_ENV_VAR):
_parse_backend_value(raw)

@coderabbitai coderabbitai Bot Jul 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Group the property tests into classes.

All five tests sit as bare module-level functions. Group related assertions (e.g., resolver-behaviour tests vs. parser tests) under test_-prefixed methods inside classes.

As per path instructions, "Group related tests using classes with method names prefixed by test_."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cuprum/unittests/test_backend_resolver_property.py` around lines 37 - 119,
Group the five property tests into related test classes, such as resolver
behavior and backend-value parsing, while preserving each test’s existing
assertions and Hypothesis decorators. Convert each function into a test_
prefixed method within its appropriate class, including the existing resolver
helpers and parser symbols unchanged.

Source: Path instructions

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@coderabbitai Has this now been resolved in the latest commit?

Use codegraph analysis to determine your answer.

If this comment is now resolved, please mark it as such using the API. Otherwise, please provide an AI agent prompt for the remaining work to be done to address this 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.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '== Codegraph outline =='
ast-grep outline cuprum/unittests/test_backend_resolver_property.py \
  --items all --type class,function --view expanded

printf '%s\n' '== Target source range =='
sed -n '25,145p' cuprum/unittests/test_backend_resolver_property.py

printf '%s\n' '== Matching PR review thread =='
gh api graphql \
  -F owner='leynos' \
  -F name='cuprum' \
  -F number=224 \
  -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      reviewThreads(first: 100) {
        nodes {
          id
          isResolved
          path
          line
          comments(first: 20) {
            nodes {
              author { login }
              body
              url
            }
          }
        }
      }
    }
  }
}' \
  --jq '.data.repository.pullRequest.reviewThreads.nodes[]
    | select(.path == "cuprum/unittests/test_backend_resolver_property.py")
    | select(any(.comments.nodes[]; .author.login == "coderabbitai" and (.body | contains("Group the property tests into classes."))))
    | {id, isResolved, path, line, comments: [.comments.nodes[] | {author: .author.login, url, body}]}'

Length of output: 7431


@leynos, leave this thread unresolved. Codegraph analysis shows all five tests remain bare module-level functions (Lines 38, 54, 65, 80, and 102), with no test classes in cuprum/unittests/test_backend_resolver_property.py.

Verify the current state of `cuprum/unittests/test_backend_resolver_property.py` and make the smallest change needed to address the review finding.

Group the existing Hypothesis property tests into focused pytest classes while preserving all existing assertions, decorators, imports, strategies, and test behaviour:

1. Add a `TestBackendResolution` class containing:
   - `test_resolver_never_returns_auto`
   - `test_python_is_honoured_unconditionally`
   - `test_forced_rust_respects_availability`
   - `test_auto_follows_availability`

2. Add a `TestBackendValueParsing` class containing:
   - `test_parse_backend_value_maps_exactly_or_rejects`

Keep every method `test_`-prefixed and retain the existing `@given(...)` decorators on each method. Do not change production code or alter test inputs/assertions. Run the applicable formatting, lint, type-check, and test commands after the structural change.

@leynos leynos changed the title Property tests for path/git-ref validators and backend resolver Property tests for path/git-ref validators and backend resolver (#70, #72) Jul 26, 2026
codescene-access[bot]

This comment was marked as outdated.

@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai On the "User-Facing Documentation" pre-merge check:

The new classify_path_string / classify_git_ref classifiers and the PathRejection / GitRefRejection enums are a developer API (a testing/reasoning seam), not end-user behaviour — and they are documented, in docs/developers-guide.md under "Rejection classifiers for safe_path and git_ref", which records their intended audience and reuse policy. The user-facing behaviour of safe_path / git_ref is unchanged by this PR (same acceptances, same ValueError messages), so docs/users-guide.md has nothing new to state. developers-guide is the correct home for this API, per the repo's documentation-maintenance convention ("Internal interfaces: document ... in the relevant component/developers guide").

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@pandalump: Keep the documentation in docs/developers-guide.md. The classifier helpers and rejection enums are internal developer-facing seams, their intended use is documented there, and safe_path / git_ref retain their existing user-facing behaviour and error messages. No docs/users-guide.md change is required; withdraw the User-Facing Documentation check.

🐇 📖


✏️ Learnings added
Learnt from: pandalump
URL: https://github.com/leynos/cuprum/pull/224

Timestamp: 2026-07-26T21:31:54.532Z
Learning: In leynos/cuprum, document internal developer interfaces in the relevant component or developers guide. For the `safe_path` and `git_ref` rejection classifiers in `cuprum/builders/args.py`, `docs/developers-guide.md` is the correct documentation location when the public validator behaviour and error messages remain unchanged.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

codescene-access[bot]

This comment was marked as outdated.

@buzzybee-df12

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai Resolved the "User-Facing Documentation" pre-merge check by taking the second option you offered — the classifiers are developer-facing only, so I have stopped exporting them.

classify_path_string, classify_git_ref, and the PathRejection / GitRefRejection enums are now removed from cuprum/builders/args.py's __all__; its public surface is just safe_path, git_ref, and their SafePath / GitRef return types. The classifiers stay importable for in-tree callers and the property tests, and remain documented in docs/developers-guide.md (now noting they are intentionally out of __all__). Since they are no longer part of the public/user-facing API and no user-facing behaviour changed, docs/users-guide.md needs no new entry.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@pandalump: Keep the classifier helpers and rejection enums out of __all__, and retain their developer-facing contract in docs/developers-guide.md. This resolves the User-Facing Documentation check; no docs/users-guide.md update is required.


✏️ Learnings added
Learnt from: pandalump
URL: https://github.com/leynos/cuprum/pull/224

Timestamp: 2026-07-27T10:13:40.945Z
Learning: In `leynos/cuprum`, `classify_path_string`, `classify_git_ref`, `PathRejection`, and `GitRefRejection` in `cuprum/builders/args.py` are intentionally internal developer/testing seams: they remain importable for in-tree use but must not be exported through `__all__`. Document their contract and reuse policy in `docs/developers-guide.md`; no user-guide update is needed while `safe_path` and `git_ref` behaviour and error messages remain unchanged.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

@buzzybee-df12

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
cuprum/builders/args.py (1)

93-100: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Parse Windows-style paths with Windows semantics. PurePath(raw_value) on POSIX keeps backslashes literal, so C:\tmp\..\secret bypasses the .. check; UNC paths are also not recognised as absolute. Switch to PureWindowsPath for Windows-shaped inputs before checking parts, and add regression coverage for drive-letter and UNC paths.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cuprum/builders/args.py` around lines 93 - 100, Update the path parsing
around raw_value and _WINDOWS_ABS_PATTERN to use PureWindowsPath for
Windows-shaped inputs, including drive-letter and UNC paths, before evaluating
path.parts and absolute-path status; retain native PurePath handling for other
inputs. Add regression coverage verifying that parent segments in Windows
drive-letter and UNC paths return PathRejection.PARENT_SEGMENT and that those
paths are recognised as absolute.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@cuprum/builders/args.py`:
- Around line 93-100: Update the path parsing around raw_value and
_WINDOWS_ABS_PATTERN to use PureWindowsPath for Windows-shaped inputs, including
drive-letter and UNC paths, before evaluating path.parts and absolute-path
status; retain native PurePath handling for other inputs. Add regression
coverage verifying that parent segments in Windows drive-letter and UNC paths
return PathRejection.PARENT_SEGMENT and that those paths are recognised as
absolute.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2937a2b5-8459-425e-9da7-32bed1344fa9

📥 Commits

Reviewing files that changed from the base of the PR and between 7684962 and 807bfdf.

📒 Files selected for processing (5)
  • cuprum/_backend.py
  • cuprum/builders/args.py
  • cuprum/unittests/test_args_validators_property.py
  • cuprum/unittests/test_backend.py
  • docs/developers-guide.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/shared-actions (auto-detected)
  • leynos/pylint-pypy-shim (auto-detected)
  • leynos/whitaker (auto-detected)

@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai Documented the backend resolution split in docs/developers-guide.md (new "Stream-backend resolution seam" subsection) describing _parse_backend_value / _probe_rust_availability / _resolve_backend and the single boundary handler.

These are private, internal helpers and the public get_stream_backend contract and precedence are unchanged, so developers-guide is the right home per the repo's documentation convention ("Internal interfaces: document ... in the ... developers guide"). docs/cuprum-design.md already documents the observable algorithm, which did not change, and a private-function decomposition of one function does not rise to an ADR — that would be disproportionate to this test-focused PR. Happy to reconsider if the backend selection design itself changes.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai The "Developer Documentation" pre-merge warning describes a gap that head 47088d1 already closes — the walkthrough appears to be evaluating the superseded commit ff6ee30. The single commit between them, 47088d1 ("Refine backend-seam docs: keyword-only sig and design-doc note"), adds exactly the two items the warning requests.

1. Keyword-only marker for _resolve_backenddocs/developers-guide.md (head 47088d1) reads:

  • _resolve_backend(requested, *, rust_available) — the pure decision core
    … (rust_available is keyword-only).

2. Backend seam in the design docdocs/cuprum-design.md (head 47088d1) now documents the seam:

_parse_backend_value (pure env parsing), _probe_rust_availability(requested) (the impure probe), _resolve_backend(requested, *, rust_available) (the pure decision core, rust_available keyword-only).

The remaining references to _check_rust_available() are intentional: it is the coexisting cached availability probe (documented in docs/adr-005-unified-rust-availability-probe.md), a different function from the new resolution seam — not "older architecture."

git grep "rust_available\ is keyword-only" 47088d1 -- docs/developers-guide.mdandgit grep _resolve_backend 47088d1 -- docs/cuprum-design.mdboth confirm these are present on head, and absent onff6ee30. Could you re-review against head 47088d1` and dismiss the stale warning?

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- relevant commits ---'
git log --oneline -n 8

printf '%s\n' '--- head commit and parent relationship ---'
git show --no-patch --format='commit=%H%nparents=%P%nsubject=%s' 47088d1
git merge-base --is-ancestor ff6ee30 47088d1 && printf '%s\n' 'ff6ee30 is an ancestor of 47088d1'

printf '%s\n' '--- developer guide: resolver signature and keyword-only contract ---'
git grep -n -A10 -B4 '_resolve_backend\|keyword-only\|Stream-backend resolution seam' 47088d1 -- docs/developers-guide.md

printf '%s\n' '--- design document: backend-resolution seam ---'
git grep -n -A10 -B4 '_parse_backend_value\|_probe_rust_availability\|_resolve_backend' 47088d1 -- docs/cuprum-design.md

printf '%s\n' '--- implementation signatures and cached probe references ---'
rg -n -A5 -B3 '^def (_check_rust_available|_parse_backend_value|_probe_rust_availability|_resolve_backend|get_stream_backend)\b' cuprum/_backend.py

printf '%s\n' '--- ADR: cached availability probe ---'
rg -n -A8 -B4 '_check_rust_available|cached|availability' docs/adr-005-unified-rust-availability-probe.md

Length of output: 9778


@pandalump: Dismiss the Developer Documentation warning as stale. Head 47088d1 documents both requested details:

  • docs/developers-guide.md specifies _resolve_backend(requested, *, rust_available) and explicitly records that rust_available is keyword-only.
  • docs/cuprum-design.md documents the _parse_backend_value_probe_rust_availability_resolve_backend seam and its single boundary handler.

Treat _check_rust_available() as the separate cached availability resolver described by ADR-005, not as superseded backend-resolution architecture. The shallow checkout lacks ff6ee30, so it cannot independently confirm the commit ancestry, but the warning does not apply to the verified PR head.

🐇 🔎

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/cuprum-design.md`:
- Around line 1872-1880: The cached-resolver bullets preceding this section
still reference the obsolete _check_rust_available() contract. Update them to
describe get_stream_backend() composing _parse_backend_value(),
_probe_rust_availability(), and _resolve_backend(), preserving the documented
precedence and single authoritative backend-resolution model.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 859681ea-1826-4d59-8a67-bee6b84b8e0b

📥 Commits

Reviewing files that changed from the base of the PR and between 807bfdf and 47088d1.

📒 Files selected for processing (2)
  • docs/cuprum-design.md
  • docs/developers-guide.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/shared-actions (auto-detected)
  • leynos/pylint-pypy-shim (auto-detected)
  • leynos/whitaker (auto-detected)

Comment thread docs/cuprum-design.md Outdated
codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

lodyai Bot pushed a commit that referenced this pull request Jul 27, 2026
The backend precedence prose and its flowchart still led with
get_stream_backend() delegating to _check_rust_available(), competing
with the newer _parse_backend_value -> _probe_rust_availability ->
_resolve_backend seam. Present one authoritative model: the resolution
seam is primary, with _check_rust_available() described as the cached
probe that _probe_rust_availability() wraps. Route the mermaid
availability probe through a _probe_rust_availability() node so the
diagram matches the prose and the implementation. Closes CodeRabbit's
Developer Documentation pre-merge warning on #224.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pandalump

Copy link
Copy Markdown
Collaborator

@coderabbitai Addressed in e6fd9b3. Section 13.4 now presents one authoritative backend model:

  • The prose leads with the resolution seam — _parse_backend_value_probe_rust_availability_resolve_backend — and describes _check_rust_available() as the cached probe that _probe_rust_availability() wraps, rather than as a competing delegation target.
  • The mermaid flowchart routes the availability probe through a new _probe_rust_availability() node before _check_rust_available(), so the diagram matches the prose and the implementation (cuprum/_backend.py: get_stream_backend_probe_rust_availability_check_rust_available).

make markdownlint and make nixie pass. Could you re-review against the latest head and dismiss the Developer Documentation warning?

codescene-access[bot]

This comment was marked as outdated.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- checked-out head and target commit ---'
git show --no-patch --format='HEAD=%H%nsubject=%s' HEAD
git show --no-patch --format='commit=%H%nparents=%P%nsubject=%s' e6fd9b3

printf '%s\n' '--- backend implementation map ---'
ast-grep outline cuprum/_backend.py --items all --type function --match 'get_stream_backend|probe_rust_availability|check_rust_available|resolve_backend|parse_backend_value'
rg -n -A20 -B4 '^def (get_stream_backend|_probe_rust_availability|_check_rust_available|_resolve_backend|_parse_backend_value)\b' cuprum/_backend.py

printf '%s\n' '--- developer guide: Section 13.4 and backend flowchart ---'
rg -n -A140 -B8 '^### 13\.4\b|_parse_backend_value|_probe_rust_availability|_check_rust_available|_resolve_backend' docs/developers-guide.md

printf '%s\n' '--- design guide: backend seam references ---'
rg -n -A20 -B5 '_parse_backend_value|_probe_rust_availability|_check_rust_available|_resolve_backend' docs/cuprum-design.md

printf '%s\n' '--- documentation changes in e6fd9b3 ---'
git show --format=fuller --find-renames -- docs/developers-guide.md docs/cuprum-design.md e6fd9b3

Length of output: 213505


@pandalump: Dismiss the Developer Documentation warning. Verification against head e6fd9b3 confirms one authoritative model:

  • docs/cuprum-design.md Lines 1865–1882 presents _parse_backend_value_probe_rust_availability_resolve_backend as the resolution seam and identifies _check_rust_available() as the cached probe wrapped by _probe_rust_availability().
  • The Section 13.4 flowchart routes _probe_rust_availability() to _check_rust_available() at Lines 1981–1992.
  • cuprum/_backend.py matches that path: _probe_rust_availability() calls _check_rust_available() at Line 248, and get_stream_backend() composes the seam.
  • docs/developers-guide.md retains the keyword-only _resolve_backend(requested, *, rust_available) contract.

leynos and others added 9 commits July 28, 2026 00:55
Refactor the argument validators and the stream-backend dispatcher to
expose pure, classification-style seams, then fuzz them with Hypothesis.

cuprum/builders/args.py: introduce PathRejection / GitRefRejection enums
and classify_path_string / classify_git_ref helpers that report the first
failing category (each enum value is the exact error message). The
validators now raise from the classifier, so the rejection reason is
inspectable rather than pass/fail only. Behaviour and messages are
unchanged.

cuprum/_backend.py: split a pure _resolve_backend(requested,
rust_available) decision from the cached, environment-reading wrapper, and
add _probe_rust_availability to encapsulate each mode's probe-failure
policy. All existing log events (resolution debug, forced-unavailable
warning, auto-probe-failed debug) are preserved.

Tests: fuzz validator/classifier consistency, totality, and category
coverage (NUL, parent segments, whitespace); prove the resolver never
leaks AUTO, honours PYTHON, respects forced-Rust availability, and that
env parsing rejects invalid values.

Closes #70
Closes #72

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Respond to Codex and CodeRabbit review feedback on the validator/backend
property tests:

- Extract a pure `_parse_backend_value(raw)` from `_read_backend_env` and
  test it by injecting the raw value directly, rather than mutating
  `os.environ`. This removes the direct environment mutation AGENTS.md
  forbids and any cross-thread race (Codex P1).
- Pin the exact backend mapping in the parse property (`result.value ==
  normalised`, empty -> AUTO) so a mis-mapped member can no longer pass
  (CodeRabbit).
- Anchor the absolute-path round-trip property with a platform-native
  absolute prefix; a leading "/" is drive-relative on Windows, so the test
  now uses a drive anchor there and asserts validity/idempotence rather than
  a POSIX-only "/" prefix (Codex P2).
- Document the `classify_path_string` / `classify_git_ref` classifiers and
  their `PathRejection` / `GitRefRejection` enums in developers-guide.md,
  recording their intended audience and reuse policy (Codex P1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Wrap the availability probe and resolution in one boundary handler in
  `get_stream_backend`, so a forced-RUST failure emits the structured
  `stream_backend_unavailable` warning whether the probe reports the
  extension unavailable OR the probe itself raises ImportError (previously
  the probe ran outside the handler and a probe ImportError bypassed the
  warning). Add `test_forced_rust_probe_import_error_logs_warning`
  (CodeRabbit: Unit Architecture, Observability).
- Pin the specific git-ref/path rejection categories with dedicated
  properties: `LEADING_DASH`, `WHITESPACE`, and `NOT_ABSOLUTE`, so a
  regression that mis-mapped a category can no longer pass the existing
  "rejected" assertions (CodeRabbit: Testing).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolve the remaining pre-merge documentation warning by treating
classify_path_string / classify_git_ref and the PathRejection /
GitRefRejection enums as developer-facing helpers: drop them from
cuprum/builders/args.py __all__ (whose public surface is safe_path /
git_ref and their return types) while keeping them importable for in-tree
use and tests. This aligns the export surface with the developers-guide
documentation, so no users-guide entry is warranted (CodeRabbit).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Record the internal split of get_stream_backend into _parse_backend_value
/ _probe_rust_availability / _resolve_backend and the single boundary
handler, in the developers guide (the appropriate home for an internal
testability seam). The public contract and precedence are unchanged
(CodeRabbit pre-merge Developer Documentation).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- developers-guide: show _resolve_backend(requested, *, rust_available)
  with the keyword-only marker, so maintainers do not call it positionally
  (CodeRabbit inline).
- cuprum-design.md: add the internal resolution seam
  (_parse_backend_value / _probe_rust_availability / _resolve_backend and
  the single boundary handler) to the stream-backend precedence section, so
  the design doc reflects the current architecture (CodeRabbit pre-merge).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The spelling gate enforces Oxford (-ize) spelling; "normalisation"
tripped typos.toml's normalisation→normalization mapping, failing
lint-test. Use "normalization" in the _parse_backend_value bullet.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The precedence section said get_stream_backend() delegates directly to
_check_rust_available(), reading as if it bypassed the new resolution
seam. Match the code path (get_stream_backend -> _probe_rust_availability
-> _check_rust_available) so the flow description and the seam note below
it are consistent, closing CodeRabbit's design-doc pre-merge warning.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The backend precedence prose and its flowchart still led with
get_stream_backend() delegating to _check_rust_available(), competing
with the newer _parse_backend_value -> _probe_rust_availability ->
_resolve_backend seam. Present one authoritative model: the resolution
seam is primary, with _check_rust_available() described as the cached
probe that _probe_rust_availability() wraps. Route the mermaid
availability probe through a _probe_rust_availability() node so the
diagram matches the prose and the implementation. Closes CodeRabbit's
Developer Documentation pre-merge warning on #224.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lodyai
lodyai Bot force-pushed the proptest-validators-backend branch from e6fd9b3 to 22f6d21 Compare July 27, 2026 23:00
codescene-access[bot]

This comment was marked as outdated.

@codescene-access codescene-access 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.

No quality gates enabled for this code.

@leynos
leynos merged commit fc6e881 into main Jul 27, 2026
20 checks passed
@leynos
leynos deleted the proptest-validators-backend branch July 27, 2026 23:42
@pandalump

Copy link
Copy Markdown
Collaborator

The post-merge Developer Documentation warning is valid: docs/cuprum-design.md §13.2 still implied get_stream_backend() delegates directly to _check_rust_available(). Since #224 is merged, I've addressed it in a follow-up: #248 qualifies the §13.2 sentence to route get_stream_backend() through the _probe_rust_availability() seam and cross-references §13.4's authoritative _parse_backend_value_probe_rust_availability_resolve_backend resolution. §13.3/§13.4 already described the seam model correctly, so this leaves one authoritative backend model. markdownlint + nixie pass.

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

Labels

Projects

None yet

3 participants