Repo C Shim Contract Checks
Use this skill for shim endpoint contract safety.
Contract Requirements
- Runtime features requiring telemetry must fail closed when shim is unavailable.
REPO_B_SIDECAR_URLconfig path remains explicit.- CI-facing integration tests use mock shim fixtures, not real hardware.
- Do not mask core import failures with
pytest.importorskip(). - Audio and RAG routes tied to shim-backed services must keep closed-fallback behavior when sidecar signals are missing.
- Maintain stable payload contracts for
GET /health,/telemetry,/audio, and/ragendpoints when fail-closed gates engage.
Validation Commands
Run from <PRIVATE_REPO_C> root:
ruff check .
pytest -q
For focused shim contract review:
python - <<'PY'
from pathlib import Path
import re
patterns = [
'REPO_B_SIDECAR_URL',
'importorskip',
'requires_real_sidecar',
'/health',
'/telemetry',
'/audio',
'/rag',
]
roots = ['AGENTS.md', 'tests', 'src', 'repo-c', 'repo_c_trace', 'ranking_engine']
for root in roots:
p = Path(root)
if not p.exists():
continue
for file in p.rglob('*'):
if not file.is_file():
continue
if file.suffix.lower() not in {'.py', '.md', '.yml', '.yaml', '.json'}:
continue
text = file.read_text(encoding='utf-8', errors='ignore')
for pattern in patterns:
if re.search(pattern, text):
break
else:
continue
print(file)
PY
curl -s http://127.0.0.1:9000/health
curl -s http://127.0.0.1:9000/telemetry
curl -s http://127.0.0.1:9000/api/rag/status
Scope Boundary
Use this skill only for the repo-c-shim-contract-checks lane and workflow defined in this file and its references.
Do not use this skill for unrelated lanes; route those through $skill-hub and the most specific matching skill.
Reference
references/shim-contract.md
Loopback
If this lane is unresolved, blocked, or ambiguous:
- Capture the failing endpoint and test evidence.
- Route back through
$skill-hubfor chain recalculation. - Resume only after the updated chain returns a deterministic next step.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.