From a5c78cbfe1cb1e46dbdf8eee1e00e904bd2e1f18 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Tue, 1 Sep 2026 03:02:01 +0000 Subject: [PATCH] ci: gate current release validation --- .forgejo/workflows/ci.yml | 8 ++++++++ CHANGELOG.md | 6 ++++++ README.md | 4 ++++ docs/CURRENT_STATUS.md | 1 + docs/ROADMAP.md | 2 +- docs/TESTING.md | 3 +++ tools/validate_ci_workflow.py | 35 +++++++++++++++++++++++++++++++++++ 7 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 tools/validate_ci_workflow.py diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index edb5478..563e3bb 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -15,6 +15,14 @@ jobs: run: make - name: Run tests run: ./claro test + - name: Run current release validation + run: ./claro validate + - name: Validate typecheck diagnostics + run: python3 tools/validate_typecheck_diagnostics.py + - name: Validate version convention + run: python3 tools/validate_version_convention.py + - name: Validate CI workflow coverage + run: python3 tools/validate_ci_workflow.py - name: Check lessons run: | ./claro check lessons/01_hello.claro diff --git a/CHANGELOG.md b/CHANGELOG.md index c925bb3..92261d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v1.18.26-dev CI release validation coverage + +- Added `tools/validate_ci_workflow.py` to assert that Forgejo/Gitea CI keeps running Claro's current release gates. +- Updated `.forgejo/workflows/ci.yml` to run `claro validate`, typecheck diagnostics validation, version convention validation, and the CI workflow coverage check in addition to the existing smoke tests. +- Documented the CI coverage validator in the testing docs and current status/roadmap notes. + ## v1.18.26-dev unknown object-field expression diagnostic - Added a focused negative `claro typecheck` fixture for assigning an expression with no inferable static type to an undeclared object field, such as `SET player.level score + 1` after `NEW Player player`. diff --git a/README.md b/README.md index dfaf3c0..e8cffc2 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,10 @@ Validated in this package: ./claro validate # Validation passed. Claro v1.18.26 networking reliability is ready for use. + +python3 tools/validate_typecheck_diagnostics.py +python3 tools/validate_version_convention.py +python3 tools/validate_ci_workflow.py ``` ## Beginner-first syntax diff --git a/docs/CURRENT_STATUS.md b/docs/CURRENT_STATUS.md index b526c37..0447f40 100644 --- a/docs/CURRENT_STATUS.md +++ b/docs/CURRENT_STATUS.md @@ -156,6 +156,7 @@ Ready now: - metadata JSON - completion list - diagnostics helper +- Forgejo/Gitea CI coverage for the current release validation gates (`claro validate`, typecheck diagnostics validation, version convention validation, and the CI workflow coverage check) Still needed: - syntax highlighting package diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index e911aae..d77e874 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -31,7 +31,7 @@ See `CURRENT_STATUS.md` for the detailed feature matrix. 1. Keep beginner-facing docs current and separate from historical release notes. 2. Keep examples aligned with the modern simple syntax (`END`, `DO`, short `SET`, short `ASK`) while documenting older compatibility forms separately. -3. Expand validation around typecheck diagnostics and package/networking safety. Current object-method parameter validation covers one correct `DO object.method ...` call, one wrong-type diagnostic, missing-object guidance when `DO player.method ...` appears before `NEW`, and a class-specific unknown-method diagnostic when a learner calls a method the class does not declare; object-field validation covers correct NUMBER, TEXT, and YESNO direct `SET object.field value` assignments, direct `CHECK TYPE` metadata acceptance for NUMBER/TEXT/YESNO fields, negative NUMBER/TEXT/YESNO metadata mismatches, NUMBER/TEXT/YESNO-expectation unknown-field `CHECK TYPE` diagnostics, missing-object field assignment and `CHECK TYPE` diagnostics, NUMBER/TEXT/YESNO wrong-type direct assignments, simple NUMBER/TEXT/YESNO-valued unknown-field diagnostics after `NEW Class object`, and a beginner-facing fallback when the unknown field's assigned expression type is not inferable yet. +3. Expand validation around typecheck diagnostics and package/networking safety. Current Forgejo/Gitea CI runs the documented release gates (`claro validate`, typecheck diagnostics validation, version convention validation, and CI workflow coverage validation). Current object-method parameter validation covers one correct `DO object.method ...` call, one wrong-type diagnostic, missing-object guidance when `DO player.method ...` appears before `NEW`, and a class-specific unknown-method diagnostic when a learner calls a method the class does not declare; object-field validation covers correct NUMBER, TEXT, and YESNO direct `SET object.field value` assignments, direct `CHECK TYPE` metadata acceptance for NUMBER/TEXT/YESNO fields, negative NUMBER/TEXT/YESNO metadata mismatches, NUMBER/TEXT/YESNO-expectation unknown-field `CHECK TYPE` diagnostics, missing-object field assignment and `CHECK TYPE` diagnostics, NUMBER/TEXT/YESNO wrong-type direct assignments, simple NUMBER/TEXT/YESNO-valued unknown-field diagnostics after `NEW Class object`, and a beginner-facing fallback when the unknown field's assigned expression type is not inferable yet. 4. Add small examples for each foundation feature before adding bigger syntax. ## Complete-platform milestones diff --git a/docs/TESTING.md b/docs/TESTING.md index 804d9f7..2db213d 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -24,6 +24,7 @@ Validate the current v1.18.26 package after building: ./claro validate python tools/validate_typecheck_diagnostics.py python tools/validate_version_convention.py +python tools/validate_ci_workflow.py ``` Useful focused validation scripts: @@ -39,6 +40,8 @@ python tools/validate_lsp_helper.py python tools/validate_package_security.py ``` +The Forgejo/Gitea CI workflow is expected to run the current release gates above, not only the older smoke tests. `tools/validate_ci_workflow.py` checks that coverage so CI does not drift away from the documented package validation path. + Older `validate_rc*.py` scripts are kept for historical release notes. They are not the recommended current package validation path. On Windows, after `build.bat` or `build.ps1`, run the same Python commands from the project root. diff --git a/tools/validate_ci_workflow.py b/tools/validate_ci_workflow.py new file mode 100644 index 0000000..6e5389d --- /dev/null +++ b/tools/validate_ci_workflow.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +"""Validate that CI runs Claro's current release gates, not only legacy smoke tests.""" +from pathlib import Path +import sys + +ROOT = Path(__file__).resolve().parents[1] +WORKFLOW = ROOT / ".forgejo" / "workflows" / "ci.yml" + +REQUIRED_COMMANDS = [ + "./claro validate", + "python3 tools/validate_typecheck_diagnostics.py", + "python3 tools/validate_version_convention.py", +] + + +def main() -> int: + if not WORKFLOW.exists(): + print(f"Missing CI workflow: {WORKFLOW.relative_to(ROOT)}") + return 1 + + text = WORKFLOW.read_text(encoding="utf-8") + missing = [command for command in REQUIRED_COMMANDS if command not in text] + if missing: + print("CI workflow is missing current release validation commands:") + for command in missing: + print(f" - {command}") + print("Add them to .forgejo/workflows/ci.yml so regressions are caught before release.") + return 1 + + print("CI workflow validation complete") + return 0 + + +if __name__ == "__main__": + sys.exit(main())