Skip to content

ci(cron-conda): gate conda-tag and conda-dist on a dev-release version - #2463

Merged
JarryShaw merged 1 commit into
mainfrom
fix/2458-cron-conda-dev-gate
Oct 30, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
fix/2458-cron-conda-dev-gate

Conversation

@JarryShaw

@JarryShaw JarryShaw commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Please follow the guide below

  • Searched for similar pull requests
  • Followed the coding style (make pylint, make mypy, make isort) -- tests/project/test_isort_clean.py passes; no other lint run (advisory in CI)
  • make test passes, and a test case covers the change -- tests/project/test_conda_dev_release_gate_2458.py (new) and tests/project/test_cron_reports_2030.py; tests/project/test_release_gates.py and every other conda-* test file still pass unmodified
  • Added a changelog entry under docs/source/changelog/ and regenerated CHANGELOG.md, if the change is user-visible -- not applicable here; out of scope for this PR

What is the purpose of your pull request?

  • ci -- workflows or build tooling

Description of your pull request and other information

Closes #2458.

.github/workflows/create-release.yml's publishers are being gated on a dev-release version by #2452's (proposed, not yet merged) owner ruling: __version__ carrying a PEP 440 dev-release suffix (X.Y.Z.devN) is a work-in-progress signal, and that workflow's workflow_run trigger means a scheduled Vendor Update can reach it and publish that version with no human in the path.

.github/workflows/cron-conda.yml has its own independent route to publishing: conda-tag pushes a conda-<version>+<build> tag and conda-dist uploads to anaconda.org, both whenever mode's publishes output is 'true' and conda-update's CONDA_CHANGED is 'true' -- reachable the same way from its own schedule/workflow_run triggers, and until now with no dev-release check of its own. This PR:

  • adds PCAPKIT_DEV_RELEASE to conda-update's Get Version step, from packaging.version.Version(...).is_devrelease (deliberately not is_prerelease, which a shipped alpha/beta/rc also satisfies).
  • gates conda-tag's if: on it as a top-level conjunct, and conda-dist's inside its publishing branch only, so a build-only manual run still builds and smoke-tests a dev version without uploading it.
  • makes the discussion job's "Post the report to Discussions" step explain a pushed-but-withheld dev-release build ("Tag: skipped, and Upload: skipped -- ... withheld both deliberately") instead of silently dropping the Tag/Upload lines, so "nothing was pushed" and "a dev build was pushed but withheld" read differently.

Test plan

  • tests/project/test_conda_dev_release_gate_2458.py (new): the if: conditions, behavioural rows through job_runs/conda_context, and the real Get Version script against a 1.5.0b14 stub vs dev-suffixed stubs.
  • tests/project/test_cron_reports_2030.py: the dev-release explanation line, plus rows pinning it silent whenever CONDA_CHANGED or DEV_RELEASE is not literally 'true' (including an empty DEV_RELEASE).
  • Both test files together: 43 passed, 105 subtests passed.
  • actionlint 1.7.12 (shellcheck 0.10.0): zero findings on cron-conda.yml.

@JarryShaw JarryShaw added ci Pull requests that change CI or workflow configuration (ci: subject prefix) review: running A cross-review is in flight against the current head - no verdict yet labels Oct 30, 2026
@github-actions github-actions Bot added this to the PyPCAPKit v1.5 milestone Oct 30, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 30, 2026
@JarryShaw JarryShaw added review: needs-changes Cross-review at the current head says changes are required; see the verdict comment and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 30, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Cross-review (different model, adversarial) came back NEEDS CHANGES. The gate logic itself is verified correct (288-state evaluation, zero regressions), but:

  1. The conda run report goes silent/misleading on a gated dev-version run — mirrors ci: gate create-release.yml's publishers on a dev-release version #2452's own release_status finding, just on this workflow's own report script.
  2. Two narrowed-predicate mutations (adding and Version(v).pre is None / and not is_postrelease) survive all 13 tests — the suite needs a .postN.devM and a rcN.devM case in the real-script test, not just the hand-picked forms.
  3. Some comments/docstrings describe ci: gate create-release.yml's publishers on a dev-release version #2452's gate as already present on main — it's still open at review: needs-changes, so those need rewording to describe it as a sibling proposal, not an existing fact.

Dispatching a fix to this branch now.

@JarryShaw
JarryShaw force-pushed the fix/2458-cron-conda-dev-gate branch from 7ae0d43 to 27f36f9 Compare October 30, 2026 15:38
@JarryShaw

Copy link
Copy Markdown
Owner Author

Fixed and verified directly (new head 27f36f901): the discussion-report step now distinguishes "nothing pushed" from "a dev-release build was pushed but tag/upload withheld on purpose", added the 2 missing test cases that closed the narrowed-predicate gap, and reworded the stale #2452-as-fact references. 55 tests/118 subtests passing, actionlint clean.

@JarryShaw JarryShaw added review: running A cross-review is in flight against the current head - no verdict yet review: needs-changes Cross-review at the current head says changes are required; see the verdict comment and removed review: needs-changes Cross-review at the current head says changes are required; see the verdict comment review: running A cross-review is in flight against the current head - no verdict yet labels Oct 30, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Cross-review (different model, adversarial), round 3, came back NEEDS CHANGES. The report fix itself is verified correct for the real scenarios — but 3 mutations survive because the test suite only checks the "should explain" case, never the "should stay quiet" case:

  1. A dev version whose build wasn't pushed (CONDA_CHANGED=false) should NOT get the tag/upload explanation line, but nothing tests this — surviving mutation: dropping the CONDA_CHANGED guard entirely.
    2 & 3. Two more survive on the DEV_RELEASE emptiness check ([ -n "$DEV_RELEASE" ] and != false) for the same reason — no negative-case coverage.

Also: the commit message/PR body claim "55 passed, 118 subtests" — measured 42/102 for this round's actual diff (the higher count looks like it picked up a stale copy of an earlier round's test file). The PR body is also out of date (still describes an earlier round's scope).

Dispatching a fix now.

@JarryShaw
JarryShaw force-pushed the fix/2458-cron-conda-dev-gate branch from 27f36f9 to 6092919 Compare October 30, 2026 16:23
@JarryShaw

Copy link
Copy Markdown
Owner Author

Fixed and verified directly (new head 609291943): added the 3 "should stay quiet" test rows, each confirmed to fail against the specific mutation it closes (verified by editing the workflow's elif line in place, confirming failure, then restoring). Corrected the inflated test-count claim — real count is 43 passed/105 subtests, not 55/118 (the earlier number picked up a stale duplicate test file). PR body rewritten to describe the current state accurately.

@JarryShaw JarryShaw added review: running A cross-review is in flight against the current head - no verdict yet review: needs-changes Cross-review at the current head says changes are required; see the verdict comment and removed review: needs-changes Cross-review at the current head says changes are required; see the verdict comment review: running A cross-review is in flight against the current head - no verdict yet labels Oct 30, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Round 5: wording-only fix needed — commit claims mypy clean, but it isn't on the 2458 test file (15 attr-defined + 3 unused-ignore, pre-existing pattern, not CI-gated). Fixing the claim.

#2458)

Mirror create-release.yml's #2452 dev-release gate in cron-conda.yml, which
has its own independent, schedule/workflow_run-reachable route to publishing
with no check against __version__ carrying a PEP 440 .devN suffix.

- conda-update's Get Version step computes PCAPKIT_DEV_RELEASE from
  packaging.version.Version(...).is_devrelease, deliberately not
  is_prerelease, which is also true for a real alpha/beta/rc this project has
  shipped and must not block.
- conda-tag's `if:` adds the clause as a top-level conjunct; conda-dist's adds
  it inside its publishing branch only, so a build-only manual run still
  builds and smoke-tests a dev version without uploading it.
- discussion's "Post the report to Discussions" step now tells "nothing
  pushed" apart from "a dev-release build was pushed but Tag/Upload were
  withheld on purpose", instead of silently dropping both lines; the stale
  "Both skip unless a build was pushed" comment is corrected.
- Comments describing #2452's create-release.yml gate as already merged are
  reworded to "proposed ... (not yet merged)".
- test_conda_dev_release_gate_2458.py gains two inputs (1.6.0rc1.dev2,
  1.6.0.post1.dev0) that close two narrowed-predicate mutations a
  cross-review found surviving; test_cron_reports_2030.py gains coverage for
  the new report line, plus three rows closing round 3's remaining gaps --
  CONDA_CHANGED=false with DEV_RELEASE=true, DEV_RELEASE=false, and
  DEV_RELEASE='' on a pushed build -- each confirmed to kill its own
  widened-predicate mutant of the explanation line's elif guard.

actionlint 1.7.12 (shellcheck 0.10.0): zero findings. Both test files: 43
passed, 105 subtests passed, including the new report and mutation-closing
cases; pylint clean on both files; mypy clean on test_cron_reports_2030.py
(the 2458 file carries the same pre-existing attr-defined/unused-ignore
pattern as sibling tests, not CI-gated).
@JarryShaw
JarryShaw force-pushed the fix/2458-cron-conda-dev-gate branch from 6092919 to 1cf10db Compare October 30, 2026 17:01
@JarryShaw

Copy link
Copy Markdown
Owner Author

Wording-only fix confirmed (zero file diff). Good to go.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: needs-changes Cross-review at the current head says changes are required; see the verdict comment labels Oct 30, 2026
@JarryShaw
JarryShaw merged commit 058ef5b into main Oct 30, 2026
59 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 30, 2026
@JarryShaw
JarryShaw deleted the fix/2458-cron-conda-dev-gate branch October 30, 2026 18:16
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Pull requests that change CI or workflow configuration (ci: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

cron-conda.yml has no dev-version gate; can publish a .devN build to Anaconda

1 participant