validate-and-fix

द्वारा openshift

पूर्ण सत्यापन पाइपलाइन चलाएँ (make test-unit, make verify, make test-integration) और ब्लैक फ़ॉर्मेटिंग, अप्रयुक्त आयात, और… जैसी सामान्य विफलताओं को स्वचालित रूप से ठीक करें।

npx skills add https://github.com/openshift/lightspeed-service --skill validate-and-fix

Validate & Auto-Fix

Run the project validation pipeline, auto-fix trivial issues, and re-run until green or a real failure is found.

Rules

  • Never modify production logic to fix a test. Only fix test expectations, imports, formatting, and lint.
  • Never skip or delete a failing test.
  • Stop after 3 auto-fix cycles to avoid loops.
  • Report real failures clearly; do not attempt speculative fixes.

Step 0: Ensure Dependencies Are Installed

make install-deps 2>&1 | tail -10

This ensures the virtualenv matches the lockfile. Skipping this step is the most common cause of spurious import errors (e.g. llama-index-embeddings-huggingface not found despite being in requirements.txt).

Step 1: Run Unit Tests

make test-unit 2>&1 | tail -40

If all pass, proceed to Step 3 (integration tests). If failures occur, classify each failure (see Step 2).

Step 2: Classify and Fix Failures

For each failure, determine its type:

Auto-fixable (fix immediately, then re-run Step 1):

TypeFix
Missing await on async callAdd await, mark test async def, add @pytest.mark.asyncio
Test asserts old default valueUpdate assertion to match new default

Real failures (do not auto-fix):

  • Logic errors in production code
  • Assertion failures reflecting actual behavior changes
  • Import errors from missing dependencies
  • Failures in code you did not modify

For real failures: report the test name, file, and error summary, then stop.

Step 3: Run Integration Tests

make test-integration 2>&1 | tail -20

Integration test failures are almost always real failures. Report and stop.

Step 4: Run Verify

make verify 2>&1 | tail -30

This runs: black --check, ruff, woke, pylint, mypy.

If failures occur, apply the same classify-and-fix logic from Step 2. Common fixes at this stage:

TypeFix
Black formattinguv run black .
Unused import (ruff F401)Remove the import
Unused variable (ruff F841)Remove the assignment
Unused noqa directive (RUF100)Remove the noqa comment
Other ruff-fixableuv run ruff check . --fix
Pylint issues from changed codeFix inline

Re-run make verify after each fix. Proceed to Step 5 when green.

Step 5: Report

Report exactly:

  • make test-unit: X passed / Y failed
  • make verify: pass/fail (list any remaining issues)
  • make test-integration: X passed / Y failed
  • Auto-fixes applied (list each: file, what was fixed)
  • Cycles used: N/3

Do not include unrelated diagnostics or suggestions.

openshift की और Skills

openshift-docs
openshift
मार्कडाउन प्रारूप में OpenShift Container Platform दस्तावेज़ खोजें और पढ़ें। उपयोग तब करें जब उपयोगकर्ता OpenShift सुविधाओं, कॉन्फ़िगरेशन, इंस्टॉलेशन आदि के बारे में पूछता है।
triage-leaked-infra
openshift
मूल्यांकन करें कि क्या AWS VPC या HyperShift CI से इंफ्रा सेट हटाना सुरक्षित है। उपयोग करें जब उपयोगकर्ता cleanleaked आउटपुट पेस्ट करता है और पूछता है 'क्या मैं इसे हटा सकता हूँ?', 'क्या…
openshift-expert
openshift
OpenShift प्लेटफ़ॉर्म और Kubernetes विशेषज्ञ जिसे क्लस्टर आर्किटेक्चर, ऑपरेटर, नेटवर्किंग, स्टोरेज, समस्या निवारण और CI/CD पाइपलाइनों का गहन ज्ञान है। उपयोग करें…
Konflux Archived PipelineRuns
openshift
KubeArchive के माध्यम से संग्रहीत Konflux PipelineRuns, TaskRuns और पॉड लॉग तक पहुँचता है। Konflux PipelineRun परिणामों की जाँच करते समय, जाँच करते समय स्वचालित रूप से लागू होता है…
backport
openshift
मुख्य शाखा से रिलीज़ शाखा में कमिट या PR को बैकपोर्ट करें। जब उपयोगकर्ता बैकपोर्ट, चेरी-पिक, या शाखाओं के बीच परिवर्तन पोर्ट करने के लिए कहे, या समाधान करते समय उपयोग करें…
rebase
openshift
वर्तमान शाखा को उसकी आधार शाखा पर रीबेस करें, सभी विरोधों को हल करें, और लिंट, i18n, और बिल्ड पास होने की पुष्टि करें। उपयोग तब करें जब उपयोगकर्ता रीबेस, अपडेट या सिंक करने के लिए कहे…
Build CPO Image
openshift
कंट्रोल-प्लेन-ऑपरेटर कंटेनर इमेज बनाएँ और पुश करें। CPO परिवर्तनों का परीक्षण करते समय जिन्हें लाइव क्लस्टर पर तैनात करने की आवश्यकता होती है, स्वचालित रूप से लागू होता है।
find-complexity
openshift
उच्च चक्रीय जटिलता, अत्यधिक लंबाई या बहुत अधिक पैरामीटर वाले फंक्शन और मेथड खोजें। उपयोग तब करें जब उपयोगकर्ता जटिल कोड, जटिलता खोजने के लिए कहे…