Repository navigation
Description
Description
Onboard exoma-ch/cad2gdml as the first devkit consumer outside the vig-os org. The repo is a Python CLI converting CAD STEP files to GDML for Geant4 (morePET PET scanner): private, GPL-3.0, single maintainer, ~2 800 LOC, 132 pytest tests, active. It currently has no packaging, lockfile, linting, pre-commit, justfile, or devcontainer — a clean slate for the devkit — but one heavy dependency: FreeCAD, today injected via an AppImage extract with hardcoded paths inside a hand-built Podman image (CPython 3.11 ABI).
Decisions already taken:
- Delivery mode:
direnv. - FreeCAD comes from nixpkgs via
extraPackages(1.1.1 in the current pin) — per thedocs/rfcs/ADR-capability-modules.mdescape hatch. Nofreecadcapability module; too niche until a second consumer asks.
Being the first external onboarding, this epic doubles as the shakedown for a reusable onboarding runbook (org pre-flight, secrets/apps, ruleset standards, workflow registration) that later consumers (EXOMA/EXOPET repos) will follow.
Readiness audit (2026-07-14)
Verified:
vig-os/devkitis public → the consumer flake input, theinstall.shone-liner, and the reusable actions are all reachable from a private exoma-ch repo with no auth plumbing.- Pinned nixpkgs ships
freecad1.1.1 andpython3Packages.pythonocc-core7.9.0. - exoma-ch org already has the
commit-action-botandvig-os-release-appGitHub Apps installed (all repos) and theCOMMIT_APP_*/RELEASE_APP_*org secrets. - devkit rulesets exist as the standard to replicate: Main protection, Dev protection, Release protection, Signed commits.
Gaps found (blocking or noteworthy):
- ABI blocker:
mkProjectShellpinspkgs.python314with no override, while nixpkgs FreeCAD is built against Python 3.13 →import FreeCADcannot work today. → [FEATURE] mkProjectShell: overridable Python interpreter for nixpkgs C-extension ABI alignment #1038 - Scaffold
codeql.yml/scorecard.ymlhave no private-repo guards → would land permanently red on cad2gdml (Free plan, no GHAS; Scorecard is public-only). → [FEATURE] Scaffold: guard codeql/scorecard workflows on private repos #1039 No Renovate app installed on exoma-chCorrection (2026-07-14): Renovate is installed on exoma-ch (repository_selection: all) — the initial audit truncated the installation list.exoma-ch lacks theCorrection (2026-07-14): the scaffoldAPP_SYNC_ISSUES_*secretssync-issues.ymlusesCOMMIT_APP_*(present);APP_SYNC_ISSUES_*is devkit-own.GHCR_PULL_TOKENfalls back togithub.token; noCACHIX_*reference exists in the scaffold. No missing secrets.- Known consumer-affecting bug in a scaffolded workflow: [BUG] sync-main-to-dev checks out dev, then runs a local action that only exists on main #1034 (
sync-main-to-dev). - Rulesets are not enforceable on private repos under GitHub Free — see Phase 1.
Phase 0 — devkit prerequisites
- [FEATURE] mkProjectShell: overridable Python interpreter for nixpkgs C-extension ABI alignment #1038 —
mkProjectShellPython interpreter override (FreeCAD ABI alignment) - [FEATURE] Scaffold: guard codeql/scorecard workflows on private repos #1039 — visibility-aware
codeql.yml/scorecard.ymlin the scaffold - Resolve or confirm-unaffected [BUG] sync-main-to-dev checks out dev, then runs a local action that only exists on main #1034 for the scaffolded
sync-main-to-dev.ymlcopy - Spike in a scratch consumer:
mkProjectShell { python = pkgs.python313; extraPackages = [ pkgs.freecad ]; }(+ whateverPYTHONPATH/env the FreeCAD derivation needs) untilpython3 -c "import FreeCAD"passes headless; record the exact snippet for the onboarding doc (done — recipe + Draft caveat in the Phase 1 execution comment below)
Phase 1 — exoma-ch / repo pre-flight (GitHub plumbing)
-
Install the Renovate (Mend) app on exoma-chalready installed (repository_selection: all) - Verify org-secret repository access includes
cad2gdml(COMMIT_APP_*,RELEASE_APP_*— allvisibility=all) - Enumerate remaining secrets/vars — none missing (see corrected audit above)
- Check exoma-ch Actions policy (
enabled_repositories: all,allowed_actions: all) - Branch model:
devcreated frommain; default branch staysmain; merge policy mirrored from devkit (merge-commit only, delete-branch-on-merge, web commit signoff) - Rulesets: decision = repo made PUBLIC (2026-07-14, after a clean gitleaks scan over all 91 commits); devkit's four rulesets imported and active (Main/Dev/Release protection + Signed commits, ids 18937429–33), required status check adapted
Test Summary→CI Summary(the scaffoldci.ymlsummary job name) - Provision labels from
.github/label-taxonomy.toml(setup-labelsapplied; pruning org-default labels left as optional) -
CODEOWNERSfor the scaffolded copy (maintainer + reviewer) — lands with the Phase 2 scaffold - Milestones (
BacklogImplement "just" #1 created)
Phase 2 — scaffold deployment
- Run
install.sh --mode direnvon a feature branch; review the diff carefully against existing files (three READMEs,COPYING.txt— the scaffold shipsLICENSE; must not clobber the GPL licensing),.gitignoremerge - Author the consumer
flake.nix:mkProjectShellwith the Python override ([FEATURE] mkProjectShell: overridable Python interpreter for nixpkgs C-extension ABI alignment #1038),extraPackages = [ pkgs.freecad ], opt-in generated hooks;.envrc;.vig-osmanifest (DEVKIT_MODE=direnv, version, identity) - Land the scaffold on the default branch early — workflows with
schedule/workflow_dispatch/ issue-event triggers only register once they exist on the default branch. Merge the scaffold PR before the phases that depend on those workflows; verify the Actions tab lists all of them - Maintainer environment onboarding: Nix + direnv install,
direnv allow, pointer todocs/NIX.md; plus a short commit-standard note — current history usesarea: summary, hooks will enforcetype(scope): summary+Refs: #<issue>from day one
Phase 3 — repo migration (implementation issues live in exoma-ch/cad2gdml)
- Packaging:
pyproject.toml+uv.lock; makeGUIMeshLibs/CLI an installable package; removesys.pathinjection and the hardcoded/usr/local/bin/squashfs-root/...FreeCAD paths (env-var seam; nixpkgs provides the path); pinrequires-pythonto the FreeCAD ABI (3.13) - Lint/format: one-time ruff format+lint commit on the existing code; pre-commit suite green
- CI migration: replace
tests.yml+build-container.ymlwith the mode-aware scaffoldci.yml; keep the existing two-tier test split (headless unit tests with mocked FreeCAD / integration tests needing real FreeCAD, now provided by the nix shell on the runner) - Regenerate and physically validate the golden GDML/HDF5 fixtures under FreeCAD 1.1.1 (currently generated with 1.0.1 — tessellation/precision output may shift; this is a scientific-validation step, not a mechanical one)
- Hygiene: untrack committed
__pycache__/*.pyc; remove personal-path scripts (build/Podman/start_container.shhardcodes a home directory); decide the fate ofbuild/Podman/(the slim runtime image could become anix2containerfollow-up or stay as-is for now) -
CHANGELOG.mdbootstrap (Keep a Changelog,## Unreleased); preserve the existingv1.0tag; smoke the release pipeline (prepare-releasedry-run) once wired
Phase 4 — validation & exit criteria
- Fresh clone →
direnv allow→just test-pytestgreen including the FreeCAD integration tier - CI green on PR and on the default branch; scheduled workflows registered and green (or intentionally skipped per [FEATURE] Scaffold: guard codeql/scorecard workflows on private repos #1039)
- End-to-end smoke:
Crystal.stepandring6x1.stepconversions reproduce the regenerated goldens; crystal-lookup HDF5 extraction works - Renovate dashboard issue opens; the renovate-changelog automation works on a real Renovate PR
- Distill this rollout into a general external-consumer onboarding doc (new
docs/ONBOARDING.mdor a MIGRATION.md section): org pre-flight checklist, secrets/apps matrix, ruleset export, default-branch workflow registration
Out of scope
- Replacing FreeCAD with pythonocc/OCC (upstream Slim it down: use directly OCC and skip FreeCAD exoma-ch/cad2gdml#2) — worthwhile, but a separate future effort in that repo
- A
freecad/cadcapability module — promote fromextraPackagesonly when a second consumer asks (ADR policy) - cad2gdml feature work (config-file CLI config file instead of CLI flags exoma-ch/cad2gdml#22, image baking Put the code in the image so no need to git clone it before exoma-ch/cad2gdml#11)
Additional context
- Consumer repo state: 89 commits, one maintainer, good issue→branch→PR discipline, pytest culture already in place — the social cost of adoption is low; the technical crux is FreeCAD packaging and the Python-ABI pin.
- Precedent: the vig-os-internal rollout pilot ([EPIC] Mode-aware scaffold: CI/release toolchain per deployment mode #988,
commit-action) validated mode-aware CI; this epic validates the cross-org path.
Activity
feat(image): allow overriding the mkProjectShell python interpreter (#…
feat(ci): skip codeql and scorecard scans on private repos (#1050)
c-vigo commentedon Jul 14, 2026
Phase 0 + Phase 1 execution log (2026-07-14)
Phase 0 — devkit prerequisites: DONE
#1038, #1039, #1034 all merged/closed; release train 1.2.0 in flight (release PR #1068). The FreeCAD spike ran against
github:vig-os/devkit/dev:Working consumer recipe (proven on x86_64-linux, headless, sandboxed shell):
Result:
import FreeCAD, Part, Import, FreeCADGui→ all OK (FreeCAD 1.1.1, Python 3.13.13). SetQT_QPA_PLATFORM=offscreenin CI for safety.Caveat —
import Draftsegfaults (SIGSEGV inlibpyside6SignalManager::retrieveMetaObject, swallowed by FreeCAD's crash handler as a silentexit(1)). Reproduced with FreeCAD's ownFreeCADCmd -c "import Draft"→ upstream nixpkgs/FreeCAD 1.1.1 + PySide 6.11 issue, not a devkit or recipe defect. Materially irrelevant here: cad2gdml importsDraftbut never calls anyDraft.API (dead import inherited from GUIMesh3) → Phase 3 drops the import. Worth an upstream nixpkgs report at some point.Phase 1 — pre-flight: DONE (checkboxes ticked in the body; two audit corrections struck through)
exoma-ch/cad2gdml→ publicdevbranchmain(refs/heads/dev)Test Summary→CI Summary(scaffold job name)setup-labelsBacklog(#1)COMMIT_APP_*/RELEASE_APP_*org secretsvisibility=all; nothing missing — scaffoldsync-issues.ymlusesCOMMIT_APP_*,GHCR_PULL_TOKENfalls back togithub.token, noCACHIX_*in the scaffoldnot-configured→ matches the advanced-config-authoritative rollout standard, nothing to disableRemaining before Phase 2
install.sh --version 1.2.0.type(scope): summary+Refs: #<issue>enforced by hooks), and confirmation she's aware the repo is now public.CODEOWNERS— arrives with the scaffold PR.c-vigo commentedon Jul 14, 2026
Consumer-side migration issue filed: exoma-ch/cad2gdml#23 — Phases 2/3 (scaffold + repo migration) and the maintainer-onboarding checklist are tracked there; commits/PRs in that repo use it as their
Refs:target. Labels on cad2gdml pruned to the taxonomy.