feat(structure-lock): freeze root layout + CI gate + pre-commit — pilot (FIVUCSAS#209)#210
Conversation
…CSAS#209) Pilot the org repo structure-lock on the umbrella repo. - .repo-structure.yml: allowlists FROZEN from the current clean origin/master root (16 root files + 20 root dirs) + forbidden_root_patterns so dated tracking docs (*_AUDIT_*, *_2026-06-13*, TODO*/ROADMAP*/BACKLOG*) can never reappear at root + required_files (README/LICENSE/.gitignore). - .github/workflows/structure-check.yml: thin caller of the org reusable workflow Rollingcat-Software/.github .github/workflows/repo-structure.yml@main, on pull_request. FAILS the PR on any layout drift. - .pre-commit-config.yaml: add the `repo-structure` hook from the .github repo for fast local feedback mirroring the CI gate. Verified: check PASSES on the current clean root (exit 0) and FAILS on a planted TEST_AUDIT_2026-06-13.md (exit 1, FORBIDDEN). Dummy removed. Depends on Rollingcat-Software/.github#2 (reusable workflow + script).
|
Note on the red Order of operations:
Proof the mechanism works end-to-end (independent of this ordering): the Locally, against this PR's exact tree: clean root → PASS (exit 0); planted |
What
Pilots the repo structure-lock (ArchUnit-style FREEZE of the root file/folder layout) on the umbrella repo. Closes #209 once the owner sets the required check (below).
It blocks — when a disallowed/forbidden file appears at the root (e.g. a stray dated tracking doc), the PR's
structure-checkgoes red. It does not silently auto-move anything.Depends on Rollingcat-Software/.github#2 (the reusable workflow + stdlib check script). Merge that PR first, or the caller's
uses:ref won't resolve.Contents
.repo-structure.ymlforbidden_root_patterns+required_files..github/workflows/structure-check.ymlpull_request..pre-commit-config.yamlrepo-structurehook (from the.githubrepo) alongside the existing gitleaks hook.The forbidden patterns encode the convention "tracking → GitHub issues, NOT root docs":
Proof
Local use
Rollout to the 7 submodules
Each submodule gets the same two files, frozen from its own root:
gh repo clone Rollingcat-Software/<repo>), add.repo-structure.ymllisting exactly the current root files/dirs (the frozen baseline) + the sameforbidden_root_patternsblock above +required_files(at leastREADME.md)..github/workflows/structure-check.yml:.pre-commit-config.yaml:structure-checkpasses on the clean root.The 7 submodules:
identity-core-api,biometric-processor,web-app,client-apps,spoof-detector,docs,practice-and-test.One manual OWNER step (makes it actually block)
After this PR's
structure-checkhas run at least once (so GitHub knows the check name), add it as a required status check onmaster:(The check context surfaces as
structure-check— the caller job name. If GitHub shows it nested asrepo-structure / structure-check, use that exact string. Confirm the displayed name on the first PR run, then add it.) Repeat per submodule on its default branch (main).Do not merge until reviewed.