Skip to content

docs(verify): oracle-limit example and shadow sys.path guidance - #85

Merged
omsherikar merged 2 commits into
mainfrom
docs/r4-oracle-and-shadow-guidance
Jul 30, 2026
Merged

omsherikar merged 2 commits into
mainfrom
docs/r4-oracle-and-shadow-guidance

Conversation

@omsherikar

@omsherikar omsherikar commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

What

Documents two user-facing lessons from round-4 hardening (Django, pydantic, Jinja2, pytest).

1. A worked oracle-limit example, from a real library

The "SAFE means suite-approved" section now carries evidence instead of only an argument. Flipping <= to < in Jinja2's truncate filter genuinely changes boundary behavior (at the exact boundary the string is truncated instead of returned whole), yet all 911 tests in Jinja2's suite pass and the changed line is covered, so the verdict is SAFE. That verdict is correct about what it claims and still not a proof of correctness, which is precisely the promise the docs make. Boundary conditions are where suites are thinnest, so this is the honest thing to show a reader.

2. Make sure the tests run the code being verified

New section, plus a pointer from the verify-diff page. When a project is installed into the environment (an editable pip install -e . is the common case), import yourpackage resolves outside the copy under verification, the tests exercise the original code, and the run proves nothing about the change. Proven on Django: the same diff read UNPROVEN while the tests loaded the installed copy, and UNSAFE (correctly, the auth suite catches it) once the verified tree came first on sys.path.

Refactron already detects this rather than guessing (a changed file that coverage never measured reports "could not be determined" instead of claiming the code is untested, shipped in PR #84). The docs now tell users how to get a real verdict: put the verified tree first on sys.path, for example PYTHONPATH=. or PYTHONPATH=src.

Notes

Docs only, no code. Zero em or en dashes; both frontmatters parse; the added paragraph sits outside the <Warning> component deliberately, since the formatter dedents content inside components and that indentation has broken MDX parsing on this site before.

Summary by CodeRabbit

  • Documentation
    • Added a worked example explaining how boundary-condition changes can still receive a SAFE verification verdict when tests remain passing.
    • Clarified how to ensure verification tests run against the intended project copy, including guidance for configured import paths.
    • Expanded accepted documentation vocabulary with additional technical terms.

Two things round-4 hardening taught us, documented for users.

The SAFE section now carries a worked example from a real library:
flipping <= to < in Jinja2's truncate filter genuinely changes boundary
behavior, yet all 911 of its tests pass and the line is covered, so the
verdict is SAFE. Correct about what it claims, still not a proof of
correctness, which is exactly what the verdict promises.

New section on making the tests run the code being verified: an
installed package (editable counts) makes imports resolve outside the
verified copy, so the run proves nothing. Proven on Django, where the
same diff read UNPROVEN via the installed copy and UNSAFE once the
verified tree came first on sys.path.
Copilot AI review requested due to automatic review settings July 30, 2026 12:59

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7be73ac2-6cdd-41e8-997b-287730825b63

📥 Commits

Reviewing files that changed from the base of the PR and between cc2b29e and ba91e9f.

📒 Files selected for processing (3)
  • docs/styles/config/vocabularies/Mintlify/accept.txt
  • docs/verification/verdicts.mdx
  • docs/verification/verify-diff.mdx

📝 Walkthrough

Walkthrough

Verification documentation now explains SAFE verdict limitations, warns about tests importing installed copies instead of the verified tree, documents PYTHONPATH configuration, and accepts src and sys in the documentation vocabulary.

Changes

Verification documentation

Layer / File(s) Summary
Verdict interpretation guidance
docs/verification/verdicts.mdx
Adds a Jinja2 boundary-condition example showing how covered changes can still receive a SAFE verdict without proving correctness.
Verified source resolution guidance
docs/verification/verdicts.mdx, docs/verification/verify-diff.mdx, docs/styles/config/vocabularies/Mintlify/accept.txt
Documents installed-package import resolution, recommends placing the verified tree first on sys.path, and adds src and sys to the accepted vocabulary.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the docs changes: a worked example about SAFE verdicts and guidance for shadow sys.path handling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/r4-oracle-and-shadow-guidance

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

docs/verification/verdicts.mdx

Parsing error: ESLint was configured to run on <tsconfigRootDir>/docs/verification/verdicts.mdx using parserOptions.project: /tsconfig.eslint.json
The extension for the file (.mdx) is non-standard. You should add parserOptions.extraFileExtensions to your config.

docs/verification/verify-diff.mdx

Parsing error: ESLint was configured to run on <tsconfigRootDir>/docs/verification/verify-diff.mdx using parserOptions.project: /tsconfig.eslint.json
The extension for the file (.mdx) is non-standard. You should add parserOptions.extraFileExtensions to your config.


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.

@mintlify

mintlify Bot commented Jul 30, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
refactron 🟢 Ready View Preview Jul 30, 2026, 1:00 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@omsherikar
omsherikar merged commit 389f005 into main Jul 30, 2026
16 checks passed
@omsherikar
omsherikar deleted the docs/r4-oracle-and-shadow-guidance branch July 30, 2026 15:18

This branch was successfully deployed

1 active deployment
staging - docs — ba91e9f3 Deployed Jul 30, 2026 by mintlify[bot]
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