fix(2): F2-11 — SSO-dep deps-not-ready SKIP no longer yields GREEN !testme
When a DEPS-declaring recipe's setup_custom_tests fails, its @requires_deps (SSO/OIDC) tests skip; a skip-only pytest file exits 0 so the run previously reported overall=0 (GREEN) while the only SSO test never ran (violates P7). Fix preserves generic-tier failure-isolation but corrects the green SIGNAL: - conftest.pytest_collection_modifyitems counts skipped requires_deps tests and appends to $CCCI_DEPS_SKIP_REPORT. - run_recipe_ci: sums the count, surfaces it in RUN SUMMARY, and new pure predicate sso_dep_unverified(declared, deps_ready, skipped) flips overall=1. - 7 new unit tests (tests/unit/test_f211_sso_skip.py). Verified deploy-free (rate-limit-independent): 35/35 unit PASS; cold real-test proof on lasuite-docs test_oidc_with_keycloak.py -> 1 skipped + skip-report==1 -> orchestrator would set overall=1. Full e2e deferred until Docker Hub rate limit lifts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -107,9 +107,23 @@ def pytest_collection_modifyitems(config, items):
|
||||
return
|
||||
reason = os.environ.get("CCCI_DEPS_NOT_READY_REASON", "(no reason given)")
|
||||
skip_mark = pytest.mark.skip(reason=f"deps-not-ready: {reason}")
|
||||
skipped = 0
|
||||
for item in items:
|
||||
if "requires_deps" in item.keywords:
|
||||
item.add_marker(skip_mark)
|
||||
skipped += 1
|
||||
# F2-11: a skip-only pytest file exits 0, so without this the orchestrator can't tell
|
||||
# "SSO verified" from "SSO test silently skipped because deps weren't ready". Record the count
|
||||
# of requires_deps tests we skipped to a report file the orchestrator reads — it surfaces the
|
||||
# count in RUN SUMMARY and FAILS the recipe's SSO claim (a green exit must not mask an unrun
|
||||
# SSO test). Appended one line per pytest invocation (one per custom file); orchestrator sums.
|
||||
report = os.environ.get("CCCI_DEPS_SKIP_REPORT")
|
||||
if report and skipped:
|
||||
try:
|
||||
with open(report, "a") as f:
|
||||
f.write(f"{skipped}\n")
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
|
||||
def pytest_configure(config):
|
||||
|
||||
Reference in New Issue
Block a user