GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — check-remote-config: pre-releases allowed unless require-stable (defe… · openlogix/.github@96519cd

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • actions-test.yaml
  • CLAUDE.md
  • README.md
  • actions/check-remote-config
    • action.yaml
    • check_remote_config.py
  • schemas
    • logix-remote-config-v1.json
  • tests/check-remote-config
    • run.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/actions-test.yaml‎

Copy file name to clipboardExpand all lines: .github/workflows/actions-test.yaml
+9-2Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117

118118
# -- check-remote-config: the checker on every case (with a fake gh that
119119
# -- answers from fixture releases), then the action itself, passing on a
120-
# -- good config and failing on a pre-release.
120+
# -- good config and on a pre-release, failing on one with require-stable.
121121
test-check-remote-config:
122122
runs-on: ubuntu-latest
123123
steps:
@@ -141,13 +141,20 @@ jobs:
141141
folder: tests/check-remote-config/cases/good/remote-config
142142
platforms: darwin-arm64 linux-x86-64
143143

144-
- name: Check a config naming a pre-release
144+
- name: Check a config naming a pre-release, allowed by default
145+
uses: ./actions/check-remote-config
146+
with:
147+
folder: tests/check-remote-config/cases/prerelease/remote-config
148+
platforms: darwin-arm64
149+
150+
- name: Check it again, requiring stable releases
145151
id: prerelease
146152
continue-on-error: true
147153
uses: ./actions/check-remote-config
148154
with:
149155
folder: tests/check-remote-config/cases/prerelease/remote-config
150156
platforms: darwin-arm64
157+
require-stable: "true"
151158

152159
- name: Assert that the pre-release was refused
153160
uses: ./actions/assert-step-failed
Collapse file

‎CLAUDE.md‎

Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Action details:
2929
- `actions/release-policy.sh`: the pre-release policy, the one place it's set (`PRERELEASE_KEEP=5`: pre-releases are daily, so each is deleted after about 5 days unless made stable). `publish-pre-release` applies it and states it in every release text.
3030
- `check-platform`: `os` is a substring of `uname -o`, `arch` equals `uname -m`, case-insensitive.
3131
- `scan-files-for-viruses`: `file-patterns`; each pattern must match a file; ClamAV with `freshclam`, scans inside archives.
32-
- `check-remote-config`: `folder` (default `remote-config`), `platforms` (what `${PLATFORM}` stands for, required), `owner` (default `openlogix`). Needs a checkout. Checks every `<product>/config-NNN.jsonc` (`check_remote_config.py`, jsonschema in a venv): file names, JSONC, the schema in `schemas/`, and per dependency that its release exists and is stable, its file exists for each platform, and the release's `SHA256SUMS` lists it; on `main` and pull requests into `main`, repos must be in `owner`. Reports every problem as an annotation, then fails. Reads releases with `gh api repos/<repo>/releases/tags/<tag>` and `gh release download <tag> -R <repo> -p SHA256SUMS -O -` (the tests' fake `gh` answers exactly these). A component's own checks (its tests with the named releases, the dependencies its source expects) stay in its repo.
32+
- `check-remote-config`: `folder` (default `remote-config`), `platforms` (what `${PLATFORM}` stands for, required), `owner` (default `openlogix`), `require-stable` (default `false`: pre-releases are allowed while Open Logix is in development). Needs a checkout. Checks every `<product>/config-NNN.jsonc` (`check_remote_config.py`, jsonschema in a venv): file names, JSONC, the schema in `schemas/`, and per dependency that its release exists (not a draft; stable, with `require-stable`), its file exists for each platform, and the release's `SHA256SUMS` lists it; on `main` and pull requests into `main`, repos must be in `owner`. Reports every problem as an annotation, then fails. Reads releases with `gh api repos/<repo>/releases/tags/<tag>` and `gh release download <tag> -R <repo> -p SHA256SUMS -O -` (the tests' fake `gh` answers exactly these). A component's own checks (its tests with the named releases, the dependencies its source expects) stay in its repo.
3333
- `assert-step-failed`: `outcome`, `error-message`; for testing expected failures.
3434
- `.github/workflows/publish-docs.yaml`: a reusable workflow (`workflow_call`) that builds a repo's MkDocs site with `--strict` and deploys it to its GitHub Pages. Callers keep the triggers, the Pages permissions and the `pages` concurrency group, and call `openlogix/.github/.github/workflows/publish-docs.yaml@main`.
3535

Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Composite actions in [actions/](actions), and one reusable workflow, used from t
4040
| `publish-pre-release` | A release workflow's end: checksums, the standard release text, the day's pre-release made again from scratch, and the cleanup |
4141
| `check-platform` | Fails unless the runner has the given OS and architecture |
4242
| `scan-files-for-viruses` | Scans files, including inside archives, with ClamAV |
43-
| `check-remote-config` | Checks a repo's remote configs (`remote-config/<product>/config-NNN.jsonc`): the schema, and that every named release is stable and has its files |
43+
| `check-remote-config` | Checks a repo's remote configs (`remote-config/<product>/config-NNN.jsonc`): the schema, and that every named release exists and has its files |
4444
| `assert-step-failed` | Fails unless an earlier step failed, for testing expected failures |
4545
| [`publish-docs.yaml`](.github/workflows/publish-docs.yaml) (reusable workflow) | Builds a repo's MkDocs site and deploys it to its GitHub Pages |
4646

Collapse file

‎actions/check-remote-config/action.yaml‎

Copy file name to clipboardExpand all lines: actions/check-remote-config/action.yaml
+9-2Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ description: >-
33
Checks a repo's remote configs, remote-config/<product>/config-NNN.jsonc
44
(Remote updates, in the website repo's CLAUDE.md): file names, JSONC, the
55
schema (schemas/logix-remote-config-v1.json in this repo), and for every
6-
dependency that its release exists and is stable, that its file exists for
6+
dependency that its release exists (and is stable, with require-stable),
7+
that its file exists for
78
each platform and that the release's SHA256SUMS lists it. On main, and on
89
pull requests into main, repos must be in the owner. Reports every problem,
910
then fails if there were any. Needs a checkout and GH_TOKEN.
@@ -19,6 +20,10 @@ inputs:
1920
description: "The only owner repos may have on main and on pull requests into main."
2021
required: false
2122
default: openlogix
23+
require-stable:
24+
description: "'true' to refuse pre-releases. Off while Open Logix is in development (Remote updates, in the website repo's CLAUDE.md)."
25+
required: false
26+
default: "false"
2227
runs:
2328
using: "composite"
2429
steps:
@@ -35,6 +40,7 @@ runs:
3540
FOLDER: ${{ inputs.folder }}
3641
PLATFORMS: ${{ inputs.platforms }}
3742
OWNER: ${{ inputs.owner }}
43+
REQUIRE_STABLE: ${{ inputs.require-stable }}
3844
GH_TOKEN: ${{ env.GH_TOKEN || github.token }}
3945
run: |
4046
set -euo pipefail
@@ -47,4 +53,5 @@ runs:
4753
--folder "$FOLDER" \
4854
--schema "${{ github.action_path }}/../../schemas/logix-remote-config-v1.json" \
4955
--platforms "$PLATFORMS" \
50-
--owner "$owner"
56+
--owner "$owner" \
57+
$([[ "$REQUIRE_STABLE" == "true" ]] && echo --require-stable)
Collapse file

‎actions/check-remote-config/check_remote_config.py‎

Copy file name to clipboardExpand all lines: actions/check-remote-config/check_remote_config.py
+14-7Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
33
For each file: its name, its JSONC syntax, the schema (logix-remote-config-v1,
44
in this repo's schemas/), and for each dependency: its repo's owner (when
5-
--owner is given), that its release exists and is stable (not a pre-release
6-
or a draft), that its file exists for every platform, and that the release's
5+
--owner is given), that its release exists (and, with --require-stable, is
6+
stable: not a pre-release; never a draft), that its file exists for every platform, and that the release's
77
SHA256SUMS lists it. Every problem is reported, as a GitHub annotation, and
88
the exit status is 1 if there were any.
99
@@ -65,7 +65,9 @@ def gh(*args: str) -> tuple[int, str]:
6565
return r.returncode, r.stdout if r.returncode == 0 else r.stderr
6666

6767

68-
def check_dependency(name: str, dep: dict, platforms: list[str], owner: str) -> list[str]:
68+
def check_dependency(
69+
name: str, dep: dict, platforms: list[str], owner: str, require_stable: bool
70+
) -> list[str]:
6971
repo, tag, template = dep["repo"], dep["release"], dep["file"]
7072
errors = []
7173
if owner and repo.split("/")[0] != owner:
@@ -74,7 +76,9 @@ def check_dependency(name: str, dep: dict, platforms: list[str], owner: str) ->
7476
if status != 0:
7577
return errors + [f"{name}: no release {tag} in {repo} ({out.strip()})"]
7678
release = json.loads(out)
77-
if release.get("prerelease") or release.get("draft"):
79+
if release.get("draft"):
80+
errors.append(f"{name}: {repo} {tag} is a draft")
81+
if require_stable and release.get("prerelease"):
7882
errors.append(f"{name}: {repo} {tag} is a pre-release; name only stable releases")
7983
assets = {a["name"] for a in release.get("assets", [])}
8084
files = sorted(
@@ -98,7 +102,9 @@ def check_dependency(name: str, dep: dict, platforms: list[str], owner: str) ->
98102
return errors
99103

100104

101-
def check_file(path: Path, schema: dict, platforms: list[str], owner: str) -> list[str]:
105+
def check_file(
106+
path: Path, schema: dict, platforms: list[str], owner: str, require_stable: bool
107+
) -> list[str]:
102108
try:
103109
config = json.loads(strip_comments(path.read_text(encoding="utf-8")))
104110
except (ValueError, UnicodeDecodeError) as e:
@@ -113,7 +119,7 @@ def check_file(path: Path, schema: dict, platforms: list[str], owner: str) -> li
113119
errors = []
114120
for name, dep in config.items():
115121
if name != "$schema":
116-
errors += check_dependency(name, dep, platforms, owner)
122+
errors += check_dependency(name, dep, platforms, owner, require_stable)
117123
return errors
118124

119125

@@ -123,6 +129,7 @@ def main() -> int:
123129
ap.add_argument("--schema", required=True, help="logix-remote-config-v1.json")
124130
ap.add_argument("--platforms", required=True, help="space-separated, such as darwin-arm64")
125131
ap.add_argument("--owner", default="", help="the only owner repos may have; empty for any")
132+
ap.add_argument("--require-stable", action="store_true", help="refuse pre-releases")
126133
args = ap.parse_args()
127134
folder = Path(args.folder)
128135
schema = json.loads(Path(args.schema).read_text(encoding="utf-8"))
@@ -154,7 +161,7 @@ def report(where: Path, message: str) -> None:
154161
if not files:
155162
report(folder, "no remote config files")
156163
for f in files:
157-
errors = check_file(f, schema, platforms, args.owner)
164+
errors = check_file(f, schema, platforms, args.owner, args.require_stable)
158165
for e in errors:
159166
report(f, e)
160167
if not errors:
Collapse file

‎schemas/logix-remote-config-v1.json‎

Copy file name to clipboardExpand all lines: schemas/logix-remote-config-v1.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"$id": "https://www.openlogix.org/schemas/logix-remote-config-v1.json",
44
"title": "Open Logix remote config",
5-
"description": "What one Open Logix component uses: one entry per direct dependency, naming a stable GitHub release and its file. A component reads remote-config/<product>/config-NNN.jsonc from its own repo, by the config version it hard-codes (Remote updates, in the website repo's CLAUDE.md). The file is JSONC: comments say why each entry changed.",
5+
"description": "What one Open Logix component uses: one entry per direct dependency, naming a GitHub release and its file. A component reads remote-config/<product>/config-NNN.jsonc from its own repo, by the config version it hard-codes (Remote updates, in the website repo's CLAUDE.md). The file is JSONC: comments say why each entry changed.",
66
"type": "object",
77
"required": ["$schema"],
88
"properties": {
@@ -27,7 +27,7 @@
2727
"pattern": "^[A-Za-z0-9][A-Za-z0-9-]*/[A-Za-z0-9._-]+$"
2828
},
2929
"release": {
30-
"description": "The release tag, yyyy-mm-dd. It must be a stable release (not a pre-release).",
30+
"description": "The release tag, yyyy-mm-dd. Pre-releases are allowed while Open Logix is in development; stable releases will be required later.",
3131
"type": "string",
3232
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
3333
},
Collapse file

‎tests/check-remote-config/run.sh‎

Copy file name to clipboardExpand all lines: tests/check-remote-config/run.sh
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ repo="$here/../.."
88
export PATH="$here/fake-gh:$PATH" FAKE_GH_RELEASES="$here/releases"
99
failures=0
1010

11-
# expect <case> <owner> <0 or 1> [<text the output must contain>]
11+
# expect <case> <owner> <0 or 1> [<text the output must contain>]; with
12+
# STABLE=1 set, pre-releases are refused.
1213
expect() {
1314
local out status
1415
out="$(python3 "$repo/actions/check-remote-config/check_remote_config.py" \
1516
--folder "$here/cases/$1/remote-config" \
1617
--schema "$repo/schemas/logix-remote-config-v1.json" \
17-
--platforms "darwin-arm64 linux-x86-64" --owner "$2" 2>&1)"
18+
--platforms "darwin-arm64 linux-x86-64" --owner "$2" \
19+
${STABLE:+--require-stable} 2>&1)"
1820
status=$?
1921
if [[ $status -ne $3 || ( -n "${4:-}" && "$out" != *"$4"* ) ]]; then
2022
echo "FAIL: $1 (owner '$2'): expected exit $3${4:+ and \"$4\"}, got $status:"
@@ -26,7 +28,8 @@ expect() {
2628
}
2729

2830
expect good openlogix 0 "config-001.jsonc: ok"
29-
expect prerelease openlogix 1 "is a pre-release"
31+
expect prerelease openlogix 0 "config-001.jsonc: ok"
32+
STABLE=1 expect prerelease openlogix 1 "is a pre-release"
3033
expect no-release openlogix 1 "no release 2026-11-30 in openlogix/logix-catalog"
3134
expect no-file openlogix 1 "has no file logix-catalog-linux-x86-64-20261124.tgz"
3235
expect not-in-sums openlogix 1 "SHA256SUMS doesn't list logix-catalog-20261126.tgz"

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.