MIP sync: lockfile owns the source repo; share pydevices descriptions - #37
Conversation
…file PROFILE_REPOSITORIES was a second source of truth frozen in the publishing-tools tag, so a lockfile retarget of audioinstruments and audioeffects to audiocomponents failed every publication (#35). The expected repository now comes from pydevices-lock.json in the MIP checkout, matching the record-and- resync loop. A profile the lockfile does not name is rejected, not created. Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
The pydevices MIP profile wrote placeholder descriptions ("PyDevices pydevices")
while the TestPyPI builder already had the real summaries (#36). Both now read
PYDEVICES_DESCRIPTIONS from one module so the index and TestPyPI cannot drift.
Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
ruff EXE001 flags a shebang on a non-executable test module. unittest discover does not need it. Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
|
Review, 2026-09-06. The #36 half and the tests are good; the The lockfile check cannot fail where it runs
lock[profile] = {
"repository": os.environ["SOURCE_REPOSITORY"],
"ref": os.environ["SOURCE_REF"],
}The sync loop then reads the lockfile back and passes each entry's own The fix, in the same PRMake the lockfile the single owner of profile → repository, enforced where the overwrite happens. In the "Record this release" step: if That is a reusable-workflow contract change, so it rides the same The failing check is not this PR's
|
The lockfile owns profile to repository. Record this release now fails if SOURCE_REPOSITORY differs from the locked repository, naming both and telling the maintainer to edit pydevices-lock.json on the PyDevices branch; otherwise it updates ref only. The script check remains defence in depth. Co-authored-by: Brad Barnett <bdbarnett@users.noreply.github.com>
|
Change addressed as requested: the record step now refuses a repository move and updates |
Description
Fixes #35 and #36 in
PyDevices/.githubonly.#35.
synchronize_mip_package.pyno longer keeps a secondPROFILE_REPOSITORIESmap. The expected GitHub repository for a MIP profile comes frompydevices-lock.json.The lockfile is the single owner of profile → repository, enforced where the overwrite used to happen.
reusable-synchronize-mip-package.yml's "Record this release in the lockfile" step now:lock[profile]["repository"]differs fromSOURCE_REPOSITORY, naming both values and telling the maintainer to editpydevices-lock.jsonon thePyDevicesbranch to move the profile (asf94ef5e9did for the audioif/audiocomponents split);refonly and leavesrepositoryuntouched.lockfile_repository()in the script stays as defence in depth. The script-level mismatch test is named and documented as testing the script in isolation; the workflow never presents that case to the script.A profile the lockfile does not name is still rejected, not auto-created.
This Record-step change is a reusable-workflow contract change. It rides the same
publishing-v9rollout already listed in follow-ups.#36.
pydevicesandpydevices-desktopMIP manifests used placeholder descriptions ("PyDevices pydevices"). Both the MIP renderer and the TestPyPI builder now readPYDEVICES_DESCRIPTIONSfromscripts/pydevices_package_metadata.py, so the index and TestPyPI cannot drift.Type of Change
Follow-ups (not in this PR)
These rollout steps from #35 are maintainer-owned and are not done here:
publishing-v9carrying this change (including the Record-step contract).PyDevices/mip'sprocess-mip-publication-request.ymlpin from a SHA /publishing-v6topublishing-v9.This PR does not create or move any
publishing-v*tag, does not edit any workflow publish or dispatch inputs, and does not editVERSIONfiles.Verification & Testing
pytest/ local test runner)cwd:
/workspace(this repository). Python 3.12.3.Record-step unit tests
The Record step's Python is an inline heredoc. Tests extract that heredoc from
reusable-synchronize-mip-package.ymland run it against a fixture lockfile, so they exercise the step in isolation rather than a copy of the logic.After
fdc843b:Exit code 0.
Exit code 0.
Earlier prove commands (still valid)
publishing-v8script vsPyDevices/audiocomponentsstill exits 1 withprofile 'audioinstruments' requires PyDevices/audioif, not PyDevices/audiocomponents. The same dispatch against this branch with a fixture lockfile namingaudiocomponentsexits 0.GitHub Checks on
fdc843b(run 34066689727)Passed:
unittest,ruff,actionlint,yaml-parse-reusables.Failed:
generator-idempotency. Pre-existing onmainsincee75671b(run 33878372841). Not a condition for this merge; filed separately onPyDevices/pydevices.Could not run
publishing-v9, move any publishing tag, or editVERSION.PyDevices/mipor re-run the two publications.generator-idempotencyfailure.