Skip to content

ci: fix conda_avail circular gate silently skipping conda-full self-tests - #391

Merged
mixmansoundude merged 1 commit into
mainfrom
claude/pipreqs-fallback-maintenance-49jhr9
Jul 27, 2026
Merged

ci: fix conda_avail circular gate silently skipping conda-full self-tests#391
mixmansoundude merged 1 commit into
mainfrom
claude/pipreqs-fallback-maintenance-49jhr9

Conversation

@mixmansoundude

Copy link
Copy Markdown
Owner

Summary

Follow-up to #390 (merged), found via a direct owner question ("are we sure we aren't shorting conda-full?") that prompted checking real step-level CI conclusions instead of trusting the job's overall green status.

  • conda_avail's check (introduced in ci: lane-aware if:always() rollout for remaining 36 gating-lane steps (item 7) #390) assumed the "Bootstrap environment (run_setup.bat)" step performs the first real Miniconda install for the conda-full lane, so gating ~27 downstream real/conda-full-restricted self-test steps on "is conda already on disk" would only skip in the rare case that install genuinely failed.
  • That assumption is false. "Bootstrap environment" runs against this repo's own root (no loose .py files there — it exercises the empty-repo/no_python_files graceful-exit path, not a real target app), so it never installs Miniconda at all. Every downstream selfapps step capable of performing the first real install was ALSO gated behind this same check — a circular self-skip with no way out.
  • Confirmed directly via the GitHub Actions API against two real runs on ci: lane-aware if:always() rollout for remaining 36 gating-lane steps (item 7) #390 (efd7a5c, fd7a046): all ~27 real/conda-full-only steps showed "conclusion":"skipped" at the identical timestamp on conda-full, every run. The job still reported overall SUCCESS (a skipped step doesn't fail a job), so this merged without the coverage loss ever surfacing.
  • Fix: reverted all 36 conda_avail-dependent if: clauses to their pre-item-7 unconditional form (matrix.mode == 'conda-full', no conda_avail dependency), keeping !cancelled() (the part of item 7 that is correct and validated). The conda_avail step itself is left in place, unused, with a comment explaining why.
  • Wholistic audit performed on request, not just this one bug: swept every if: condition in the whole 4444-line workflow (all 5 jobs) for the same bug class — none found elsewhere; traced the downstream verdict/enforce/aggregate chain to confirm it has no independent bug (it's just architecturally blind to a step that never ran). Compared the current yml against two real historical baselines (e20d7cd, 2026-07-08, well before this work — conda-full ran 78 min; fd11ff3, immediately before item 7 started — conda-full ran 94 min) via direct condition-by-condition diff: zero steps removed, 25 new steps added (all documented features shipped in that window), and all 73 changed conditions fall into exactly two known, reviewed categories (always()!cancelled(), or gaining a !cancelled() && prefix) — none reference conda_avail anymore. Full rationale recorded in CLAUDE.md's new Active Backlog item 15.

Test plan

  • python -m compileall -q .
  • python tools/check_delimiters.py run_setup.bat
  • python -m yamllint .github/workflows/
  • actionlint -oneline .github/workflows/*.yml
  • python -m pytest tests/test_*.py -q (437 passed, 2 skipped)
  • Confirmed via GitHub Actions API that the pre-fix state (two runs on ci: lane-aware if:always() rollout for remaining 36 gating-lane steps (item 7) #390) shows the bug; confirmed via direct yml diff that the fix restores exact parity with two known-healthy historical baselines
  • Real Windows CI (this PR) — confirm the conda-full lane's ~27 previously-skipped self-tests actually run and pass again, and that job duration returns to the ~80-95 min historical range

Claude-Session: https://claude.ai/code/session_015xbWLPbiaKVsobB9FZy8kS


Generated by Claude Code

…ests

conda_avail's check assumed the main "Bootstrap environment" step
performs the first real Miniconda install, but that step runs against
this repo's own empty root (the no_python_files graceful-exit path)
and never touches conda. Every downstream selfapps step capable of
doing the first real install was itself gated behind this same check,
so conda-full could never bootstrap conda for the first time again --
a closed loop. Confirmed via the GitHub Actions API against two real
runs (efd7a5c, fd7a046): ~27 real/conda-full-only self-tests silently
skipped every run, job still reporting overall success.

Reverted all 36 conda_avail-dependent if: conditions to their pre-item-7
unconditional form, keeping !cancelled() (the part of item 7 that is
correct and validated). Full workflow swept for other instances of this
bug class; none found -- the downstream verdict/aggregate/enforce chain
is sound and was only blind to steps that never ran at all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015xbWLPbiaKVsobB9FZy8kS
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@mixmansoundude
mixmansoundude enabled auto-merge (squash) July 27, 2026 02:35
@coderabbitai

coderabbitai Bot commented Jul 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: d88d1cf0-97ba-434a-98e8-a040ec01f114

📥 Commits

Reviewing files that changed from the base of the PR and between 283af5a and 9d360f0.

📒 Files selected for processing (2)
  • .github/workflows/batch-check.yml
  • CLAUDE.md
📜 Recent review details
⏰ Context from checks skipped due to timeout. (10)
  • GitHub Check: analyze
  • GitHub Check: auto_merge
  • GitHub Check: Batch syntax/run check (conda-full)
  • GitHub Check: Batch syntax/run check (real)
  • GitHub Check: Batch syntax/run check (cache)
  • GitHub Check: Batch syntax/run check (contract-uv)
  • GitHub Check: Batch syntax/run check (contract-uv-fail)
  • GitHub Check: Batch syntax/run check (uv)
  • GitHub Check: Batch syntax/run check (uv-dl-fallback)
  • GitHub Check: Batch syntax/run check (justme-test)
🧰 Additional context used
📓 Path-based instructions (4)
**/*

📄 CodeRabbit inference engine (AGENTS.md)

**/*: Use GitHub Actions results, especially Windows runner behavior, as the authoritative source of truth; treat local or sandbox runs as advisory.
Do not weaken tests, remove logging or artifacts, or delete or skip checks to obtain a green build.
Any new observable log line, disk file, or assertion-detectable behavior must produce an NDJSON row and have its artifact path added to the batch-check.yml test-logs upload using both existing slash-style variants.
Follow an explicit Plan -> Check the plan -> Execute -> Self-check/tests loop, and make one change set per loop.
Push every commit before it can be lost; do not leave commits unpushed when a turn ends.
Do not implement scope changes without first creating a backlog item unless explicitly instructed; fix CI failures before proceeding, and add a derived-requirement comment for untraceable code.

**/*: Update the relevant knowledge document in the same commit when a change teaches or invalidates a lesson; edit existing entries rather than only appending.
Implement exactly one missing feature slice and add exactly one missing test per iteration loop; freeze scope and defer new requirements to the backlog.

Files:

  • CLAUDE.md
**/*.{md,bat,cmd}

📄 CodeRabbit inference engine (AGENTS.md)

Reference run_setup.bat locations in documentation by stable label or subroutine name rather than exact line numbers.

Files:

  • CLAUDE.md
.github/workflows/*.yml

📄 CodeRabbit inference engine (AGENTS.md)

.github/workflows/*.yml: Do not change GitHub Actions workflow triggers, permissions, or retention settings.
Isolate slow, flaky, or environment-dependent diagnostics in their own non-gating (continue-on-error) lane instead of slowing deterministic gating lanes.
Keep the CI interface synchronized with bootstrapper messages and status summaries; update workflow parsers whenever emitted text changes, and vice versa.
Use only the single inline model path in batch-check.yml for future model work; do not add older online-model or extra inline experiments.

Files:

  • .github/workflows/batch-check.yml
.github/workflows/**/*.{yml,yaml}

📄 CodeRabbit inference engine (CLAUDE.md)

Validate modified GitHub Actions workflows with both yamllint and actionlint.

Files:

  • .github/workflows/batch-check.yml
🪛 markdownlint-cli2 (0.23.0)
CLAUDE.md

[warning] 717-717: Ordered list item prefix
Expected: 2; Actual: 15; Style: 1/2/3

(MD029, ol-prefix)

🔇 Additional comments (5)
.github/workflows/batch-check.yml (3)

273-293: 📐 Maintainability & Code Quality

Confirm both required workflow linters passed.

Please run yamllint and actionlint against .github/workflows/batch-check.yml before merging.

As per coding guidelines, modified GitHub Actions workflows must be validated with both yamllint and actionlint.

Source: Coding guidelines


305-336: 🩺 Stability & Availability

Verify the restored conda-full execution on Windows.

The supplied context says real Windows validation is still pending. Inspect a windows-latest run and confirm these steps execute in conda-full rather than merely producing an overall-success job, with their expected NDJSON rows and artifacts present.

As per coding guidelines, GitHub Actions results—especially Windows runner behavior—are authoritative; local or sandbox runs are advisory.

Source: Coding guidelines


351-351: LGTM!

Also applies to: 378-422, 557-563, 572-572, 683-773, 907-931

CLAUDE.md (2)

717-762: 📐 Maintainability & Code Quality

Update or supersede the original conda-gating backlog item.

This entry says Item 7’s premise is false, but the change adds Item 15. Verify that Item 7 itself is updated or explicitly marked superseded; otherwise future maintainers may follow stale guidance and recreate the circular skip.

As per coding guidelines, when a change invalidates a lesson, update the existing knowledge entry rather than only appending a new one.

Source: Coding guidelines


717-717: 📐 Maintainability & Code Quality

Resolve the MD029 ordered-list warning.

markdownlint-cli2 reports Expected: 2; Actual: 15 on Line 717. Align the prefix with the surrounding list style and rerun the linter, while preserving any stable backlog identifier.

Source: Linters/SAST tools


📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Improved automated validation for conda-full scenarios by allowing self-tests to continue when the informational Conda availability check does not report availability.
    • Prevented valid test scenarios from being skipped due to incorrect gating, covering environment setup, dependency handling, executable checks, runtime behavior, and safety validations.
  • Documentation

    • Updated project documentation with follow-up notes explaining the validation workflow adjustment and remaining improvements.

Walkthrough

The workflow makes Miniconda availability diagnostic-only and removes its output from conda-full self-test gating. The active backlog documents the correction and deferred rewiring.

Changes

Conda-full workflow gating

Layer / File(s) Summary
Diagnostic check and backlog record
.github/workflows/batch-check.yml, CLAUDE.md
The Miniconda availability check is retained for diagnostics, while the backlog documents its unused output and deferred rewiring.
Restored self-test execution
.github/workflows/batch-check.yml
Self-test, dependency-check, PyInstaller, EXE-smokerun, and final validation steps no longer require conda_avail.outputs.available == 'true'; existing cancellation, cache, and lane predicates remain.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly names the CI gate fix and the affected conda-full self-tests.
Description check ✅ Passed The description is directly about the workflow gate fix and matches the changeset.
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 claude/pipreqs-fallback-maintenance-49jhr9

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

@mixmansoundude
mixmansoundude merged commit 06e5b35 into main Jul 27, 2026
16 checks passed
@mixmansoundude
mixmansoundude deleted the claude/pipreqs-fallback-maintenance-49jhr9 branch July 27, 2026 04:16
mixmansoundude added a commit that referenced this pull request Jul 27, 2026
…arkdownlint check (#392)

* docs: address CodeRabbit findings on PR #391 (item 7 correction, MD029)

Item 7's own entry never noted that the conda_avail mechanism it
introduced was later found broken and reverted -- a future reader
could follow it as still-valid guidance. Added an in-place correction
paragraph cross-referencing item 15.

Also fixed the MD029 ordered-list warning: item 15 was a second
"N." marker in the same implicit ordered list as item 7, with
non-sequential numbers. Converted to a bullet with "Active Backlog
item 15" spelled out in the bold lead sentence, matching how every
other historical item number in this doc is referenced in prose.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015xbWLPbiaKVsobB9FZy8kS

* tools: add advisory MD029-only markdownlint check to sanity sweep

CodeRabbit's MD029 finding on PR #391 (a stray literal "15." collided
with CLAUDE.md's own Active Backlog stable-ID convention) was real but
would have been just as easy to reintroduce next time -- add a narrow,
advisory-only check to catch it locally before push instead of relying
on a reviewer bot each time.

Deliberately scoped to MD029 only, on CLAUDE.md only: a full default
markdownlint pass produces ~2700 hits on CLAUDE.md alone (~99% MD013
line-length, a rule this repo has never followed), and README.md/docs/*.md
use their own unreviewed numbering schemes. Never fails the sweep --
matches PYFLAKES's own established advisory-only precedent. Documents
the underlying convention (bullets with the number in prose for new
Active Backlog items, not literal "N." markers) in AGENTS.md so it's
discoverable outside the lint config's own comments.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015xbWLPbiaKVsobB9FZy8kS

* docs: relabel efd7a5c/fd7a046 as commit SHAs, not run IDs

CodeRabbit finding on PR #392: CLAUDE.md's Active Backlog item 15 called
these two "real runs" when they're actually the commit SHAs whose CI
runs were checked via the GitHub Actions API -- ambiguous wording, not
a factual error in the underlying evidence.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015xbWLPbiaKVsobB9FZy8kS

---------

Co-authored-by: Claude <noreply@anthropic.com>
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