mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
fix/dev-python/python-upper-bound
8
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
194671d90f |
feat(readme): uniform description schema and clearer role titles
Rewrite all 254 role descriptions to a uniform noun-phrase schema (function-first, no leading verb, no trailing period, <=120 chars) and enforce it via the extended description lint. Rename 12 role README H1 titles for clarity (e.g. Backup Container to Local -> Backup Docker Volumes, CSS Service -> Corporate Design, NGINX Legal -> Imprint) and regenerate their Cosmos and Quick Setup sections. Overview table regenerated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
c52e4269bf |
chore(tooling): integrate mbake (Makefile linter/formatter) + working-tree drift sync
Makefile lint integration: * scripts/install/lint.sh: replace the prior checkmake binary install with ensure_mbake (mbake is pip-installable, parses our Makefile correctly whereas checkmake bailed on .ONESHELL: / .SHELLFLAGS: / ifneq). * scripts/lint/makefile.sh: new runner — `mbake format --check Makefile` reports formatting drift and missing .PHONY declarations. * scripts/lint/autoformat.sh: add a two-pass `mbake format Makefile` (mbake's formatter is not strictly idempotent on the first pass). * Makefile: split the multi-line `.PHONY:` block into 18 single-line `.PHONY:` declarations so mbake's parser can validate it; add the previously-missing `install-python-dev` and `build-dependency` PHONY targets; add `lint-makefile` aggregate-and-direct target. * .pre-commit-config.yaml: new make-lint-makefile hook scoped to `^Makefile$`. * .github/workflows/lint-makefile.yml: new CI workflow (pip-install mbake + make lint-makefile). * .github/workflows/ci-orchestrator.yml: wire lint-makefile into lint-gate.needs. Misc: * .gitignore: add roles/importer_result.json (tooling artefact written by galaxy-importer when it runs in roles/). Plus working-tree drift across roles/, group_vars/, inventories/, and tasks/ that accumulated from the make-test setup phase regenerating generated artefacts during recent test runs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
79409ebf10 |
test(tooling): integrate markdownlint-cli2, ansible-lint, galaxy-importer + fix the resulting baseline
Tooling integration
* add .markdownlint-cli2.jsonc, .ansible-lint, .ansible-lint-ignore
configs (permissive day-1: cosmetic rules disabled, semantic ones on)
* extend scripts/install/lint.sh with generic install_pip_pkg helper +
ensure_ansible_lint / ensure_galaxy_importer / ensure_markdownlint_cli2
ensure_* functions (pip / npm with sudo / --user / --break-system-packages
fallbacks). install_ansible_tools now also pulls ansible-lint and
galaxy-importer; new `markdown` install group.
* extend scripts/lint/ansible.sh to run ansible-lint after the existing
syntax-check.
* add scripts/lint/markdown.sh and scripts/lint/galaxy.sh runners. The
galaxy runner parallelizes via xargs (-P=$(nproc)), prints OK/FAIL per
role, and treats `bare-name dependency` errors as success since our
roles/ tree is not a Galaxy collection layout. All other Galaxy schema
errors still fail.
* Makefile: new lint-markdown and lint-galaxy targets, both wired into
`make lint`.
* CI: new workflows lint-markdown.yml and lint-galaxy.yml; lint-ansible.yml
now installs ansible-core + ansible-lint; ci-orchestrator wires both
new lint workflows into lint-gate.
Galaxy schema fixes
* shorten the canonical `galaxy_info.company` block from three lines to
two ("Kevin Veen-Birkenbach\nhttps://www.veen.world", 45 chars) so it
stays under Galaxy's hard 50-char limit. Updated everywhere: 229 role
meta/main.yml plus _CANONICAL_COMPANY in
tests/lint/repository/test_role_meta_main_galaxy_schema.py.
* shorten 19 over-long role descriptions to <=255 chars.
* add stub READMEs for sys-svc-compose-ca and sys-utils-service-loader.
Markdown baseline fixes
* markdownlint-cli2 --fix run repo-wide (formatting normalization
across CHANGELOG, role READMEs, docs).
* manual MD041 fixes: prepend H1 in 15 files (CHANGELOG, LICENSE,
TODO.md helpers, role README templates, etc.).
* MD025 / MD003 / MD001 / MD032 manual fixes for heading-style and
list-spacing edge cases.
* role README content polish: "## Single Point of Truth (SPOT)" headings
renamed to "## User data resolution" (D3 self-label rule).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
afdbd58540 |
chore(roles): normalize meta platforms + role README Credits, revert GenericLinux drift
* meta/main.yml: replace every prior platforms variant (Linux, GenericLinux, Any, Archlinux+rolling/all, distro-specific pins) with the canonical 5-distro list (ArchLinux, Debian, EL, Fedora, Ubuntu; versions: [all] each). * lint: merge tests/lint/ansible/roles/test_meta_company_canonical.py into tests/lint/repository/test_role_meta_main_galaxy_schema.py and add a parallel canonical-platforms exact-value check; one file walk enforces both schema conformance and the two project canonical exact-values (company block-scalar + platforms 5-distro list). * roles/<role>/README.md: strip emojis from H1/H2 headings (per readme_md.md role rule), normalize the Credits block to the canonical wording (Author/Authors/Author Information aliased; canonical block appended where absent). * repo-wide: revert text-drift `GenericLinux` -> `Linux` in role description fields, README body prose, vars, j2 templates, and the Makefile (87 occurrences). The lint docstring keeps a single historical mention. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
653636e656 |
chore(roles): normalize galaxy_info.company + add canonical-company lint
Collapse the prior ~10 variants of galaxy_info.company (single-line,
multi-line single-quoted, multi-line double-quoted, escaped \n,
Unicode non-breaking hyphen, Birchenbach typo, block-scalar) into one
canonical block-scalar form across every roles/*/meta/main.yml that
declares the field:
company: |
Kevin Veen-Birkenbach
Consulting & Coaching Solutions
https://www.veen.world
Add tests/lint/ansible/roles/test_meta_company_canonical.py so future
drift fails CI immediately.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
0ab817a839 |
refactor(roles): drop non-Galaxy license_url / repository / documentation from meta/main.yml
These three sub-keys lived under `galaxy_info:` purely as a workaround because Galaxy silently ignores unknown keys (same pattern as the `run_after` / `lifecycle` migration in req-010). The new lint `tests/lint/repository/test_role_meta_main_galaxy_schema.py` rejects them, and no consumer in `plugins/`, `utils/`, `cli/`, `filter_plugins/` or `roles/` reads any of them, so the strip is safe. Round-trip via ruamel.yaml so the remaining `galaxy_info:` block keeps its key order, quoting style and inline comments. 224 files touched. Remaining lint offenders after this commit are still present (`logo`, `homepage`, `video`, plus a handful of roles missing required Galaxy fields like `min_ansible_version` / `platforms` / `license`); those are a separate decision and not folded into this change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
ed04dad5d5 |
refactor(meta): land req-008/009/010 role-meta layout/networks/ports/run_after migration
Single atomic landing for three back-to-back role-meta refactor requirements
(see docs/requirements/008-role-meta-layout.md, 009-per-role-networks-and-ports.md,
010-role-meta-runafter-lifecycle-migration.md).
req-008 — role meta layout
* Move every role's metadata under meta/<topic>.yml with file-root
convention (no wrapping key matching the basename):
- schema/main.yml + config/main.yml.credentials → meta/schema.yml
- users/main.yml → meta/users.yml
- config/main.yml.server → meta/server.yml
- config/main.yml.rbac → meta/rbac.yml
- config/main.yml.compose.services + every other top-level key
of config/main.yml inlined under <entity>.<key>
→ meta/services.yml
- config/main.yml.compose.volumes → meta/volumes.yml
* Drop the legacy schema/, users/, config/ directories from every role.
* meta/schema.yml: support nested credential keys, optional `default:`
field (Jinja literal, not rendered/validated/regenerated), implicit
`algorithm: plain`.
* Materialised paths drop the `compose.` prefix:
compose.services.<e>.<…> → services.<e>.<…>
compose.volumes.<k> → volumes.<k>
<former-top-level>.<…> → services.<entity_name>.<former-top-level>.<…>
* Update every Python consumer (utils/cache, utils/manager, utils/applications,
plugins/lookup, plugins/filter, cli/*) plus every Jinja template, vars/*.yml
and task file to the new paths.
* No legacy fallback. Repository-wide grep for `compose.services.` /
`compose.volumes.` / `schema/main.yml` / `users/main.yml` / `config/main.yml`
is empty outside docs/requirements/ and tasks/utils/migrate_meta_layout.py.
* Add tests/lint/repository/test_role_meta_layout.py guarding against the
old paths returning, and an explicit lint guard that meta/variants.yml
files do not carry a `compose:` wrapper.
req-009 — per-role networks/ports
* Move group_vars/all/08_networks.yml.defaults_networks.local.<role>.{subnet,
dns_resolver} into roles/<role>/meta/server.yml.networks.local.{subnet,
dns_resolver}.
* Delete group_vars/all/09_ports.yml entirely; ports now live on the
service entity that exposes them at
roles/<role>/meta/services.yml.<entity>.ports.{inter,local,public}.
* Rename + int-cast every former top-level `services.<entity>.port`
field to `services.<entity>.ports.inter` (single int).
* Always-category-keyed maps for ports.local / ports.public; relay
spans use {start, end} integers.
* Add PORT_BANDS map to group_vars/all/08_networks.yml — single source
of truth for the per-<scope>.<category> band ranges, consumed by both
the new CLI helpers and the lint test.
* New CLI helpers (cli meta ports suggest, cli meta networks suggest)
walk the live role tree gap-first then increment-fallback, with
deterministic output and non-zero exit on capacity overflow.
* cli create role consumes both helpers when scaffolding a new role.
* Lint extensions: bare-int port shape rejection, host-bound port
collision check (single ints + relay span integers, inter excluded),
band-membership check with documented allow-list for the legacy
web-app-bigbluebutton.bigbluebutton.local.http: 48087 entry.
req-010 — run_after / lifecycle migration
* Move galaxy_info.run_after and galaxy_info.lifecycle out of
meta/main.yml into meta/services.yml.<primary_entity>.{run_after,
lifecycle}; <primary_entity> is the value returned by
get_entity_name(role_name).
* For multi-entity roles whose primary entity has no compose service
(web-app-bluesky → bluesky, web-app-matrix → matrix, desk/dev/drv/
gen roles), create a dedicated metadata-only top-level entry under
<primary_entity>.
* Introduce utils/roles/meta_lookup.py with get_role_run_after /
get_role_lifecycle that resolve <primary_entity> once and read from
meta/services.yml; degrade gracefully when meta/services.yml is
absent OR the field is absent; raise MetaServicesShapeError when the
file exists but is malformed.
* Update every consumer (utils/service_registry, utils/invokable,
cli/meta/applications/resolution/run_after/__main__, cli/meta/roles/
lifecycle_filter/__main__, cli/meta/applications/resolution/combined,
cli/build/{tree,graph,role_include}, cli/deploy/development/{common,
init,deps,deploy}, plugins/filter/canonical_domains_map, etc.) to
use the helper.
* Lint guards: no run_after/lifecycle in meta/main.yml; lifecycle
values restricted to {planned,pre-alpha,alpha,beta,stable,deprecated};
run_after/lifecycle never on a non-primary entity; empty run_after
lists rejected.
Also folded into this change set
* services_disabler now writes `services.<svc>.{enabled,shared}` into
host_vars instead of the old `compose.services.<svc>.{...}` path; the
discover/find pair walks meta/services.yml and only treats entries
carrying enabled/shared/provides as provider declarations (so
metadata-only entries from req-010 do not create spurious provider
rows).
* service_registry skips `run_after` deps whose target was filtered
out via SERVICES_DISABLED instead of failing the whole load.
* cli/mirror/resolver and cli/create/inventory/mirror_overrides emit/
consume the new applications.<role>.services.<svc>.image shape
(mirror.md updated to match).
* utils/domains/list.build_applications_from_roles now reads
meta/server.yml directly (it had been silently returning {} since
config/main.yml stopped existing).
* utils/roles/resource_validation.filter_roles_by_min_storage reads
meta/services.yml.<entity>.min_storage instead of the legacy
compose.services path.
* web-app-bluesky pre-clones the social-app build context BEFORE
sys-svc-compose so the build context is on disk by the time
sys-stk-front-proxy/tasks/main.yml flushes the docker build handler.
* 4 meta/variants.yml files (svc-ai-ollama, web-app-phpmyadmin,
web-app-wordpress, web-app-keycloak) lose their `compose: services:`
wrapper so deep-merge over meta/services.yml lands on the new
file-root shape.
Validation
* Unit tests: 1571 passed.
* Lint tests: 50 passed.
* Integration tests: 161 passed (1 skipped).
* Full-cycle fresh-purged-apps deploy succeeded for the 8-app validation
set: web-app-{nextcloud,wordpress,yourls,bigbluebutton,bluesky,gitea,
discourse,mattermost}.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
1fb252fc7d |
refactor(inventories,roles): migrate util-* to bundle inventories and unify AUR handling
Migrates large parts of the legacy util-* role structure to inventory-driven bundles and standardizes AUR installation via central system roles. - Adds `web-svc-legal`, `web-svc-asset`, and `web-app-dashboard` to all server bundles. - Removes `util-srv-corporate-identity` entirely. - Introduces new workstation bundle inventories: `admin`, `admin-network`, `browser`, `design`, `dev-*`, `game-*`, `office`. - Uses bundle variables `SYS_PACKAGES` and `SYS_AUR_PACKAGES` as the primary installation mechanism. - Removes/replaces obsolete util-desk/util-dev roles where fully covered. - Renames dev roles: `util-desk-dev-core` -> `dev-core`, `util-desk-dev-python` -> `dev-python`, `util-desk-dev-arduino` -> `dev-arduino`. - Adds missing `application_id` vars for renamed roles. - Removes the entire `util` section from `roles/categories.yml`. - Replaces direct `kewlfft.aur.aur` calls in desktop/driver roles with a centralized wrapper role. - Introduces new role `sys-aur-install` as AUR installation wrapper. - Migrates `dev-yay` to `sys-aur` and adds `SYS_AUR_PACKAGES: []` default. - Extends constructor stage: auto-load `sys-package` when `SYS_PACKAGES` is set, and `sys-aur` + `sys-aur-install` when `SYS_AUR_PACKAGES` is set. - Cleans up stage loading: removes util-srv from `02_server.yml`, reduces workstation loading to `desk-roles.yml` + `drv-non-free`. - Updates integration/unit tests for the new invokable and include behavior. - Integration test now accepts static `include_tasks` references. - Fixes recursion risk between `sys-aur` and `sys-aur-install` by setting `run_once_sys_aur` at the beginning of `sys-aur/tasks/01_core.yml`. BREAKING CHANGE: - `util-*` categories and bundle paths are no longer part of stage loading. - Multiple `util-desk-*`, `util-dev-*`, and `util-srv-*` roles were removed. - Deployment groups must be migrated to the new bundle/role naming. |