Skip to content

MIP-0076: wiring, the org's cross-repo wiring as generated tables - #33

Open
brunogbv wants to merge 3 commits into
mainfrom
mip-0076/1-wiring-extract
Open

brunogbv wants to merge 3 commits into
mainfrom
mip-0076/1-wiring-extract

Conversation

@brunogbv

@brunogbv brunogbv commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Size: 525 changed lines (wiring.py 512, ~110 of them self-test fixtures). Not split: rendering is ~35 lines, and the row's own last test is the generated block.

Real run over a fresh --recurse-submodules umbrella clone with --devkit pointing at a devkit clone that has tags: every fact of today's hand-written REPOS.md block is produced, every reusable-workflow call resolves at its caller's own ref, and two runs are byte-identical. The block is in the task report; row 5 lands it.

For rows 5, 11 and 15: nix's .devkit is a store path, not a git checkout, so those rows pass --devkit <clone with tags> (otherwise each call warns and renders as "resolved at ").

brunogbv and others added 3 commits October 5, 2026 09:03
scripts/wiring.py, MIP-0076 §5.1 without the gate: it reads .gitmodules, the devkit's tree under
.devkit (else its own), every repo's workflows, pin files, and the scripts, justfiles,
Dockerfiles, docker-compose*.yml and build.sbt naming a pin or image. It renders four tables
(artifact, dispatch, pin bump, deploy) between a file's wiring:start/wiring:end markers.

Beyond §5.1's sources, per the tasks file's decisions: branch artifacts (api-docs, site-data)
from the `<branch>-push.sh` idiom, read by any file fetching the branch (Decision 1); compose
`image:` lines as image readers (Decision 2); a workflow step opening a PR in or pushing to
another marola-dev repo (Decision 3). A devkit reusable workflow's effects are attributed to
each caller with the call's ref, and its inputs resolved from the caller's `with:`.

Closes #25

Tested: wiring --self-test (13 cases, red against a stubbed scan, green after); a run over a fresh --recurse-submodules umbrella clone at 0145e12
Cost: ~$19.79 · diff-size estimate (cost-split --estimate-commit)
Co-Authored-By: Claude <noreply@anthropic.com>
PyYAML joins the flake's python, which every tool wrapper and the self-tests check run with.

Refs #25

Tested: just quality line by line without nix (ruff check/format, shellcheck, actionlint, tests/self-tests.sh, agents-check, docs_lint); nix flake check not run, no nix here
Cost: ~$2.40 · diff-size estimate (cost-split --estimate-commit)
Co-Authored-By: Claude <noreply@anthropic.com>
… missing submodules

Review round 1 on #25. A call is now resolved with `git show <ref>:.github/workflows/<X>` in the
devkit checkout (`--devkit DIR`, default `.devkit`, else this repo), so a caller still on an old
tag shows that tag's dispatch type. An unknown ref falls back to the tree with a warning and
"(resolved at <version>)" in the row; a callee missing at its ref is a warning, not a silent drop.
An uninitialised submodule is an error instead of a near-empty block. The umbrella is named by
`--name` (default `marola`), not the enclosing git config.

Smaller: `event_type=` is matched after substitution; `-push.sh` on a `--self-test` line is
ignored; a branch reader needs a `git … fetch` line; the self-exclusion is only the devkit's
`scripts/wiring.py`; more than three push paths render as "touching N paths"; `git add` flags
are not PR files; malformed YAML names its file; the README lists `wiring`.

Closes #25

Tested: wiring --self-test (16 cases; the new ref and submodule cases fail with their fix stubbed out); ruff check/format, actionlint, shellcheck, tests/self-tests.sh, agents-check, docs_lint; a run over the fresh umbrella clone with --devkit at a tagged devkit checkout
Cost: ~$8.59 · diff-size estimate (cost-split --estimate-commit)
Co-Authored-By: Claude <noreply@anthropic.com>
h0ffmann pushed a commit that referenced this pull request Oct 8, 2026
One command, run twice around a human merge. On a main whose versions are not X.Y.Z it writes
the version into plugin.json, flake.nix and every documented pin, adds a CHANGELOG heading with
the commits since the last tag, and pushes chore/release-vX.Y.Z for a PR. On a main that already
says X.Y.Z everywhere it tags vX.Y.Z and pushes the tag; release.yml checks the versions against
the tag and publishes the GitHub release. `just quality` now fails when the versions disagree.

The consumer pin-bump PRs from #47 wait on the token decision there.

Part of #47.

Tested: release.py --self-test; --check on main (29 locations at 0.6.0) and against 0.5.1 (fails); --dry-run of both paths in a fresh clone; ruff, actionlint, tests/self-tests.sh, docs-lint, agents-check; trial merge with #32 and #33 passes the same gates
Cost: n/a (no measured figure in this cloud session)
Co-Authored-By: Claude <noreply@anthropic.com>
h0ffmann added a commit that referenced this pull request Oct 8, 2026
One command, run twice around a human merge. On a main whose versions are not X.Y.Z it writes
the version into plugin.json, flake.nix and every documented pin, adds a CHANGELOG heading with
the commits since the last tag, and pushes chore/release-vX.Y.Z for a PR. On a main that already
says X.Y.Z everywhere it tags vX.Y.Z and pushes the tag; release.yml checks the versions against
the tag and publishes the GitHub release. `just quality` now fails when the versions disagree.

The consumer pin-bump PRs from #47 wait on the token decision there.

Part of #47.

Tested: release.py --self-test; --check on main (29 locations at 0.6.0) and against 0.5.1 (fails); --dry-run of both paths in a fresh clone; ruff, actionlint, tests/self-tests.sh, docs-lint, agents-check; trial merge with #32 and #33 passes the same gates
Cost: n/a (no measured figure in this cloud session)

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant