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
37 changes: 37 additions & 0 deletions .github/workflows/queue-health-report.yml
Original file line number Diff line number Diff line change
@@ -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
64 changes: 0 additions & 64 deletions scripts/compare_gamma_candidates.py

This file was deleted.

47 changes: 47 additions & 0 deletions specs/port/scripts/compare_gamma_candidates.t27
Original file line number Diff line number Diff line change
@@ -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;
}
Loading