Skip to content

feat: recommendation-freshness overhaul β€” purge stale advice, remove … #2

feat: recommendation-freshness overhaul β€” purge stale advice, remove …

feat: recommendation-freshness overhaul β€” purge stale advice, remove … #2

name: Structure Check
# Guards the two invariants a link checker cannot see:
# 1. README.md / README.zh-CN.md / README.ja.md stay in structural lockstep
# (same headings in the same order, same entries per section, same order).
# 2. The markdown itself stays well-formed (in-page anchors resolve, table
# rows have consistent column counts, no malformed entries or open fences).
# 3. The advisory sections (Compare tables, Scenario Guide, Stack Recipes,
# Anti-Picks) recommend only models that are still current. Historical
# sections may name superseded models; "what should I use today" sections
# may not.
#
# All three scripts exit non-zero on failure, so a PR that silently drops the
# zh/ja translation of a new entry β€” historically the most common drift source β€”
# fails here instead of shipping. Likewise a refresh that adds a new flagship to
# the catalogue but forgets to update the recommendations fails instead of
# quietly telling readers to use last quarter's model.
on:
pull_request:
paths:
- "README.md"
- "README.zh-CN.md"
- "README.ja.md"
- "scripts/sync_audit.py"
- "scripts/check_markdown.py"
- "scripts/freshness_audit.py"
- ".github/workflows/structure-check.yml"
push:
branches: [main]
paths:
- "README.md"
- "README.zh-CN.md"
- "README.ja.md"
workflow_dispatch:
jobs:
structure:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: en/zh/ja lockstep audit
run: python3 scripts/sync_audit.py
- name: Markdown structure check
run: python3 scripts/check_markdown.py
- name: Recommendation freshness audit
run: python3 scripts/freshness_audit.py