molecule-dev-department/.github/workflows/validate.yml
claude-ceo-assistant a21212d73d
All checks were successful
Validate dev-department tree / Validate tree (pull_request) Successful in 49s
scaffold(0001): validator + CI gate + dev-department.yaml manifest
Initial scaffold for the dev-department subtree repo. No workspace
content yet — that lands in Phase 3c-2 (extract dev tree with git
history from molecule-ai-org-template-molecule-dev).

Files:

- dev-department.yaml      manifest with defaults + category_routing,
                           empty roots: [] (gets populated by extract).
- .molecule-ci/scripts/validate-tree.py
                           orphan / reachability lint. Walks manifest
                           → roots → recursive children + !include,
                           compares against filesystem, reports
                           orphans + cross-tree '..' refs + duplicate
                           parents + missing workspace.yaml. Exits
                           non-zero on any violation. Stdlib only +
                           PyYAML.
- .github/workflows/validate.yml
                           CI gate runs the validator on every PR +
                           push to main/staging. Pinned action SHAs
                           per saved memory feedback_pin_third_party_actions.
- README.md                explains subtree contract: parent template
                           must symlink the dev-department under a
                           short name (e.g. `dev`), workspace
                           files_dir paths inside this repo use the
                           symlink prefix, this repo is NOT directly
                           importable as a standalone org template.
- .gitignore               ignore .env (per-workspace secrets are
                           populated by platform import, never
                           committed).
- .gitattributes           force LF on shell/Python/YAML.

Verified locally:
  - empty tree → "OK — tree is clean", exit 0.
  - cross-tree `..` fixture → exit 1, FAIL with reported violation.
  - orphan fixture → exit 1, FAIL with reported orphan folder.

Refs:
  - internal#77 (extraction RFC, Phase 1+2 done as comment 1886)
  - molecule-core#102 (symlink-resolution contract pinned by tests)
  - Hongming GO 2026-05-08 ("you own this feature and repos, start")
  - SOP Phase 3b — task #223
2026-05-07 20:48:16 -07:00

46 lines
1.3 KiB
YAML

# Gitea Actions CI gate: run the tree validator on every PR + push.
#
# The validator catches: orphan workspace folders, cross-tree `..`
# traversal in children: paths, duplicate parent claims, missing
# workspace.yaml, generic !include errors.
#
# Refs: internal#77 (Phase 3b — task #223).
name: Validate dev-department tree
on:
push:
branches: [main, staging]
pull_request:
branches: [main, staging]
workflow_dispatch:
permissions:
contents: read
jobs:
validate:
name: Validate tree
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# We don't follow submodules. The dev-department subtree is
# self-contained; cross-repo composition is verified at the
# parent-template's CI level (internal#77 Phase 4).
submodules: false
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: '3.11'
- name: Install PyYAML
run: python -m pip install --no-input --disable-pip-version-check pyyaml==6.0.1
- name: Run validator
run: |
chmod +x .molecule-ci/scripts/validate-tree.py
.molecule-ci/scripts/validate-tree.py