Skip to content

chore(deps-dev): bump rector/rector from 2.6.4 to 2.6.6 in /vendor-bin/rector #707

chore(deps-dev): bump rector/rector from 2.6.4 to 2.6.6 in /vendor-bin/rector

chore(deps-dev): bump rector/rector from 2.6.4 to 2.6.6 in /vendor-bin/rector #707

name: Spec Validation
# Validates the OpenRegister register seed (lib/Settings/*_register.json) and the
# CnAppRoot manifest (src/manifest.json) on every push and PR:
# - check:json-strict — strict JSON parse, rejects duplicate keys + appendOnly
# nested in x-openregister (the silent-data-loss class of bug a bad JSON merge
# produces — see the scholiq Wave-2 incident)
# - check:manifest — Ajv validation against @conduction/nextcloud-vue's
# app-manifest.schema.json (catches invented page/widget/action shapes)
# - check:register — structural checks: schema shape, slug uniqueness,
# lifecycle `requires:` → PHP class exists, "schema looks clobbered" heuristic
#
# To make these BLOCK a merge, add the "Spec Validation / validate" check to the
# branch-protection ruleset's required-status-checks list (org settings).
on:
push:
branches: [main, master, development, beta, 'feature/**', 'bugfix/**', 'hotfix/**', 'chore/**', 'fix/**', 'spec/**']
pull_request:
branches: [main, master, development, beta]
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-latest
# Observed fleet-wide: median 0.5 min, max 3.2 min (n=162). Deliberately loose.
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
# 20 shipped npm 10, which cannot read the npm-11 lockfile this repo
# now commits — it reports `Missing: picomatch@4.0.5 from lock file`
# for a package that IS in the lock. Matches package.json engines.
node-version: '24'
cache: 'npm'
- name: Install dependencies
run: npm ci --no-audit --no-fund
# This app ships neither a CnAppRoot manifest nor an OpenRegister seed, and
# `check:specs` was never wired here — so the step failed on every PR with
# "Missing script", which reads as a code-quality finding and is not one.
#
# Count the subject matter before deciding. Zero artefacts is a real skip
# and says so; artefacts without a validator is a wiring gap and FAILS,
# so this can never go quiet the day this app grows a manifest.
- name: Validate specs (json-strict + manifest + register)
run: |
set -uo pipefail
shopt -s nullglob
# Test each path for real. `src/manifest.json` is a literal, not a
# glob, so nullglob would NOT drop it when the file is absent — the
# count would read 1 and the skip branch would never be taken.
artefacts=()
[ -f src/manifest.json ] && artefacts+=(src/manifest.json)
for f in lib/Settings/*_register.json; do
[ -f "$f" ] && artefacts+=("$f")
done
echo "spec artefacts found: ${#artefacts[@]}"
[ "${#artefacts[@]}" -gt 0 ] && printf ' %s\n' "${artefacts[@]}"
if [ "${#artefacts[@]}" -eq 0 ]; then
echo "::notice::No src/manifest.json and no lib/Settings/*_register.json in this repository — spec validation has no subject matter here. Nothing was validated; this is a skip, not a pass."
exit 0
fi
if ! npm run --silent 2>/dev/null | grep -qE '^\s*check:specs'; then
echo "::error::${#artefacts[@]} spec artefact(s) exist but no check:specs script is wired, so they cannot be validated. Add check:json-strict / check:manifest / check:register and aggregate them into check:specs (see nextcloud-app-template)."
exit 1
fi
npm run check:specs