From 35bde66c5a32bc7cb7ccc818a28f91f8db265703 Mon Sep 17 00:00:00 2001 From: Yueqi Chen Date: Mon, 7 Sep 2026 19:21:04 -0600 Subject: [PATCH] CI runs on every push and pull request of the published edition; the corpus is a job; issue and PR templates The published edition's Actions are free, so its ci.yml and hygiene.yml get push, pull_request and (for hygiene) a weekly schedule, through swapped trigger blocks; this tree keeps manual dispatch and says why. A corpus job runs the twelve cases and fails on a diff of corpus/baseline.json, so the file cannot lag behind main again as it did today. Two issue templates -- a refused translation, where the argument is the contribution, and a defect -- a contact link to the private advisory form and to Discussions, and a pull request template with the three checks. Co-Authored-By: Claude Fable 5.1 Signed-off-by: Yueqi Chen Carried-From: c7cf88c90aaa5304c6d4b3e4c5297e1709f4c44e --- .github/ISSUE_TEMPLATE/config.yml | 8 ++++++ .github/ISSUE_TEMPLATE/defect.md | 19 +++++++++++++ .github/ISSUE_TEMPLATE/refused-translation.md | 22 +++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 10 +++++++ .github/workflows/ci.yml | 28 +++++++++++++------ .github/workflows/hygiene.yml | 13 ++++----- 6 files changed, 84 insertions(+), 16 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/defect.md create mode 100644 .github/ISSUE_TEMPLATE/refused-translation.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..dd40eef --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: true +contact_links: + - name: Security vulnerability + url: https://github.com/a85tract/RecastEngine/security/advisories/new + about: Report privately, never as a public issue; see SECURITY.md. + - name: Question or idea + url: https://github.com/a85tract/RecastEngine/discussions + about: Anything that is not a defect or a refused translation. diff --git a/.github/ISSUE_TEMPLATE/defect.md b/.github/ISSUE_TEMPLATE/defect.md new file mode 100644 index 0000000..063a11d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/defect.md @@ -0,0 +1,19 @@ +--- +name: A defect +about: A translation the gate passed that is wrong, a crash, or a plugin that misbehaves +labels: bug +--- + +**What happened.** The command, its output, and what should have happened +instead. If a gate passed something it should not have, this is the most +serious kind of report there is: say which gate and attach the evidence +manifest. + +``` +``` + +**Reproduction.** The smallest input that shows it. A corpus case can be +named instead of attached. + +**Version.** `recast version`, the Python version, and `gfortran --version` +if an oracle was involved. diff --git a/.github/ISSUE_TEMPLATE/refused-translation.md b/.github/ISSUE_TEMPLATE/refused-translation.md new file mode 100644 index 0000000..6103cd0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/refused-translation.md @@ -0,0 +1,22 @@ +--- +name: A unit the engine refused or deferred +about: The engine said what it would not translate; you think it should have +labels: enhancement, area:frontend +--- + +**The Fortran.** The smallest module that reproduces it, inline or attached. +A unit the corpus already carries can be named instead. + +**What the engine said.** The refusal or the deferred block, copied from +`recast run` or from the evidence manifest -- the exact text, since a +refusal names its reason and the reason is what is being discussed. + +``` +``` + +**What you expected.** The NumPy the rule should have produced, if you have +an opinion, and why it is bit-exact with the Fortran. A rule that is added +here has to hold against f2py on the corpus, so the argument is the +contribution. + +**Version.** `recast version` and the Python version. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..8164e34 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,10 @@ +**What this changes, and the evidence.** A new verifier shows the numbers +it produces; a new transform shows what lands in `deferred` as well as what +translates; a rule shows the corpus unit it holds on. See CONTRIBUTING.md, +"What a good PR looks like". + +**Checks.** + +- [ ] `tools/ci_local.sh` passes, or the CI on this pull request does +- [ ] every commit is signed off (`git commit -s`), and I am in `CLA-SIGNATORIES.md` +- [ ] no name or path from CONTRIBUTING.md's "already taken" list is added diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78b75a7..3ef95c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,14 +1,9 @@ name: ci -# Automatic runs are off while the Actions allowance is exhausted, and as of -# 2026-08-21 the workflow itself is disabled on GitHub (`gh workflow disable`), -# so even a manual dispatch is refused. The allowance returns in September. -# -# To restore, both halves are needed and only one of them is visible here: -# gh workflow enable ci.yml -# ...then put back the push (main) and pull_request triggers below. -# Until then, tools/ci_local.sh runs these same jobs from the same file. on: + push: + branches: [main] + pull_request: workflow_dispatch: permissions: @@ -78,6 +73,23 @@ jobs: # rather than skip for want of fparser. - run: uv run --python ${{ matrix.python }} --extra dev --extra fortran --extra translate pytest --cov=recast + # The twelve corpus cases, run rather than trusted: corpus/baseline.json is + # what the engine says about them, and a change in what it says is a change + # in the engine, which this job makes visible as a diff rather than letting + # the file lag behind main. One minute; the cases are small on purpose. + corpus: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + submodules: true + - uses: astral-sh/setup-uv@v3 + - run: sudo apt-get update && sudo apt-get install -y gfortran + - run: uv python install 3.11 + - run: uv run --extra dev --extra fortran --extra translate --extra verify python tools/corpus.py run + - name: The baseline is what main says + run: git diff --exit-code -- corpus/baseline.json + # The contract, run rather than read. This is the suite an out-of-tree # extension has to pass to be an extension and not a fork, so the engine # running it against its own plugins is the minimum: a check nobody's plugins diff --git a/.github/workflows/hygiene.yml b/.github/workflows/hygiene.yml index a2b4c08..e337687 100644 --- a/.github/workflows/hygiene.yml +++ b/.github/workflows/hygiene.yml @@ -4,15 +4,12 @@ name: hygiene # after. Migrating 10k lines out of two NCAR-bound private repositories is # exactly the situation where a site path or an allocation account slips in. -# Automatic runs are off while the Actions allowance is exhausted, and as of -# 2026-08-21 the workflow itself is disabled on GitHub (`gh workflow disable`), -# so even a manual dispatch is refused. The allowance returns in September. -# -# To restore, both halves are needed and only one of them is visible here: -# gh workflow enable hygiene.yml -# ...then put back the push, pull_request, and Monday 06:00 UTC schedule triggers below. -# Until then, tools/ci_local.sh runs these same jobs from the same file. on: + push: + branches: [main] + pull_request: + schedule: + - cron: "0 6 * * 1" workflow_dispatch: permissions: