From ce940ea8fada34deda894e5e68e721c3064e9207 Mon Sep 17 00:00:00 2001 From: hyperpolymath <6759885+hyperpolymath@users.noreply.github.com> Date: Mon, 6 Jul 2026 19:34:50 +0100 Subject: [PATCH] Revert "feat: canonical A2ML dialect = TOML (warn-by-default, enforce flag) (#53)" This reverts commit db22cd51f07eb7eac8ec0b2acd01bf7186ef1d56. --- README.md | 10 ---------- action.yml | 9 --------- validate-a2ml.sh | 27 --------------------------- 3 files changed, 46 deletions(-) diff --git a/README.md b/README.md index db23a35..b54f2bf 100644 --- a/README.md +++ b/README.md @@ -12,16 +12,6 @@ RSR (Rhodium Standard Repository) projects to declare machine-readable metadata, AI agent instructions, and project state. This action scans for `.a2ml` files and validates their structure and required fields. -# Canonical dialect: TOML - -Estate decision (2026-07-06): the **one canonical A2ML dialect is TOML** -(`key = value` / `[section]`). Files written in YAML (`key:`) or S-expression -(`(form ...)`) are non-canonical and should be converted. Check 5 flags them as -a **warning** by default; set `enforce-canonical-dialect: true` to make it a -hard **error** once a repository's `.a2ml` files are all converted. AI-manifest -templates are exempt from this check until they are converted upstream in -`rsr-template-repo` / `standards`. - # Checks Performed 1. **SPDX header** — Verifies `SPDX-License-Identifier` is present in diff --git a/action.yml b/action.yml index b6e2be6..85a5069 100644 --- a/action.yml +++ b/action.yml @@ -29,14 +29,6 @@ inputs: will fail on any validation issue. Defaults to false. required: false default: 'false' - enforce-canonical-dialect: - description: >- - When true, files written in a non-canonical A2ML dialect (YAML or - S-expression instead of canonical TOML) are reported as errors rather - than warnings. Defaults to false so the estate can migrate incrementally. - Canonical A2ML dialect: TOML (key = value / [section]). - required: false - default: 'false' paths-ignore: description: >- Newline-separated path fragments to skip. Each line is matched as a @@ -77,7 +69,6 @@ runs: env: INPUT_PATH: ${{ inputs.path }} INPUT_STRICT: ${{ inputs.strict }} - INPUT_ENFORCE_CANONICAL_DIALECT: ${{ inputs.enforce-canonical-dialect }} INPUT_PATHS_IGNORE: ${{ inputs.paths-ignore }} run: | "${GITHUB_ACTION_PATH}/validate-a2ml.sh" diff --git a/validate-a2ml.sh b/validate-a2ml.sh index 3022938..b053676 100755 --- a/validate-a2ml.sh +++ b/validate-a2ml.sh @@ -26,7 +26,6 @@ set -euo pipefail SCAN_PATH="${INPUT_PATH:-.}" STRICT="${INPUT_STRICT:-false}" -ENFORCE_DIALECT="${INPUT_ENFORCE_CANONICAL_DIALECT:-false}" PATHS_IGNORE_RAW="${INPUT_PATHS_IGNORE:-}" GITHUB_OUTPUT_FILE="${GITHUB_OUTPUT:-/dev/null}" @@ -279,32 +278,6 @@ validate_a2ml() { fi fi done < "$file" - - # --- Check 5: Canonical dialect (TOML) --- - # Estate canon (2026-07-06): .a2ml is ONE dialect — TOML (`key = value` / - # `[section]`). Flag repo-specific files still written as YAML (`key:`) or - # S-expression (`(form ...)`). AI manifests are template-sourced (converted - # upstream in rsr-template-repo/standards), so they are exempt here to avoid - # estate-wide noise before that conversion lands. Warning by default so the - # estate can migrate incrementally; set enforce_canonical_dialect=true to - # make it a hard error once conversion is complete. - if [[ "$is_manifest" == "false" ]]; then - local _sexpr _toml _yaml _dialect="" - _sexpr=$(grep -cE '^[[:space:]]*\([a-zA-Z]' "$file" 2>/dev/null || true) - _toml=$(grep -cE '^[[:space:]]*(\[[^]]+\]|[A-Za-z0-9_.-]+[[:space:]]*=)' "$file" 2>/dev/null || true) - _yaml=$(grep -cE '^[[:space:]]*[A-Za-z0-9_-]+:[[:space:]]' "$file" 2>/dev/null || true) - if [[ "${_sexpr:-0}" -gt 2 && "${_toml:-0}" -eq 0 ]]; then - _dialect="S-expression" - elif [[ "${_yaml:-0}" -gt 2 && "${_toml:-0}" -le 1 ]]; then - _dialect="YAML" - fi - if [[ -n "$_dialect" ]]; then - local _sev="warning" - [[ "$ENFORCE_DIALECT" == "true" ]] && _sev="error" - report_issue "$_sev" "$file" "1" \ - "Non-canonical A2ML dialect ($_dialect). Canonical A2ML dialect is TOML (key = value / [section]); convert this file." - fi - fi } # ---------------------------------------------------------------------------