') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); Route Local Test-Runner Confusion to Verification Discipline by ptr727 · Pull Request #1033 · ptr727/ProjectTemplate · GitHub
Skip to content

Route Local Test-Runner Confusion to Verification Discipline - #1033

Merged
ptr727 merged 1 commit into
developfrom
fix-779-test-invocation-routing
Aug 27, 2026
Merged

Route Local Test-Runner Confusion to Verification Discipline#1033
ptr727 merged 1 commit into
developfrom
fix-779-test-invocation-routing

Conversation

@ptr727

@ptr727ptr727 commented Aug 27, 2026

Copy link
Copy Markdown
Owner

A generic uv run pytest guessed without reading OPERATIONS.md fails to spawn in this repo's lint-only Python Scripts profile, and reads as a missing dependency rather than the profile working as intended.

GOVERNANCE.md "Verification Discipline" already states the underlying rule: read the check a change owes from OPERATIONS.md, not from a generic guessed command. This adds an explicit bullet naming the test-runner case, and an AGENTS.md routing-table row so the section is reachable without depending on the python-codestyle Skill firing, the same shape as #763's fix for the analogous lint-tool case.

Fixes#779

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified the recommended verification procedure for Python scripts.
    • Documented how to interpret unavailable or failing test runners.
    • Added guidance to use the repository’s documented verification command rather than generic test commands.

A generic `uv run pytest` guessed without reading OPERATIONS.md fails
to spawn in this repo's lint-only Python Scripts profile, and reads as
a missing dependency rather than the profile working as intended
(#779). Verification Discipline already states the underlying rule
(read the check from OPERATIONS.md, not from a guessed command); add
an explicit bullet naming the test-runner case and an AGENTS.md
routing-table row so the section is reachable without depending on
the python-codestyle Skill firing, the same shape as #763's fix for
the analogous lint case.
Fixes#779
@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0)📘 Rule violations (0)📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can ask Qodo to dismiss a finding you disagree with, with your reason on record

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Route Local Test Failures to Repository Verification Guidance

📝 Documentation🕐 Less than 10 minutes

Grey Divider

AI Description

• Route local test-runner problems directly to Verification Discipline.
• Clarify that lint-only profiles intentionally omit generic test runners.
• Require repository-declared verification commands instead of guessed pytest invocations.
Diagram

graph TD
Task(["Local test"]) --> Agents["AGENTS routing"] --> Governance["Verification discipline"] --> Operations["OPERATIONS command"] --> Check(["Repository check"])
Loading
High-Level Assessment

The direct documentation route is appropriate because it extends the existing Verification Discipline contract and makes it discoverable without relying on the python-codestyle Skill. Duplicating test commands in AGENTS.md or adding a dependency to lint-only profiles would weaken the repository-specific verification model.

Files changed (2) +2 / -0

Documentation (2) +2 / -0
AGENTS.mdRoute local test issues to Verification Discipline+1/-0

Route local test issues to Verification Discipline

• Adds a routing-table entry for local test execution and missing or unspawnable test runners. This makes the governing verification section discoverable without relying on a language-specific Skill trigger.

AGENTS.md

GOVERNANCE.mdClarify test-runner behavior in lint-only profiles+1/-0

Clarify test-runner behavior in lint-only profiles

• Explains that a generic pytest spawn failure is expected in lint-only Python Scripts profiles and does not prove tests are inapplicable. Directs contributors to use the verification invocation declared by OPERATIONS.md.

GOVERNANCE.md

@coderabbitai

coderabbitaiBot commented Aug 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 90b997fa-23ad-459c-a50a-24164df871c6

📥 Commits

Reviewing files that changed from the base of the PR and between 12aa242 and d872eb5.

📒 Files selected for processing (2)
  • AGENTS.md
  • GOVERNANCE.md

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The change adds verification guidance for lint-only Python Scripts profiles. It references the documented OPERATIONS.md command and python-codestyle Skill instead of requiring a generic uv run pytest command.

Changes

Verification guidance

Layer / File(s)Summary
Document verification rules
AGENTS.md, GOVERNANCE.md
Adds the Verification Discipline reference and clarifies that a failed uv run pytest spawn is expected for lint-only Python Scripts profiles. Verification must use the command documented in OPERATIONS.md and the python-codestyle Skill.

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

Merge Risk:⚪ Minimal · up to d872e

This localized documentation change clarifies how to select the repository’s test command and adds a direct routing entry; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly describes the main change: routing local test-runner failures to the repository's verification guidance.
Linked Issues check✅ PassedThe documentation changes address issue #779 by explaining that uv run pytest may fail to spawn in the lint-only Python Scripts profile and by directing agents to the documented verification command…
Out of Scope Changes check✅ PassedThe changes are limited to related guidance in AGENTS.md and GOVERNANCE.md. No unrelated code or configuration changes are present.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Linked Issues check

Explanation

The documentation changes address issue #779 by explaining that uv run pytest may fail to spawn in the lint-only Python Scripts profile and by directing agents to the documented verification command.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-779-test-invocation-routing

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

@ptr727
ptr727 merged commit 3e29583 into developAug 27, 2026
8 checks passed
@ptr727
ptr727 deleted the fix-779-test-invocation-routing branch August 27, 2026 01:02
ptr727 added a commit that referenced this pull request Aug 27, 2026
The Verification Discipline bullet added by #1033 read as always
reporting a failure, even where the `OPERATIONS.md`-documented command
succeeds. State the actual result instead.
Addresses a CodeRabbit finding on the #1034 promotion PR.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Clarified verification guidance for lint-only Python script profiles.
* Specified how to report expected test-runner launch failures versus
missing test requirements.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
ptr727 added a commit that referenced this pull request Aug 27, 2026
Promotes develop to main.
Includes #1033 (Route Local Test-Runner Confusion to Verification
Discipline, fixes#779).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Added guidance for verification procedures and local test execution.
* Clarified expected behavior when the standard test runner is
unavailable in lint-only environments.
* Directed contributors to use the documented operations command and
accurately report test results.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for freeto 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.

1 participant

@ptr727