|
| 1 | +# SPDX-License-Identifier: PMPL-1.0-or-later |
| 2 | +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> |
| 3 | +# |
| 4 | +# K9 Validator: VQL-UT Guard |
| 5 | +# Ensures the VQL-UT language invariants stay provable and the bridges stay in sync with Idris2. |
| 6 | + |
| 7 | +let vql_ut_guard = { |
| 8 | + name = "vql-ut-guard", |
| 9 | + version = "1.0.0", |
| 10 | + description = "Checks that the core Idris2 proofs, parser bridges, and schema artifacts exist and that no template placeholders remain.", |
| 11 | + |
| 12 | + checks = { |
| 13 | + checker_present = { |
| 14 | + description = "Idris2 Checker definition exists.", |
| 15 | + severity = "error", |
| 16 | + check_type = "file-exists", |
| 17 | + file = "src/core/Checker.idr", |
| 18 | + }, |
| 19 | + |
| 20 | + grammar_present = { |
| 21 | + description = "Grammar specification file is present.", |
| 22 | + severity = "error", |
| 23 | + check_type = "file-exists", |
| 24 | + file = "src/core/Grammar.idr", |
| 25 | + }, |
| 26 | + |
| 27 | + levels_present = { |
| 28 | + description = "Levels lattice file remains tracked.", |
| 29 | + severity = "warning", |
| 30 | + check_type = "file-exists", |
| 31 | + file = "src/core/Levels.idr", |
| 32 | + }, |
| 33 | + |
| 34 | + schema_present = { |
| 35 | + description = "Schema validation proof exists.", |
| 36 | + severity = "warning", |
| 37 | + check_type = "file-exists", |
| 38 | + file = "src/core/Schema.idr", |
| 39 | + }, |
| 40 | + |
| 41 | + bridge_present = { |
| 42 | + description = "ReScript bridge parser file is available.", |
| 43 | + severity = "error", |
| 44 | + check_type = "file-exists", |
| 45 | + file = "src/bridges/VqlUtParser.res", |
| 46 | + }, |
| 47 | + |
| 48 | + no_template_placeholders = { |
| 49 | + description = "Template markers cannot creep into the codebase.", |
| 50 | + severity = "error", |
| 51 | + check_type = "file-pattern-guard", |
| 52 | + scope = ".", |
| 53 | + reject_patterns = ["{{PROJECT}}", "{{PLACEHOLDER}}"], |
| 54 | + }, |
| 55 | + |
| 56 | + placeholder_fuzz_absent = { |
| 57 | + description = "Placeholder fuzz harnesses must be removed.", |
| 58 | + severity = "warning", |
| 59 | + check_type = "file-not-exists", |
| 60 | + file = "tests/fuzz/placeholder.txt", |
| 61 | + }, |
| 62 | + }, |
| 63 | +} |
| 64 | +in vql_ut_guard |
0 commit comments