Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion .github/workflows/c6-factorial-moment.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: C6 factorial-moment candidate checks

# PR-time full tests/ suite (both modes) runs once in full-regression-suite.yml
# (C166). This workflow keeps the suite before its packet for manual dispatch.
'on':
pull_request:
paths:
- 'frontiers/c6_factorial_moment_20260929/**'
- '.github/workflows/c6-factorial-moment.yml'
- 'tools/d5_c6_replay.py'
- 'tests/**'
- 'tests/test_d5_c6_workflows.py'
- 'tests/test_c6_factorial_job_budget.py'
workflow_dispatch:

permissions:
Expand All @@ -24,7 +27,25 @@ jobs:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: '3.11.16'
- name: Bind tested commit
env:
TESTED_SHA: ${{ github.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
EVENT_NAME: ${{ github.event_name }}
RUN_ID: ${{ github.run_id }}
RUN_ATTEMPT: ${{ github.run_attempt }}
run: |
set -euo pipefail
checked_out="$(git rev-parse HEAD)"
if [ "$checked_out" != "$TESTED_SHA" ]; then
echo "checked-out commit $checked_out is not the tested commit $TESTED_SHA" >&2
exit 1
fi
record="tested-commit sha=$TESTED_SHA tree=$(git rev-parse 'HEAD^{tree}') pr_head=${PR_HEAD_SHA:-none} event=$EVENT_NAME run=$RUN_ID/$RUN_ATTEMPT"
echo "$record"
echo "$record" >> "${GITHUB_STEP_SUMMARY:-/dev/null}"
- name: Full repository regression suite in both Python modes
if: github.event_name == 'workflow_dispatch'
run: |
set -euo pipefail
python -B -S -m unittest discover -s tests -v
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/c6-palm-route.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: C6 Palm-route checks

# PR-time full tests/ suite (both modes) runs once in full-regression-suite.yml
# (C166). This workflow keeps the suite before its packet for manual dispatch.
'on':
pull_request:
paths:
- 'frontiers/c6_palm_route_20260929/**'
- '.github/workflows/c6-palm-route.yml'
- 'tools/d5_c6_replay.py'
- 'tests/**'
- 'tests/test_d5_c6_workflows.py'
workflow_dispatch:

permissions:
Expand All @@ -24,7 +26,25 @@ jobs:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: '3.11.16'
- name: Bind tested commit
env:
TESTED_SHA: ${{ github.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
EVENT_NAME: ${{ github.event_name }}
RUN_ID: ${{ github.run_id }}
RUN_ATTEMPT: ${{ github.run_attempt }}
run: |
set -euo pipefail
checked_out="$(git rev-parse HEAD)"
if [ "$checked_out" != "$TESTED_SHA" ]; then
echo "checked-out commit $checked_out is not the tested commit $TESTED_SHA" >&2
exit 1
fi
record="tested-commit sha=$TESTED_SHA tree=$(git rev-parse 'HEAD^{tree}') pr_head=${PR_HEAD_SHA:-none} event=$EVENT_NAME run=$RUN_ID/$RUN_ATTEMPT"
echo "$record"
echo "$record" >> "${GITHUB_STEP_SUMMARY:-/dev/null}"
- name: Full repository regression suite in both Python modes
if: github.event_name == 'workflow_dispatch'
run: |
set -euo pipefail
python -B -S -m unittest discover -s tests -v
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/d5-dimension-lift.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: D5 dimension-lift checks

# PR-time full tests/ suite (both modes) runs once in full-regression-suite.yml
# (C166). This workflow keeps the suite before its packet for manual dispatch.
'on':
pull_request:
paths:
- 'frontiers/d5_dimension_lift_20260929/**'
- '.github/workflows/d5-dimension-lift.yml'
- 'tools/d5_c6_replay.py'
- 'tests/**'
- 'tests/test_d5_c6_workflows.py'
workflow_dispatch:

permissions:
Expand All @@ -24,7 +26,25 @@ jobs:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: '3.11.16'
- name: Bind tested commit
env:
TESTED_SHA: ${{ github.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
EVENT_NAME: ${{ github.event_name }}
RUN_ID: ${{ github.run_id }}
RUN_ATTEMPT: ${{ github.run_attempt }}
run: |
set -euo pipefail
checked_out="$(git rev-parse HEAD)"
if [ "$checked_out" != "$TESTED_SHA" ]; then
echo "checked-out commit $checked_out is not the tested commit $TESTED_SHA" >&2
exit 1
fi
record="tested-commit sha=$TESTED_SHA tree=$(git rev-parse 'HEAD^{tree}') pr_head=${PR_HEAD_SHA:-none} event=$EVENT_NAME run=$RUN_ID/$RUN_ATTEMPT"
echo "$record"
echo "$record" >> "${GITHUB_STEP_SUMMARY:-/dev/null}"
- name: Full repository regression suite in both Python modes
if: github.event_name == 'workflow_dispatch'
run: |
set -euo pipefail
python -B -S -m unittest discover -s tests -v
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/full-regression-suite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Full repository regression suite

# C166 (W9f Option 4B + W7h E): the one PR-time execution of the complete
# tests/ suite in both Python modes for the former c6-palm-route,
# d5-dimension-lift and c6-factorial-moment trigger union, widened to tools/**.
# Those three workflows keep the same suite for workflow_dispatch only.
# This check is not required by any ruleset merely because this file exists.
'on':
pull_request:
paths:
- '.github/workflows/full-regression-suite.yml'
- '.github/workflows/c6-factorial-moment.yml'
- '.github/workflows/c6-palm-route.yml'
- '.github/workflows/d5-dimension-lift.yml'
- 'frontiers/c6_factorial_moment_20260929/**'
- 'frontiers/c6_palm_route_20260929/**'
- 'frontiers/d5_dimension_lift_20260929/**'
- 'tests/**'
- 'tools/**'
workflow_dispatch:

permissions:
contents: read

jobs:
full-suite:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: '3.11.16'
- name: Bind tested commit
env:
TESTED_SHA: ${{ github.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
EVENT_NAME: ${{ github.event_name }}
RUN_ID: ${{ github.run_id }}
RUN_ATTEMPT: ${{ github.run_attempt }}
run: |
set -euo pipefail
checked_out="$(git rev-parse HEAD)"
if [ "$checked_out" != "$TESTED_SHA" ]; then
echo "checked-out commit $checked_out is not the tested commit $TESTED_SHA" >&2
exit 1
fi
record="tested-commit sha=$TESTED_SHA tree=$(git rev-parse 'HEAD^{tree}') pr_head=${PR_HEAD_SHA:-none} event=$EVENT_NAME run=$RUN_ID/$RUN_ATTEMPT"
echo "$record"
echo "$record" >> "${GITHUB_STEP_SUMMARY:-/dev/null}"
- name: Full repository regression suite in both Python modes
run: |
set -euo pipefail
python -B -S -m unittest discover -s tests -v
python -B -O -S -m unittest discover -s tests -v
- name: Confirm the suite left the tested commit unchanged
env:
TESTED_SHA: ${{ github.sha }}
run: |
set -euo pipefail
test "$(git rev-parse HEAD)" = "$TESTED_SHA"
git diff --exit-code
17 changes: 14 additions & 3 deletions tests/test_c6_factorial_job_budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,21 @@ def test_one_explicit_finite_job_budget(self):
self.assertIn(' exact-and-probe:\n runs-on: ubuntu-latest\n'
' timeout-minutes: 20\n steps:\n', self.text)

def test_both_complete_regression_modes_are_unconditional(self):
def test_both_complete_regression_modes_run_before_manual_packet(self):
# C166: the PR-time run moved to full-regression-suite.yml. Here the
# exact block stays, guarded only by the one manual-dispatch condition;
# no other condition, bypass or always-run override is permitted.
step = named_step(self.text, REGRESSION)
self.assertEqual(step,
" if: github.event_name == 'workflow_dispatch'\n"
' run: |\n'
' set -euo pipefail\n'
' python -B -S -m unittest discover -s tests -v\n'
' python -B -O -S -m unittest discover -s tests -v\n')
self.assertLess(self.text.index(REGRESSION), self.text.index(NUMERICAL))
for bypass in ('continue-on-error:', 'if:', 'background:'):
self.assertEqual(re.findall(r'^.*\bif:.*$', self.text, re.MULTILINE),
[" if: github.event_name == 'workflow_dispatch'"])
for bypass in ('continue-on-error:', 'background:', 'always()', 'failure()', 'cancelled()'):
self.assertNotIn(bypass, self.text)

def test_numerical_budget_inventory_and_postflight_remain(self):
Expand Down Expand Up @@ -82,7 +88,12 @@ def test_numerical_budget_inventory_and_postflight_remain(self):
self.assertIn(guard, program)

def test_new_test_is_covered_and_execution_permissions_are_unchanged(self):
self.assertIn(" - 'tests/**'\n", self.text)
# C166: tests/** coverage is central; this packet keeps its own tests.
central = (ROOT / '.github/workflows/full-regression-suite.yml').read_text(encoding='utf-8')
self.assertIn(" - 'tests/**'\n", central)
self.assertNotIn(" - 'tests/**'\n", self.text)
self.assertIn(" - 'tests/test_c6_factorial_job_budget.py'\n", self.text)
self.assertIn(" - 'tests/test_d5_c6_workflows.py'\n", self.text)
self.assertIn('permissions:\n contents: read\n', self.text)
self.assertIn(' persist-credentials: false\n fetch-depth: 0\n', self.text)
self.assertIn(" python-version: '3.11.16'\n", self.text)
Expand Down
17 changes: 16 additions & 1 deletion tests/test_d5_c6_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,29 @@ def test_existing_baseline_and_source_guards(self):
self.verify(family,behavior,modes=(0,))

def test_all_workflows_run_regressions_and_track_inputs(self):
# C166: the PR-time tests/** regression moved to one central workflow;
# each packet workflow keeps both modes for workflow_dispatch only and
# keeps its own packet, helper, workflow and packet-test triggers.
central=(ROOT/'.github/workflows/full-regression-suite.yml').read_text()
self.assertIn(" - 'tests/**'\n",central)
self.assertIn(" - 'tools/**'\n",central)
self.assertIn('python -B -S -m unittest discover -s tests -v',central)
self.assertIn('python -B -O -S -m unittest discover -s tests -v',central)
self.assertNotIn('continue-on-error',central)
for family in CONFIG:
text=(ROOT/'.github/workflows'/(CONFIG[family][0]+'.yml')).read_text()
with self.subTest(family=family):
self.assertIn("- 'tools/d5_c6_replay.py'",text)
self.assertIn("- 'tests/**'",text)
self.assertIn("- 'tests/test_d5_c6_workflows.py'",text)
self.assertNotIn("- 'tests/**'",text)
self.assertIn(" - '.github/workflows/"+CONFIG[family][0]+".yml'\n",central)
self.assertIn(" - 'frontiers/"+CONFIG[family][1]+"/**'\n",central)
self.assertIn('fetch-depth: 0',text)
self.assertIn('python -B -S -m unittest discover -s tests -v',text)
self.assertIn('python -B -O -S -m unittest discover -s tests -v',text)
self.assertEqual(text.count(' if: '),1)
self.assertIn(" - name: Full repository regression suite in both Python modes\n"
" if: github.event_name == 'workflow_dispatch'\n",text)
self.assertIn("python-version: '3.11.16'",text)
self.assertNotIn('continue-on-error',text)

Expand Down
Loading
Loading