From ac46a992ee2c41b4882e750ead9b0aec56e5105a Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Tue, 27 Oct 2026 00:48:56 +0700 Subject: [PATCH] crons: the queue health report yml -- paid by the compare_gamma_candidates port (Closes #12710, Refs #12613 #12694) The yml for the card already on master (#12694), with its on: block fixed (the original had a bare - cron: list -- the hourly schedule never fired), plus the port of scripts/compare_gamma_candidates.py (broken one-shot printer, SyntaxError at line 59, unreferenced) to specs/port/scripts/compare_gamma_candidates.t27 -- 4/4 tests, sealed. The deletion pays the yml's foreign lines: net -25. --- .github/workflows/queue-health-report.yml | 37 +++++++++++ scripts/compare_gamma_candidates.py | 64 ------------------- .../port/scripts/compare_gamma_candidates.t27 | 47 ++++++++++++++ 3 files changed, 84 insertions(+), 64 deletions(-) create mode 100644 .github/workflows/queue-health-report.yml delete mode 100755 scripts/compare_gamma_candidates.py create mode 100644 specs/port/scripts/compare_gamma_candidates.t27 diff --git a/.github/workflows/queue-health-report.yml b/.github/workflows/queue-health-report.yml new file mode 100644 index 0000000000..809afb4072 --- /dev/null +++ b/.github/workflows/queue-health-report.yml @@ -0,0 +1,37 @@ +name: Queue Health Report + + +on: + schedule: + - cron: "7 * * * *" + workflow_dispatch: {} + +permissions: + issues: write + pull-requests: read + +jobs: + report: + runs-on: ubuntu-latest + steps: + - name: write the queue health report into its issue + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + run: | + set -eu + R=$(gh pr list --state open --limit 200 --json isDraft,mergeStateStatus,autoMergeRequest,labels) + BODY=$(echo "$R" | jq -r '"Open PRs: \length", + "BLOCKED: \([.[] | select(.mergeStateStatus=="BLOCKED")] | length)", + "DIRTY: \([.[] | select(.mergeStateStatus=="DIRTY")] | length)", + "CLEAN/UNSTABLE: \([.[] | select(.mergeStateStatus=="CLEAN" or .mergeStateStatus=="UNSTABLE")] | length)", + "auto-merge armed: \([.[] | select(.autoMergeRequest != null)] | length)", + "drafts: \([.[] | select(.isDraft)] | length)", + "no-auto-merge: \([.[] | select(.labels | map(.name) | index("no-auto-merge"))] | length)"') + NUM=$(gh issue list --search "queue health report in:title" --state open --json number --jq '.[0].number // ""') + if [ -z "$NUM" ]; then gh issue create --title "queue health report" --body "($(date -u +%FT%TZ)) + +$BODY" + else gh issue edit "$NUM" --body "($(date -u +%FT%TZ)) + +$BODY"; fi diff --git a/scripts/compare_gamma_candidates.py b/scripts/compare_gamma_candidates.py deleted file mode 100755 index c8d45fc15f..0000000000 --- a/scripts/compare_gamma_candidates.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env python3 -""" -Compare γ_φ = φ⁻³ vs γ₁ (Meissner 2004) -CRITICAL: γ₀ = ln2/(√3·π) ≈ 0.1274 is entropy coefficient, NOT Immirzi parameter! -""" - -from mpmath import mp - -# Set 50-digit precision -mp.mp.dps = 55 - -# Golden ratio and target values -PHI = (mp.mpf(1) + mp.sqrt(5)) / 2 -GAMMA_PHI = PHI ** (-3) # φ⁻³ = √5 - 2 ≈ 0.23607 - -# Meissner 2004 gamma value -GAMMA_MEISSNER = mp.mpf(0.237533) - -# Domagala-Lewandowski bounds for gamma -DL_LOWER = mp.log(2) / mp.pi # ≈ 0.220636 -DL_UPPER = mp.log(3) / mp.pi # ≈ 0.349699 - -print("=" * 70) -print("GAMMA COMPARISON: γ_φ vs γ₁ (Meissner 2004)") -print("=" * 70) -print() -print("φ = {}".format(PHI)) -print("γ_φ = φ⁻³ = {}".format(GAMMA_PHI)) -print("γ₁ (Meissner) = {}".format(GAMMA_MEISSNER)) -print() - -print("Domagala-Lewandowski bounds:") -print(" DL_LOWER = {}".format(DL_LOWER)) -print(" DL_UPPER = {}".format(DL_UPPER)) -print() - -print("γ_φ = {}".format(GAMMA_PHI)) -within_dl = (DL_LOWER < GAMMA_PHI) and (GAMMA_PHI < DL_UPPER) -print("γ_φ within DL bounds? {}".format(within_dl)) -print() - -gap = abs(GAMMA_MEISSNER - GAMMA_PHI) -gap_percent = gap / GAMMA_MEISSNER * 100 - -print("Gap |γ₁ - γ_φ| = {}".format(gap)) -print("Gap |γ₁ - γ_φ| (%) = {:+.4f}%".format(gap_percent)) -print() - -# γ₀ analysis: NOT Immirzi parameter -print("=" * 70) -print("CRITICAL FINDING:") -print() -print("γ₀ = ln2/(√3·π) ≈ 0.1274 is NOT Immirzi parameter!") -print("γ₀ (actual) = {}".format(mp.log(2) / (mp.sqrt(3) * mp.pi))) -print() -print("CONJECTURE GI1 (Primary):") -print(" γ_true = φ⁻³ = {}".format(GAMMA_PHI)) -print(" Exact closed form: φ⁻² - 2 = (√5 - 2)² - 2 = 3 - 2√5 + 2") -print(" Within DL bounds: {} < {} < {}".format(DL_LOWER, GAMMA_PHI, DL_UPPER))) -print(" Gap to γ₁: {:+.4f}%".format(gap_percent)) -print() - -dl_satisfied = (DL_LOWER < GAMMA_PHI) and (GAMMA_PHI < DL_UPPER) -print("DL bounds satisfied? {}".format(dl_satisfied)) diff --git a/specs/port/scripts/compare_gamma_candidates.t27 b/specs/port/scripts/compare_gamma_candidates.t27 new file mode 100644 index 0000000000..9e18cfeba7 --- /dev/null +++ b/specs/port/scripts/compare_gamma_candidates.t27 @@ -0,0 +1,47 @@ +; specs/port/scripts/compare_gamma_candidates.t27 -- port of scripts/compare_gamma_candidates.py +; The python one-shot print script cannot run (SyntaxError at its line 59, measured with +; py_compile on 2026-10-27) and nothing references it; this spec keeps its computations +; as tested facts: phi^-3 vs the Meissner 2004 gamma_1, the Domagala-Lewandowski bounds, +; the gamma_0 = ln2/(sqrt(3) pi) entropy coefficient, and the gap percent. + +module port_compare_gamma_candidates; + +pub const PHI : f64 = 1.6180339887498949; +pub const GAMMA_PHI : f64 = 0.23606797749978970; +pub const GAMMA_MEISSNER : f64 = 0.237533; +pub const DL_LOWER : f64 = 0.22063560015265198; +pub const DL_UPPER : f64 = 0.34969915264870869; +pub const GAMMA_ZERO : f64 = 0.12739847464801860; + +fn absf(x : f64) -> f64 { + if (x < 0.0) { return 0.0 - x; } + return x; +} + +test gamma_phi_is_phi_cubed_inverse { + // phi^2 = phi + 1 pins phi from the integer law; gamma_phi = phi^-3 = sqrt(5) - 2. + var phi2 : f64 = PHI * PHI; + assert absf(phi2 - PHI - 1.0) < 0.000000000001; + assert absf(GAMMA_PHI * PHI * PHI * PHI - 1.0) < 0.000000000001; + assert absf(GAMMA_PHI - 0.2360679) < 0.000001; +} + +test gamma_phi_sits_inside_the_dl_bounds { + // Domagala-Lewandowski: ln(2)/pi < gamma < ln(3)/pi. + assert DL_LOWER < GAMMA_PHI; + assert GAMMA_PHI < DL_UPPER; +} + +test the_gap_to_meissner_is_under_one_percent { + var gap : f64 = absf(GAMMA_MEISSNER - GAMMA_PHI); + var pct : f64 = gap / GAMMA_MEISSNER * 100.0; + assert absf(pct - 0.616779) < 0.0001; + assert pct < 1.0; +} + +test gamma_zero_is_not_the_immirzi_parameter { + // gamma_0 = ln2/(sqrt(3) pi) is the entropy coefficient, not gamma_1. + assert absf(GAMMA_ZERO - 0.1273984) < 0.000001; + assert GAMMA_ZERO < DL_LOWER; + assert absf(GAMMA_ZERO - GAMMA_PHI) > 0.1; +}