From e68e4c0ff02c2649ea68b77795888f2f1ef34942 Mon Sep 17 00:00:00 2001 From: Derek Corniello Date: Tue, 7 Jul 2026 19:46:57 -0400 Subject: [PATCH 1/3] chore: convert issue templates to YAML forms, fix label sync quoting bug - Convert all templates//ISSUE_TEMPLATE/*.md sources to structured YAML issue forms (required fields, checkboxes for editor/feature-flag lists, render hints for code samples). config.yml files unchanged. - sync-labels.sh: trim whitespace before stripping quotes so quoted label names no longer keep a literal leading double-quote. This bug created the mangled priority labels on mux-compiler. - retire-labels.sh: add the mangled-name variants so retiring actually deletes them. - Add scripts/validate-labels.py to diff live labels against the canonical YAML across all repos; exits nonzero on drift. Part of muxlang/mux-context#5. Co-Authored-By: Claude Fable 5 --- README.md | 2 + scripts/retire-labels.sh | 3 + scripts/sync-labels.sh | 7 +- scripts/validate-labels.py | 94 +++++++++++++++++++ .../mux-compiler/ISSUE_TEMPLATE/bug_report.md | 34 ------- .../ISSUE_TEMPLATE/bug_report.yml | 51 ++++++++++ .../ISSUE_TEMPLATE/documentation_fix.md | 17 ---- .../ISSUE_TEMPLATE/documentation_fix.yml | 21 +++++ .../ISSUE_TEMPLATE/feature_request.md | 17 ---- .../ISSUE_TEMPLATE/feature_request.yml | 26 +++++ .../ISSUE_TEMPLATE/adr_proposal.md | 15 --- .../ISSUE_TEMPLATE/adr_proposal.yml | 27 ++++++ .../ISSUE_TEMPLATE/cross_repo_question.md | 13 --- .../ISSUE_TEMPLATE/cross_repo_question.yml | 19 ++++ .../mux-runtime/ISSUE_TEMPLATE/bug_report.md | 25 ----- .../mux-runtime/ISSUE_TEMPLATE/bug_report.yml | 38 ++++++++ .../ISSUE_TEMPLATE/feature_request.md | 17 ---- .../ISSUE_TEMPLATE/feature_request.yml | 33 +++++++ .../ISSUE_TEMPLATE/bug_report.md | 29 ------ .../ISSUE_TEMPLATE/bug_report.yml | 41 ++++++++ .../ISSUE_TEMPLATE/syntax_spec_change.md | 30 ------ .../ISSUE_TEMPLATE/syntax_spec_change.yml | 34 +++++++ .../ISSUE_TEMPLATE/bug_report.md | 21 ----- .../ISSUE_TEMPLATE/bug_report.yml | 31 ++++++ .../mux-website/ISSUE_TEMPLATE/bug_report.md | 22 ----- .../mux-website/ISSUE_TEMPLATE/bug_report.yml | 35 +++++++ .../ISSUE_TEMPLATE/documentation_fix.md | 13 --- .../ISSUE_TEMPLATE/documentation_fix.yml | 21 +++++ .../ISSUE_TEMPLATE/feature_request.md | 13 --- .../ISSUE_TEMPLATE/feature_request.yml | 21 +++++ .../ISSUE_TEMPLATE/bug_report.md | 28 ------ .../ISSUE_TEMPLATE/bug_report.yml | 40 ++++++++ .../ISSUE_TEMPLATE/grammar_sync.md | 20 ---- .../ISSUE_TEMPLATE/grammar_sync.yml | 25 +++++ 34 files changed, 567 insertions(+), 316 deletions(-) create mode 100755 scripts/validate-labels.py delete mode 100644 templates/mux-compiler/ISSUE_TEMPLATE/bug_report.md create mode 100644 templates/mux-compiler/ISSUE_TEMPLATE/bug_report.yml delete mode 100644 templates/mux-compiler/ISSUE_TEMPLATE/documentation_fix.md create mode 100644 templates/mux-compiler/ISSUE_TEMPLATE/documentation_fix.yml delete mode 100644 templates/mux-compiler/ISSUE_TEMPLATE/feature_request.md create mode 100644 templates/mux-compiler/ISSUE_TEMPLATE/feature_request.yml delete mode 100644 templates/mux-context/ISSUE_TEMPLATE/adr_proposal.md create mode 100644 templates/mux-context/ISSUE_TEMPLATE/adr_proposal.yml delete mode 100644 templates/mux-context/ISSUE_TEMPLATE/cross_repo_question.md create mode 100644 templates/mux-context/ISSUE_TEMPLATE/cross_repo_question.yml delete mode 100644 templates/mux-runtime/ISSUE_TEMPLATE/bug_report.md create mode 100644 templates/mux-runtime/ISSUE_TEMPLATE/bug_report.yml delete mode 100644 templates/mux-runtime/ISSUE_TEMPLATE/feature_request.md create mode 100644 templates/mux-runtime/ISSUE_TEMPLATE/feature_request.yml delete mode 100644 templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.md create mode 100644 templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.yml delete mode 100644 templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.md create mode 100644 templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.yml delete mode 100644 templates/mux-website-api/ISSUE_TEMPLATE/bug_report.md create mode 100644 templates/mux-website-api/ISSUE_TEMPLATE/bug_report.yml delete mode 100644 templates/mux-website/ISSUE_TEMPLATE/bug_report.md create mode 100644 templates/mux-website/ISSUE_TEMPLATE/bug_report.yml delete mode 100644 templates/mux-website/ISSUE_TEMPLATE/documentation_fix.md create mode 100644 templates/mux-website/ISSUE_TEMPLATE/documentation_fix.yml delete mode 100644 templates/mux-website/ISSUE_TEMPLATE/feature_request.md create mode 100644 templates/mux-website/ISSUE_TEMPLATE/feature_request.yml delete mode 100644 templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.md create mode 100644 templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.yml delete mode 100644 templates/tree-sitter-mux/ISSUE_TEMPLATE/grammar_sync.md create mode 100644 templates/tree-sitter-mux/ISSUE_TEMPLATE/grammar_sync.yml diff --git a/README.md b/README.md index 2e54895..5320015 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ Organization-level defaults for the [muxlang](https://github.com/muxlang) org: - `scripts/sync-labels.sh` - apply label YAML to org repos (`gh` CLI required). - `scripts/sync-templates.sh` - copy `templates//` into a repo checkout. - `scripts/retire-labels.sh` - delete retired labels org-wide. +- `scripts/validate-labels.py` - diff live labels against the canonical YAML; + exits nonzero on drift (run after any sync or retire). - `scripts/clear-milestones.sh` - bulk-clear milestones from a repo's issues. Policy and workflow rules: diff --git a/scripts/retire-labels.sh b/scripts/retire-labels.sh index df18ca8..840b3b6 100755 --- a/scripts/retire-labels.sh +++ b/scripts/retire-labels.sh @@ -9,6 +9,9 @@ REPOS=( RETIRED=( "priority: urgent" "priority: high" "priority: medium" "priority: low" "needs tested" "bug" "feature" + # Mangled variants created by the old sync-labels.sh quote-stripping bug; + # the leading double-quote character is part of the live label name. + '"priority: urgent' '"priority: high' '"priority: medium' '"priority: low' ) for repo in "${REPOS[@]}"; do diff --git a/scripts/sync-labels.sh b/scripts/sync-labels.sh index ad7494a..6736b0e 100755 --- a/scripts/sync-labels.sh +++ b/scripts/sync-labels.sh @@ -25,10 +25,13 @@ apply_yaml() { case "$line" in "- name:"*) name="${line#- name:}" - name="${name#\"}" - name="${name%\"}" + # Trim whitespace BEFORE stripping quotes: quoted names like + # "priority: urgent" used to keep their leading quote because the + # strip ran against ' "priority: urgent"' and missed. name="${name#"${name%%[![:space:]]*}"}" name="${name%"${name##*[![:space:]]}"}" + name="${name#\"}" + name="${name%\"}" ;; " color:"*) color="${line# color: }" diff --git a/scripts/validate-labels.py b/scripts/validate-labels.py new file mode 100755 index 0000000..7beca87 --- /dev/null +++ b/scripts/validate-labels.py @@ -0,0 +1,94 @@ +#!/usr/bin/env python3 +"""Validate live GitHub labels against the canonical labels/*.yml files. + +For every muxlang repo, fetches the live label set with `gh` and diffs it +against labels/labels.yml plus the repo's overlay (labels/.yml). +Reports labels that are MISSING (canonical but not live), EXTRA (live but +not canonical), or DRIFTED (color or description differs). + +Usage: ./scripts/validate-labels.py [repo ...] +Exits nonzero if any repo diverges. Requires gh (authenticated) and python3. +""" +import json +import re +import subprocess +import sys +from pathlib import Path + +ROOT = Path(__file__).resolve().parent.parent +LABELS = ROOT / "labels" + +ALL_REPOS = [ + "mux-compiler", "mux-runtime", "mux-website-api", + "mux-syntax-highlighting", "mux-website", "tree-sitter-mux", + "mux-context", ".github", +] + + +def parse_yaml(path): + """Parse the flat '- name/color/description' label YAML (no deps).""" + labels = {} + name = color = None + for raw in path.read_text().splitlines(): + m = re.match(r'^- name:\s*(.+)$', raw) + if m: + name = m.group(1).strip().strip('"') + continue + m = re.match(r'^\s+color:\s*(.+)$', raw) + if m: + color = m.group(1).strip().strip('"') + continue + m = re.match(r'^\s+description:\s*(.+)$', raw) + if m and name and color: + labels[name] = (color.lower(), m.group(1).strip().strip('"')) + name = color = None + return labels + + +def live_labels(repo): + out = subprocess.run( + ["gh", "label", "list", "-R", f"muxlang/{repo}", "--limit", "100", + "--json", "name,color,description"], + check=True, capture_output=True, text=True, + ).stdout + return { + l["name"]: (l["color"].lower(), l["description"]) + for l in json.loads(out) + } + + +def main(): + repos = sys.argv[1:] or ALL_REPOS + base = parse_yaml(LABELS / "labels.yml") + dirty = False + + for repo in repos: + expected = dict(base) + overlay = LABELS / f"{repo}.yml" + if overlay.exists(): + expected.update(parse_yaml(overlay)) + live = live_labels(repo) + + missing = sorted(set(expected) - set(live)) + extra = sorted(set(live) - set(expected)) + drifted = sorted( + n for n in set(expected) & set(live) if expected[n] != live[n] + ) + + print(f"=== {repo} ===") + if not (missing or extra or drifted): + print(" OK: exact match") + continue + dirty = True + for n in missing: + print(f" MISSING : {n!r} (run sync-labels.sh {repo})") + for n in extra: + print(f" EXTRA : {n!r} (add to a labels yml or retire it)") + for n in drifted: + print(f" DRIFTED : {n!r} live={live[n]} expected={expected[n]}") + + return 1 if dirty else 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/templates/mux-compiler/ISSUE_TEMPLATE/bug_report.md b/templates/mux-compiler/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 79b63b6..0000000 --- a/templates/mux-compiler/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: Bug report -about: Report incorrect compiler behavior or a crash -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Description - - - -## Steps to reproduce - -1. -2. -3. - -## Expected behavior - -## Actual behavior - - - -## Minimal example - -```mux - -``` - -## Environment - -- `mux --version`: -- OS / architecture: diff --git a/templates/mux-compiler/ISSUE_TEMPLATE/bug_report.yml b/templates/mux-compiler/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..3abc17e --- /dev/null +++ b/templates/mux-compiler/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,51 @@ +name: Bug report +description: Report incorrect compiler behavior or a crash +labels: ["needs triage"] +assignees: ["DerekCorniello"] +body: + - type: textarea + id: description + attributes: + label: Description + description: What went wrong? + validations: + required: true + - type: textarea + id: repro + attributes: + label: Steps to reproduce + value: | + 1. + 2. + 3. + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected behavior + validations: + required: true + - type: textarea + id: actual + attributes: + label: Actual behavior + description: Include error output if any. + validations: + required: true + - type: textarea + id: example + attributes: + label: Minimal example + render: text + description: Smallest Mux program that reproduces the problem. + - type: input + id: version + attributes: + label: mux --version + validations: + required: true + - type: input + id: os + attributes: + label: OS / architecture diff --git a/templates/mux-compiler/ISSUE_TEMPLATE/documentation_fix.md b/templates/mux-compiler/ISSUE_TEMPLATE/documentation_fix.md deleted file mode 100644 index ad03a42..0000000 --- a/templates/mux-compiler/ISSUE_TEMPLATE/documentation_fix.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Documentation fix -about: Report incorrect or missing compiler documentation -title: "" -labels: "documentation, needs triage" -assignees: DerekCorniello ---- - -## What is wrong - - - -## Expected content - -## Links - - diff --git a/templates/mux-compiler/ISSUE_TEMPLATE/documentation_fix.yml b/templates/mux-compiler/ISSUE_TEMPLATE/documentation_fix.yml new file mode 100644 index 0000000..aedf60a --- /dev/null +++ b/templates/mux-compiler/ISSUE_TEMPLATE/documentation_fix.yml @@ -0,0 +1,21 @@ +name: Documentation fix +description: Report incorrect or missing compiler documentation +labels: ["documentation", "needs triage"] +assignees: ["DerekCorniello"] +body: + - type: textarea + id: wrong + attributes: + label: What is wrong + description: Which doc, README, or error message? + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected content + - type: textarea + id: links + attributes: + label: Links + description: File paths or URLs. diff --git a/templates/mux-compiler/ISSUE_TEMPLATE/feature_request.md b/templates/mux-compiler/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 91ef30d..0000000 --- a/templates/mux-compiler/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest a new language or compiler capability -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Problem - - - -## Proposed solution - -## Alternatives considered - -## Additional context diff --git a/templates/mux-compiler/ISSUE_TEMPLATE/feature_request.yml b/templates/mux-compiler/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..745c5a1 --- /dev/null +++ b/templates/mux-compiler/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,26 @@ +name: Feature request +description: Suggest a new language or compiler capability +labels: ["needs triage"] +assignees: ["DerekCorniello"] +body: + - type: textarea + id: problem + attributes: + label: Problem + description: What problem would this solve? + validations: + required: true + - type: textarea + id: solution + attributes: + label: Proposed solution + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + - type: textarea + id: context + attributes: + label: Additional context diff --git a/templates/mux-context/ISSUE_TEMPLATE/adr_proposal.md b/templates/mux-context/ISSUE_TEMPLATE/adr_proposal.md deleted file mode 100644 index fdfa9ac..0000000 --- a/templates/mux-context/ISSUE_TEMPLATE/adr_proposal.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: ADR or design proposal -about: Propose an architecture decision or cross-repo design change -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Problem - -## Proposal - -## Alternatives considered - -## Affected repos diff --git a/templates/mux-context/ISSUE_TEMPLATE/adr_proposal.yml b/templates/mux-context/ISSUE_TEMPLATE/adr_proposal.yml new file mode 100644 index 0000000..15b17d0 --- /dev/null +++ b/templates/mux-context/ISSUE_TEMPLATE/adr_proposal.yml @@ -0,0 +1,27 @@ +name: ADR or design proposal +description: Propose an architecture decision or cross-repo design change +labels: ["needs triage", "adr"] +assignees: ["DerekCorniello"] +body: + - type: textarea + id: problem + attributes: + label: Problem + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposal + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + - type: textarea + id: repos + attributes: + label: Affected repos + validations: + required: true diff --git a/templates/mux-context/ISSUE_TEMPLATE/cross_repo_question.md b/templates/mux-context/ISSUE_TEMPLATE/cross_repo_question.md deleted file mode 100644 index 2764e60..0000000 --- a/templates/mux-context/ISSUE_TEMPLATE/cross_repo_question.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: Cross-repo question -about: Unsure which repo, or the work spans multiple repos -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Question - -## Which repos might this touch? - -## Additional context diff --git a/templates/mux-context/ISSUE_TEMPLATE/cross_repo_question.yml b/templates/mux-context/ISSUE_TEMPLATE/cross_repo_question.yml new file mode 100644 index 0000000..a7d932e --- /dev/null +++ b/templates/mux-context/ISSUE_TEMPLATE/cross_repo_question.yml @@ -0,0 +1,19 @@ +name: Cross-repo question +description: Unsure which repo, or the work spans multiple repos +labels: ["needs triage"] +assignees: ["DerekCorniello"] +body: + - type: textarea + id: question + attributes: + label: Question + validations: + required: true + - type: textarea + id: repos + attributes: + label: Which repos might this touch? + - type: textarea + id: context + attributes: + label: Additional context diff --git a/templates/mux-runtime/ISSUE_TEMPLATE/bug_report.md b/templates/mux-runtime/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 5ac59d3..0000000 --- a/templates/mux-runtime/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: Bug report -about: Report a runtime crash, incorrect stdlib behavior, or FFI issue -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Description - -## Steps to reproduce - -1. -2. -3. - -## Expected behavior - -## Actual behavior - -## Environment - -- `mux-runtime` version (if known): -- OS / architecture: -- Minimal repro (Rust or compiled Mux program): diff --git a/templates/mux-runtime/ISSUE_TEMPLATE/bug_report.yml b/templates/mux-runtime/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..761ab82 --- /dev/null +++ b/templates/mux-runtime/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,38 @@ +name: Bug report +description: Report a runtime crash, incorrect stdlib behavior, or FFI issue +labels: ["needs triage"] +assignees: ["DerekCorniello"] +body: + - type: textarea + id: description + attributes: + label: Description + validations: + required: true + - type: textarea + id: repro + attributes: + label: Steps to reproduce + value: | + 1. + 2. + 3. + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected behavior + validations: + required: true + - type: textarea + id: actual + attributes: + label: Actual behavior + validations: + required: true + - type: textarea + id: environment + attributes: + label: Environment + description: mux-runtime version (if known), OS / architecture, and a minimal repro (Rust or compiled Mux program). diff --git a/templates/mux-runtime/ISSUE_TEMPLATE/feature_request.md b/templates/mux-runtime/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index f9526bc..0000000 --- a/templates/mux-runtime/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest a stdlib or runtime API addition -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Problem - -## Proposed API or behavior - -## Feature flags - - - -## Additional context diff --git a/templates/mux-runtime/ISSUE_TEMPLATE/feature_request.yml b/templates/mux-runtime/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..ad0b035 --- /dev/null +++ b/templates/mux-runtime/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,33 @@ +name: Feature request +description: Suggest a stdlib or runtime API addition +labels: ["needs triage"] +assignees: ["DerekCorniello"] +body: + - type: textarea + id: problem + attributes: + label: Problem + validations: + required: true + - type: textarea + id: api + attributes: + label: Proposed API or behavior + validations: + required: true + - type: checkboxes + id: flags + attributes: + label: Feature flags + description: Does this need a new optional feature? + options: + - label: json + - label: csv + - label: net + - label: sql + - label: sync + - label: none / not sure + - type: textarea + id: context + attributes: + label: Additional context diff --git a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.md b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 3f42578..0000000 --- a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: Bug report -about: Report incorrect syntax highlighting or editor config -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Description - -## Affected editor(s) - -- [ ] VSCode -- [ ] Sublime Text -- [ ] JetBrains -- [ ] Neovim (editor-support) -- [ ] Helix (editor-support) -- [ ] Other: - -## Steps to reproduce - -1. Code sample: -2. What is highlighted wrong: - -## Expected highlighting - -## Environment - -- Extension or config version (if known): diff --git a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.yml b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..23e31d0 --- /dev/null +++ b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,41 @@ +name: Bug report +description: Report incorrect syntax highlighting or editor config +labels: ["needs triage"] +assignees: ["DerekCorniello"] +body: + - type: textarea + id: description + attributes: + label: Description + validations: + required: true + - type: checkboxes + id: editors + attributes: + label: Affected editor(s) + options: + - label: VSCode + - label: Sublime Text + - label: JetBrains + - label: Neovim (editor-support) + - label: Helix (editor-support) + - label: Other (say which in the description) + - type: textarea + id: repro + attributes: + label: Steps to reproduce + value: | + 1. Code sample: + 2. What is highlighted wrong: + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected highlighting + validations: + required: true + - type: input + id: version + attributes: + label: Extension or config version (if known) diff --git a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.md b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.md deleted file mode 100644 index f106902..0000000 --- a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -name: Syntax spec change -about: Propose a change to syntax-matrix.json (canonical spec) -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Motivation - - - -## Proposed change - - - -## Downstream sync checklist - - - -- [ ] Regenerate TextMate grammar and editor-support in this repo -- [ ] Verify generated artifacts with `node scripts/check-parity.js` and `node scripts/build-editor-support.js --check` -- [ ] Update tree-sitter-mux vendored syntax-matrix.json and regenerated `queries/highlights.scm` -- [ ] Update mux-website Monaco and Shiki definitions - -## Example code - -```mux - -``` diff --git a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.yml b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.yml new file mode 100644 index 0000000..09680ac --- /dev/null +++ b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.yml @@ -0,0 +1,34 @@ +name: Syntax spec change +description: Propose a change to syntax-matrix.json (canonical spec) +labels: ["needs triage"] +assignees: ["DerekCorniello"] +body: + - type: textarea + id: motivation + attributes: + label: Motivation + description: Why should the spec change? + validations: + required: true + - type: textarea + id: change + attributes: + label: Proposed change + description: Which tokens, scopes, or rules change? + validations: + required: true + - type: checkboxes + id: sync + attributes: + label: Downstream sync checklist + description: Spec changes require updates in tree-sitter-mux and mux-website too. + options: + - label: Regenerate TextMate grammar and editor-support in this repo + - label: Verify generated artifacts with node scripts/check-parity.js and node scripts/build-editor-support.js --check + - label: Update tree-sitter-mux vendored syntax-matrix.json and regenerated queries/highlights.scm + - label: Update mux-website Monaco and Shiki definitions + - type: textarea + id: example + attributes: + label: Example code + render: text diff --git a/templates/mux-website-api/ISSUE_TEMPLATE/bug_report.md b/templates/mux-website-api/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index de382ab..0000000 --- a/templates/mux-website-api/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: Bug report -about: Report incorrect compile/run behavior from the playground API -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Description - -## Steps to reproduce - -1. Mux source (minimal): -2. Request or endpoint: -3. Response or error: - -## Expected behavior - -## Environment - -- Deployed API version or MUX_VERSION pin (if known): diff --git a/templates/mux-website-api/ISSUE_TEMPLATE/bug_report.yml b/templates/mux-website-api/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..5372ae2 --- /dev/null +++ b/templates/mux-website-api/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,31 @@ +name: Bug report +description: Report incorrect compile/run behavior from the playground API +labels: ["needs triage"] +assignees: ["DerekCorniello"] +body: + - type: textarea + id: description + attributes: + label: Description + validations: + required: true + - type: textarea + id: repro + attributes: + label: Steps to reproduce + value: | + 1. Mux source (minimal): + 2. Request or endpoint: + 3. Response or error: + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected behavior + validations: + required: true + - type: textarea + id: environment + attributes: + label: Environment diff --git a/templates/mux-website/ISSUE_TEMPLATE/bug_report.md b/templates/mux-website/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index a5fab35..0000000 --- a/templates/mux-website/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: Bug report -about: Report a bug on mux-lang.dev or the playground -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Description - -## Steps to reproduce - -1. URL or page: -2. Action taken: -3. What happened: - -## Expected behavior - -## Environment - -- Browser: -- OS: diff --git a/templates/mux-website/ISSUE_TEMPLATE/bug_report.yml b/templates/mux-website/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..6cb4456 --- /dev/null +++ b/templates/mux-website/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,35 @@ +name: Bug report +description: Report a bug on mux-lang.dev or the playground +labels: ["needs triage"] +assignees: ["DerekCorniello"] +body: + - type: textarea + id: description + attributes: + label: Description + validations: + required: true + - type: textarea + id: repro + attributes: + label: Steps to reproduce + value: | + 1. URL or page: + 2. Action taken: + 3. What happened: + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected behavior + validations: + required: true + - type: input + id: browser + attributes: + label: Browser + - type: input + id: os + attributes: + label: OS diff --git a/templates/mux-website/ISSUE_TEMPLATE/documentation_fix.md b/templates/mux-website/ISSUE_TEMPLATE/documentation_fix.md deleted file mode 100644 index fb36bf7..0000000 --- a/templates/mux-website/ISSUE_TEMPLATE/documentation_fix.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: Documentation fix -about: Report incorrect or missing content on mux-lang.dev -title: "" -labels: "documentation, needs triage" -assignees: DerekCorniello ---- - -## Page URL - -## What is wrong - -## Expected content diff --git a/templates/mux-website/ISSUE_TEMPLATE/documentation_fix.yml b/templates/mux-website/ISSUE_TEMPLATE/documentation_fix.yml new file mode 100644 index 0000000..3abc19f --- /dev/null +++ b/templates/mux-website/ISSUE_TEMPLATE/documentation_fix.yml @@ -0,0 +1,21 @@ +name: Documentation fix +description: Report incorrect or missing content on mux-lang.dev +labels: ["documentation", "needs triage"] +assignees: ["DerekCorniello"] +body: + - type: input + id: url + attributes: + label: Page URL + validations: + required: true + - type: textarea + id: wrong + attributes: + label: What is wrong + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected content diff --git a/templates/mux-website/ISSUE_TEMPLATE/feature_request.md b/templates/mux-website/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 3d7f090..0000000 --- a/templates/mux-website/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: Feature request -about: Suggest a docs site or playground improvement -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Problem - -## Proposed solution - -## Additional context diff --git a/templates/mux-website/ISSUE_TEMPLATE/feature_request.yml b/templates/mux-website/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..ca2641e --- /dev/null +++ b/templates/mux-website/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,21 @@ +name: Feature request +description: Suggest a docs site or playground improvement +labels: ["needs triage"] +assignees: ["DerekCorniello"] +body: + - type: textarea + id: problem + attributes: + label: Problem + validations: + required: true + - type: textarea + id: solution + attributes: + label: Proposed solution + validations: + required: true + - type: textarea + id: context + attributes: + label: Additional context diff --git a/templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.md b/templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index a87a678..0000000 --- a/templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Report a parse error, crash, or incorrect highlight query -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Description - -## Affected editor(s) - -- [ ] Neovim (nvim-treesitter) -- [ ] Helix -- [ ] Emacs -- [ ] Other: - -## Steps to reproduce - -1. Code sample: -2. Command or action: -3. Actual result: - -## Expected result - -## Environment - -- tree-sitter-cli version: diff --git a/templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.yml b/templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..b17a105 --- /dev/null +++ b/templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,40 @@ +name: Bug report +description: Report a parse error, crash, or incorrect highlight query +labels: ["needs triage"] +assignees: ["DerekCorniello"] +body: + - type: textarea + id: description + attributes: + label: Description + validations: + required: true + - type: checkboxes + id: editors + attributes: + label: Affected editor(s) + options: + - label: Neovim (nvim-treesitter) + - label: Helix + - label: Emacs + - label: Other (say which in the description) + - type: textarea + id: repro + attributes: + label: Steps to reproduce + value: | + 1. Code sample: + 2. Command or action: + 3. Actual result: + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected result + validations: + required: true + - type: input + id: version + attributes: + label: tree-sitter-cli version diff --git a/templates/tree-sitter-mux/ISSUE_TEMPLATE/grammar_sync.md b/templates/tree-sitter-mux/ISSUE_TEMPLATE/grammar_sync.md deleted file mode 100644 index 0eb007d..0000000 --- a/templates/tree-sitter-mux/ISSUE_TEMPLATE/grammar_sync.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Grammar sync -about: Track syncing the vendored syntax-matrix.json from mux-syntax-highlighting -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Context - - - -## Current state - -- [ ] syntax-matrix.json updated in this repo -- [ ] grammar.js regenerated -- [ ] queries/highlights.scm updated -- [ ] tree-sitter test passes - -## Notes diff --git a/templates/tree-sitter-mux/ISSUE_TEMPLATE/grammar_sync.yml b/templates/tree-sitter-mux/ISSUE_TEMPLATE/grammar_sync.yml new file mode 100644 index 0000000..a8490a8 --- /dev/null +++ b/templates/tree-sitter-mux/ISSUE_TEMPLATE/grammar_sync.yml @@ -0,0 +1,25 @@ +name: Grammar sync +description: Track syncing the vendored syntax-matrix.json from mux-syntax-highlighting +labels: ["needs triage", "syntax-matrix"] +assignees: ["DerekCorniello"] +body: + - type: textarea + id: context + attributes: + label: Context + description: Link to the spec change issue or PR in mux-syntax-highlighting. + validations: + required: true + - type: checkboxes + id: state + attributes: + label: Current state + options: + - label: syntax-matrix.json updated in this repo + - label: grammar.js regenerated + - label: queries/highlights.scm updated + - label: tree-sitter test passes + - type: textarea + id: notes + attributes: + label: Notes From b38410f20e0b1a4a22ff8f07d74ffb46578bdc73 Mon Sep 17 00:00:00 2001 From: Derek Corniello Date: Wed, 8 Jul 2026 00:30:50 -0400 Subject: [PATCH 2/3] chore: remove one-shot cleanup scripts retire-labels.sh and clear-milestones.sh have been run against the org (labels validate clean in all 8 repos; no milestones remain). Ongoing enforcement is sync-labels.sh, sync-templates.sh, and validate-labels.py. Co-Authored-By: Claude Fable 5 --- README.md | 4 +--- scripts/clear-milestones.sh | 28 ---------------------------- scripts/retire-labels.sh | 24 ------------------------ 3 files changed, 1 insertion(+), 55 deletions(-) delete mode 100755 scripts/clear-milestones.sh delete mode 100755 scripts/retire-labels.sh diff --git a/README.md b/README.md index 5320015..1e35831 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,8 @@ Organization-level defaults for the [muxlang](https://github.com/muxlang) org: - `templates//` - canonical issue template sources synced to each repo. - `scripts/sync-labels.sh` - apply label YAML to org repos (`gh` CLI required). - `scripts/sync-templates.sh` - copy `templates//` into a repo checkout. -- `scripts/retire-labels.sh` - delete retired labels org-wide. - `scripts/validate-labels.py` - diff live labels against the canonical YAML; - exits nonzero on drift (run after any sync or retire). -- `scripts/clear-milestones.sh` - bulk-clear milestones from a repo's issues. + exits nonzero on drift (run after any sync). Policy and workflow rules: [mux-context/docs/repo-governance.md](https://github.com/muxlang/mux-context/blob/main/docs/repo-governance.md). diff --git a/scripts/clear-milestones.sh b/scripts/clear-milestones.sh deleted file mode 100755 index d06b3e4..0000000 --- a/scripts/clear-milestones.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -# Bulk-clear milestones from all issues in a repo (issues are not deleted). -# Usage: ./scripts/clear-milestones.sh -set -euo pipefail - -REPO="${1:?usage: clear-milestones.sh }" -FULL="muxlang/$REPO" - -echo "Clearing milestones on $FULL ..." -gh api "repos/$FULL/issues?state=all&per_page=100" --paginate \ - --jq '.[] | select(.milestone != null and (.pull_request | not)) | .number' | while read -r num; do - id="$(gh issue view "$num" --repo "$FULL" --json id -q .id)" - gh api graphql -f query=" - mutation { - updateIssue(input: {id: \"$id\", milestoneId: null}) { - issue { number } - } - }" - echo " cleared #$num" -done - -echo "Closing milestones on $FULL ..." -gh api "repos/$FULL/milestones?state=all&per_page=100" --paginate --jq '.[].number' | while read -r n; do - gh api -X PATCH "repos/$FULL/milestones/$n" -f state=closed - echo " closed milestone #$n" -done - -echo "Done." diff --git a/scripts/retire-labels.sh b/scripts/retire-labels.sh deleted file mode 100755 index 840b3b6..0000000 --- a/scripts/retire-labels.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -# Delete retired labels from all muxlang repos. -set -euo pipefail - -REPOS=( - mux-compiler mux-runtime mux-website-api mux-syntax-highlighting - mux-website tree-sitter-mux mux-context .github -) -RETIRED=( - "priority: urgent" "priority: high" "priority: medium" "priority: low" - "needs tested" "bug" "feature" - # Mangled variants created by the old sync-labels.sh quote-stripping bug; - # the leading double-quote character is part of the live label name. - '"priority: urgent' '"priority: high' '"priority: medium' '"priority: low' -) - -for repo in "${REPOS[@]}"; do - echo "Retiring labels on muxlang/$repo ..." - for label in "${RETIRED[@]}"; do - gh label delete "$label" --repo "muxlang/$repo" --yes 2>/dev/null || true - done -done - -echo "Done." From 4cb2957f936935be49f844d028c205547ac7ffc7 Mon Sep 17 00:00:00 2001 From: Derek Corniello Date: Wed, 8 Jul 2026 00:43:38 -0400 Subject: [PATCH 3/3] chore: address review findings on validator and forms - validate-labels.py: paginate the live-label fetch via gh api so repos with >100 labels are fully covered; accept blank canonical descriptions; tolerate null live descriptions. - api bug form: restore the deployed-version prompt in Environment. - compiler bug form and syntax spec form: render code fields as mux. - editor bug forms: plain Other checkbox plus a structured Other editor input instead of burying the name in the description. Co-Authored-By: Claude Fable 5 --- scripts/validate-labels.py | 12 +++++++----- templates/mux-compiler/ISSUE_TEMPLATE/bug_report.yml | 2 +- .../ISSUE_TEMPLATE/bug_report.yml | 7 ++++++- .../ISSUE_TEMPLATE/syntax_spec_change.yml | 2 +- .../mux-website-api/ISSUE_TEMPLATE/bug_report.yml | 2 ++ .../tree-sitter-mux/ISSUE_TEMPLATE/bug_report.yml | 7 ++++++- 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/scripts/validate-labels.py b/scripts/validate-labels.py index 7beca87..bd904b3 100755 --- a/scripts/validate-labels.py +++ b/scripts/validate-labels.py @@ -38,7 +38,7 @@ def parse_yaml(path): if m: color = m.group(1).strip().strip('"') continue - m = re.match(r'^\s+description:\s*(.+)$', raw) + m = re.match(r'^\s+description:\s*(.*)$', raw) if m and name and color: labels[name] = (color.lower(), m.group(1).strip().strip('"')) name = color = None @@ -46,14 +46,16 @@ def parse_yaml(path): def live_labels(repo): + # gh api --paginate follows Link headers, so repos with more than one + # page of labels are fully covered (gh label list caps at its --limit). out = subprocess.run( - ["gh", "label", "list", "-R", f"muxlang/{repo}", "--limit", "100", - "--json", "name,color,description"], + ["gh", "api", f"repos/muxlang/{repo}/labels", "--paginate", + "--jq", ".[] | {name, color, description}"], check=True, capture_output=True, text=True, ).stdout return { - l["name"]: (l["color"].lower(), l["description"]) - for l in json.loads(out) + l["name"]: (l["color"].lower(), l["description"] or "") + for l in (json.loads(line) for line in out.splitlines() if line) } diff --git a/templates/mux-compiler/ISSUE_TEMPLATE/bug_report.yml b/templates/mux-compiler/ISSUE_TEMPLATE/bug_report.yml index 3abc17e..c574982 100644 --- a/templates/mux-compiler/ISSUE_TEMPLATE/bug_report.yml +++ b/templates/mux-compiler/ISSUE_TEMPLATE/bug_report.yml @@ -37,7 +37,7 @@ body: id: example attributes: label: Minimal example - render: text + render: mux description: Smallest Mux program that reproduces the problem. - type: input id: version diff --git a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.yml b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.yml index 23e31d0..a35b047 100644 --- a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.yml +++ b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.yml @@ -19,7 +19,12 @@ body: - label: JetBrains - label: Neovim (editor-support) - label: Helix (editor-support) - - label: Other (say which in the description) + - label: Other + - type: input + id: other_editor + attributes: + label: Other editor + description: Name and version, if you checked Other. - type: textarea id: repro attributes: diff --git a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.yml b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.yml index 09680ac..c60a990 100644 --- a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.yml +++ b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.yml @@ -31,4 +31,4 @@ body: id: example attributes: label: Example code - render: text + render: mux diff --git a/templates/mux-website-api/ISSUE_TEMPLATE/bug_report.yml b/templates/mux-website-api/ISSUE_TEMPLATE/bug_report.yml index 5372ae2..1041c31 100644 --- a/templates/mux-website-api/ISSUE_TEMPLATE/bug_report.yml +++ b/templates/mux-website-api/ISSUE_TEMPLATE/bug_report.yml @@ -29,3 +29,5 @@ body: id: environment attributes: label: Environment + value: | + - Deployed API version or MUX_VERSION pin (if known): diff --git a/templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.yml b/templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.yml index b17a105..bea6d21 100644 --- a/templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.yml +++ b/templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.yml @@ -17,7 +17,12 @@ body: - label: Neovim (nvim-treesitter) - label: Helix - label: Emacs - - label: Other (say which in the description) + - label: Other + - type: input + id: other_editor + attributes: + label: Other editor + description: Name and version, if you checked Other. - type: textarea id: repro attributes: