feat!: units consumed from their own files, ci-heavy mutation, check/eval/mirror workflows #85

Merged
cjournois merged 7 commits from feat/v6-units-consumed into main 2026-11-03 08:15:57 +00:00
Collaborator

Callers hand-write facts their units already state, six workflows do their own CI work, and once Forgejo expands the quality workflow into jobs it ignores max-parallel, so nine telos mutation shards ran at once and lost the shared dind (run 24283).

  • Mutation jobs run on ci-heavy, which the forge serves one job at a time (devops/dramble-manager#1207, merged).
  • A unit's language, profile, prefix, image name and helm owner come from its own files; <unit>/unit.json (schema in schemas/) holds the rest, including mutation shards and timeouts. Callers that still pass unit inputs keep the old rules, so nothing changes for them until they drop those inputs.
  • Secrets fall back to BOT_* with secrets: inherit; registry, release user and server URL come from vars and the server; references become owner/repo callers with no runs-on.
  • New check.yml (root JSON, git diff --check, actionlint on every PR), eval.yml (stack eval with a named secret) and mirror-images.yml replace the jobs four repos, recall and dramble-manager hand-rolled.

Verified: just lint test passes; tag 6.0.0-rc.1 (unit facts + ci-heavy) ran telos PR CI green on all 10 units, and its full Quality run 24319 runs one mutation job at a time.
Breaking: full_shards and the repo-wide timeout inputs are removed (shards and limits go in unit.json); the forge must serve ci-heavy.

Session: 3acdb5a2-9a36-4c5c-9d3c-2e7c6ac1b8e3

Callers hand-write facts their units already state, six workflows do their own CI work, and once Forgejo expands the quality workflow into jobs it ignores max-parallel, so nine telos mutation shards ran at once and lost the shared dind (run 24283). - Mutation jobs run on `ci-heavy`, which the forge serves one job at a time (devops/dramble-manager#1207, merged). - A unit's language, profile, prefix, image name and helm owner come from its own files; `<unit>/unit.json` (schema in `schemas/`) holds the rest, including mutation shards and timeouts. Callers that still pass unit inputs keep the old rules, so nothing changes for them until they drop those inputs. - Secrets fall back to `BOT_*` with `secrets: inherit`; registry, release user and server URL come from vars and the server; references become owner/repo callers with no runs-on. - New `check.yml` (root JSON, `git diff --check`, actionlint on every PR), `eval.yml` (stack eval with a named secret) and `mirror-images.yml` replace the jobs four repos, recall and dramble-manager hand-rolled. Verified: `just lint test` passes; tag 6.0.0-rc.1 (unit facts + ci-heavy) ran telos PR CI green on all 10 units, and its full Quality run 24319 runs one mutation job at a time. Breaking: `full_shards` and the repo-wide timeout inputs are removed (shards and limits go in unit.json); the forge must serve `ci-heavy`. Session: 3acdb5a2-9a36-4c5c-9d3c-2e7c6ac1b8e3
Once Forgejo expands this workflow into jobs it ignores max-parallel and workflow concurrency, so every unit and shard ran at once on the shared dind; the label is served one job at a time (devops/dramble-manager#1207).

BREAKING CHANGE: the forge must serve the ci-heavy label (or callers pass mutation_runner) before callers move to this release.

Session: 3acdb5a2-9a36-4c5c-9d3c-2e7c6ac1b8e3
scripts/unit-facts.sh derives language, profile, prefix, image name and helm owner from the unit directory, takes the rest from unit.json (validated against and defaulted by schemas/unit.schema.json), and keeps callers that still pass unit inputs on the old rules.

quality shards and timeouts come from each unit's facts; base images are recognised from facts, so a released unit with a weekly rebuild (telos-sandbox) is no longer dropped from release and quality.

Session: 3acdb5a2-9a36-4c5c-9d3c-2e7c6ac1b8e3
Secrets fall back to BOT_REGISTRY_TOKEN / BOT_RELEASE_TOKEN, release_username to vars.BOT_RELEASE_USERNAME, forgejo_url to the server running the workflow, and rolling_prefix is set on scheduled runs; references become owner/repo callers with no runs-on that only name the unit.

Session: 3acdb5a2-9a36-4c5c-9d3c-2e7c6ac1b8e3
Path-filtered unit callers report nothing on a root-only PR, so four repos copied an inline root job and eight widened a unit's paths; check.yml parses root JSON, runs git diff --check and actionlint on the repo's workflows.

Session: 3acdb5a2-9a36-4c5c-9d3c-2e7c6ac1b8e3
feat: add eval and mirror-images workflows so repos stop hand-rolling those jobs
Some checks failed
eval.yml / feat: add eval and mirror-images workflows so repos stop hand-rolling those jobs (push) Failing after 0s
mirror-images.yml / feat: add eval and mirror-images workflows so repos stop hand-rolling those jobs (push) Failing after 0s
eval.yml / feat: add eval and mirror-images workflows so repos stop hand-rolling those jobs (pull_request) Failing after 0s
mirror-images.yml / feat: add eval and mirror-images workflows so repos stop hand-rolling those jobs (pull_request) Failing after 0s
ci: reusable-pipeline / CI Pipeline (pull_request) Successful in 5m42s
a84674fcc7
recall's eval job called internal actions directly and dramble-manager's pre-pull logged in inline; eval.yml runs a repo's eval recipe with a named secret, mirror-images.yml pulls the external images a push adds. The per-job docker login moves to docker-lib.sh, shared with docker-build-push.sh.

Session: 3acdb5a2-9a36-4c5c-9d3c-2e7c6ac1b8e3
fix: describe the eval and mirror secrets, rename eval's env input
Some checks failed
eval.yml / fix: describe the eval and mirror secrets, rename eval's env input (push) Failing after 0s
mirror-images.yml / fix: describe the eval and mirror secrets, rename eval's env input (push) Failing after 0s
eval.yml / fix: describe the eval and mirror secrets, rename eval's env input (pull_request) Failing after 0s
mirror-images.yml / fix: describe the eval and mirror secrets, rename eval's env input (pull_request) Failing after 0s
ci: reusable-pipeline / CI Pipeline (pull_request) Successful in 5m45s
acb4920ab9
Forgejo started a failed run of both workflow_call-only files on every push and PR; the four workflows that declare described secrets never did. env also shadowed the env context name.

Session: 3acdb5a2-9a36-4c5c-9d3c-2e7c6ac1b8e3
fix: drop the secrets block from eval and mirror-images
Some checks failed
ci: reusable-pipeline / CI Pipeline (pull_request) Successful in 5m54s
ci: reusable-pipeline / CI Pipeline (push) Has been cancelled
4d1951157d
Forgejo 17 rejects it ("workflow_call only supports keys inputs and outputs") and starts a failed run of the file on every push; the secrets arrive through secrets: inherit.

Session: 3acdb5a2-9a36-4c5c-9d3c-2e7c6ac1b8e3
bot-claude left a comment

Verdict: needs-changes

just lint test is green (548 bats), but head CI ran main's unit.yml (ci-reusable-pipeline.yml calls @main), and 6.0.0-rc.1 holds only the ci-heavy and unit-facts commits. So secrets: inherit, the vars fallbacks, check, eval and mirror-images have not run on the forge yet. Merging alone breaks no pinned consumer: they all pin tags.

Required changes:

  • .github/workflows/unit.yml:153 — Resolve profile runs before the skip step, and unit.yml:727 now makes image wait on ci. A Containerfile-only dir resolves to lang=unknown, profile=image, resolve-profile.sh rejects it, and the image is never built. This hits all devops/image base images and warden-sandbox (reproduced with ci-squid.yml's inputs). Skip the check for base images and add a test.
  • scripts/unit-facts.sh:63 — package_owner forces lang=helm over a caller's language: bun. recall-helm and resume-helm need bun there so registry auth is written for e2e.
  • scripts/unit-facts.sh:75 — facts mode ignores the caller's min_coverage, skip_test and build_context. Callers that set min_coverage: 0 get 95 and fail without a test-coverage recipe. This repo's own self-CI (ci-reusable-pipeline.yml:16) is one of them, so main goes red on merge.
  • scripts/unit-facts.sh:27 — only a public package.json or a .NET project counts as a package. A pyproject.toml or Cargo.toml unit drops to check and stops publishing, which contradicts README.md:9.
  • scripts/repo-check.sh:9 — actionlint uses the caller's config. No consumer has .github/actionlint.yaml, so ci-runner is an unknown label and check.yml fails everywhere. Ship a default config or document the step.
  • Migration guide missing for a feat!: which unit inputs to drop and what each becomes; image names now default to <owner>/<prefix> (image_name keeps the old name); the tag trigger becomes <unit>-[0-9]*; full_shards and the timeouts move to unit.json mutation; secrets: inherit plus the REGISTRY, BOT_REGISTRY_USERNAME and BOT_RELEASE_USERNAME vars; {"base_image": true}; language for helm units with a bun e2e; the actionlint config.
  • Stale docs: docs/components/unit.md:122-131 (the base-image text is wrong now), docs/monorepo.md:20-26 (placeholders that no longer exist), the unit.md inputs table (mark the five legacy inputs), forgejo_url's default (now ""), and the README template list.
  • PR text: say which paths are untested on Forgejo. Better: cut 6.0.0-rc.2 and run a service, recall's helm unit, a devops/image base image and check.yml on it before 6.0.0.

Nits:

  • scripts/unit-facts.sh:16 — a chart/ subdir makes a bun service resolve to helm.
  • unit.json validation: {"mutation":"x"} gives a raw jq error, and job_timeout_minutes below timeout_minutes is accepted.
  • .github/workflows/eval.yml:68 — the secret gating and extra_env parsing are inline shell with no bats test.
  • scripts/repo-check.sh:9 — actionlint@1.7 floats and Renovate can't see it.
  • quality.yml — the dropped concurrency: group is missing from the breaking list.
  • scripts/mirror-images.sh — git rev-parse HEAD~1 fails on a first commit.
  • docs/components/unit.md:55 — "legacy inputs go in the next major" has no tracked TODO.

Session: 52c8894b-ec6d-4887-b203-be67165a95bc

Verdict: needs-changes `just lint test` is green (548 bats), but head CI ran main's `unit.yml` (`ci-reusable-pipeline.yml` calls `@main`), and 6.0.0-rc.1 holds only the ci-heavy and unit-facts commits. So `secrets: inherit`, the vars fallbacks, check, eval and mirror-images have not run on the forge yet. Merging alone breaks no pinned consumer: they all pin tags. Required changes: - .github/workflows/unit.yml:153 — Resolve profile runs before the skip step, and `unit.yml:727` now makes `image` wait on `ci`. A Containerfile-only dir resolves to `lang=unknown, profile=image`, `resolve-profile.sh` rejects it, and the image is never built. This hits all devops/image base images and warden-sandbox (reproduced with ci-squid.yml's inputs). Skip the check for base images and add a test. - scripts/unit-facts.sh:63 — `package_owner` forces `lang=helm` over a caller's `language: bun`. recall-helm and resume-helm need bun there so registry auth is written for e2e. - scripts/unit-facts.sh:75 — facts mode ignores the caller's `min_coverage`, `skip_test` and `build_context`. Callers that set `min_coverage: 0` get 95 and fail without a `test-coverage` recipe. This repo's own self-CI (`ci-reusable-pipeline.yml:16`) is one of them, so main goes red on merge. - scripts/unit-facts.sh:27 — only a public package.json or a .NET project counts as a package. A `pyproject.toml` or `Cargo.toml` unit drops to `check` and stops publishing, which contradicts README.md:9. - scripts/repo-check.sh:9 — actionlint uses the caller's config. No consumer has `.github/actionlint.yaml`, so `ci-runner` is an unknown label and check.yml fails everywhere. Ship a default config or document the step. - Migration guide missing for a feat!: which unit inputs to drop and what each becomes; image names now default to `<owner>/<prefix>` (`image_name` keeps the old name); the tag trigger becomes `<unit>-[0-9]*`; `full_shards` and the timeouts move to unit.json `mutation`; `secrets: inherit` plus the `REGISTRY`, `BOT_REGISTRY_USERNAME` and `BOT_RELEASE_USERNAME` vars; `{"base_image": true}`; `language` for helm units with a bun e2e; the actionlint config. - Stale docs: docs/components/unit.md:122-131 (the base-image text is wrong now), docs/monorepo.md:20-26 (placeholders that no longer exist), the unit.md inputs table (mark the five legacy inputs), `forgejo_url`'s default (now `""`), and the README template list. - PR text: say which paths are untested on Forgejo. Better: cut 6.0.0-rc.2 and run a service, recall's helm unit, a devops/image base image and check.yml on it before 6.0.0. Nits: - scripts/unit-facts.sh:16 — a `chart/` subdir makes a bun service resolve to helm. - unit.json validation: `{"mutation":"x"}` gives a raw jq error, and `job_timeout_minutes` below `timeout_minutes` is accepted. - .github/workflows/eval.yml:68 — the secret gating and `extra_env` parsing are inline shell with no bats test. - scripts/repo-check.sh:9 — `actionlint@1.7` floats and Renovate can't see it. - quality.yml — the dropped `concurrency:` group is missing from the breaking list. - scripts/mirror-images.sh — `git rev-parse HEAD~1` fails on a first commit. - docs/components/unit.md:55 — "legacy inputs go in the next major" has no tracked TODO. Session: 52c8894b-ec6d-4887-b203-be67165a95bc
bot-claude 2026-11-03 04:16:41 +00:00
Author
Collaborator

Needs a decision and operator steps before this goes further. The review above lists the code fixes.

Why I stopped here:

  • Operator steps: confirm the ci-heavy runner pool is still deployed (dramble-manager k8s/base/forge/forgejo-runner/heavy/pool.env). Confirm the org vars REGISTRY, BOT_REGISTRY_USERNAME and BOT_RELEASE_USERNAME and the secrets BOT_REGISTRY_TOKEN and BOT_RELEASE_TOKEN exist. release.md used vars.BOT_USERNAME before.
  • Rollout plan: every consumer needs a coordinated v6 bump (unit.json files, base_image markers, image_name overrides, an actionlint config before check.yml). The Renovate major PRs will need hand review. telos#180 already runs on 6.0.0-rc.1.
  • Validation: head CI ran main's unit.yml, so the new workflows have not run on the forge. I suggest cutting 6.0.0-rc.2 after the fixes and running a service, recall's helm unit, a devops/image base image and check.yml on it.

If you want me to make the code fixes, reassign the PR to bot-claude and the next run will do them.

Session: 52c8894b-ec6d-4887-b203-be67165a95bc

Needs a decision and operator steps before this goes further. The review above lists the code fixes. Why I stopped here: - Operator steps: confirm the `ci-heavy` runner pool is still deployed (dramble-manager `k8s/base/forge/forgejo-runner/heavy/pool.env`). Confirm the org vars `REGISTRY`, `BOT_REGISTRY_USERNAME` and `BOT_RELEASE_USERNAME` and the secrets `BOT_REGISTRY_TOKEN` and `BOT_RELEASE_TOKEN` exist. release.md used `vars.BOT_USERNAME` before. - Rollout plan: every consumer needs a coordinated v6 bump (unit.json files, `base_image` markers, `image_name` overrides, an actionlint config before check.yml). The Renovate major PRs will need hand review. telos#180 already runs on 6.0.0-rc.1. - Validation: head CI ran main's `unit.yml`, so the new workflows have not run on the forge. I suggest cutting 6.0.0-rc.2 after the fixes and running a service, recall's helm unit, a devops/image base image and check.yml on it. If you want me to make the code fixes, reassign the PR to bot-claude and the next run will do them. Session: 52c8894b-ec6d-4887-b203-be67165a95bc
cjournois deleted branch feat/v6-units-consumed 2026-11-03 08:15:57 +00:00
Sign in to join this conversation.
No reviewers
No labels
needs-human
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cjournois/reusable-pipeline!85
No description provided.