Implements the shared component release transaction required by marqdo#96 M1: one implementation for stdlib and extension repositories, no parallel
release protocol, no second manifest and no new release service.
package: deterministic archive of only the reviewed release paths of
the exact tagged commit (git archive <sha> -- <allow> + gzip -n), built
twice and byte-compared; refuses unsafe/empty paths and archive members
outside the released paths.
evidence: the existing ecosystem release-evidence.json schema
(verified by scripts/reconcile-releases.py), with the same-SHA Woodpecker ci pipeline discovered through the public read-only API; publishing is
refused when no successful same-SHA CI exists.
publish: Gitea draft transaction — payload assets first, release-evidence.json last, byte-for-byte readback of every asset, then
make public. Published bytes are never overwritten; identical re-runs are
idempotent; different bytes for the same tag fail closed.
scripts/component-release/README.md + templates/publish.yml — how a
component repository pins the kit (root commit + sha256) in a protected tag-only Woodpecker workflow; push/PR lanes only run the deterministic
package self-check and never hold the publish token.
tests/integration/test_component_release.py — 14 contract tests for
determinism, path safety, version/dependency identity, evidence shape, CI
discovery and publish ordering.
Rollout
The kit is consumed by the stdlib repositories through a pinned raw file at a
reviewed root commit; the first independent releases produced with the same
logic were published in the respective component repositories and verified by
the root reconcile path (progress recorded on #96). This PR itself publishes
nothing and changes no existing release bytes.
Tests
python3 -m unittest discover -s tests/integration — 142 tests OK
Implements the shared component release transaction required by
[marqdo#96](https://git.cflmy.cn/cflmy/marqdo/issues/96) M1:
**one implementation** for stdlib and extension repositories, no parallel
release protocol, no second manifest and no new release service.
## What this adds
- `scripts/component-release/release.py` — self-contained release transaction:
- **package**: deterministic archive of *only* the reviewed release paths of
the exact tagged commit (`git archive <sha> -- <allow>` + `gzip -n`), built
twice and byte-compared; refuses unsafe/empty paths and archive members
outside the released paths.
- **evidence**: the existing ecosystem `release-evidence.json` schema
(verified by `scripts/reconcile-releases.py`), with the same-SHA Woodpecker
`ci` pipeline discovered through the public read-only API; publishing is
refused when no successful same-SHA CI exists.
- **publish**: Gitea draft transaction — payload assets first,
`release-evidence.json` last, byte-for-byte readback of every asset, then
make public. Published bytes are never overwritten; identical re-runs are
idempotent; different bytes for the same tag fail closed.
- `scripts/component-release/README.md` + `templates/publish.yml` — how a
component repository pins the kit (root commit + sha256) in a protected
`tag`-only Woodpecker workflow; push/PR lanes only run the deterministic
package self-check and never hold the publish token.
- `tests/integration/test_component_release.py` — 14 contract tests for
determinism, path safety, version/dependency identity, evidence shape, CI
discovery and publish ordering.
## Rollout
The kit is consumed by the stdlib repositories through a pinned raw file at a
reviewed root commit; the first independent releases produced with the same
logic were published in the respective component repositories and verified by
the root reconcile path (progress recorded on #96). This PR itself publishes
nothing and changes no existing release bytes.
## Tests
- `python3 -m unittest discover -s tests/integration` — 142 tests OK
- `python3 scripts/check-layout.py` — OK
- `python3 scripts/check-repo-conventions.py` — PASS (38 components)
Add one shared, self-contained component release implementation for stdlib and
extension repositories (marqdo#96 M1): deterministic allowlisted packaging of
the exact tagged commit, release-evidence.json with same-SHA Woodpecker CI
discovery, and an immutable Gitea draft->publish transaction with byte readback.
The kit is pinned by root commit + sha256 in each component repository's
protected tag workflow; ordinary push/PR lanes only run the deterministic
package self-check and never receive the publish token. No stdlib/ext specific
manifest or second release service is introduced.
Adds contract tests for packaging determinism, archive path safety, evidence
shape, dependency identity, CI discovery and publish ordering.
- Build the archive from exact Git objects (git ls-tree / git cat-file) with
fixed tar and gzip metadata instead of git archive + gzip, so export-ignore,
export-subst and local attribute files cannot silently drop or rewrite
released bytes; verify every member and byte against the commit blobs.
- Select the same-SHA CI pipeline deterministically (lowest successful number)
so re-running the transaction reproduces already published evidence.
- Preflight the remote tag identity, require channel consistency on idempotent
re-runs, add --reset-draft recovery for interrupted drafts, and stop
forwarding the publish token across redirects.
- Reject case/NFC collisions, backslash/control-character members, wildcard
allow entries, unknown/duplicate dependency fields; honor --source-sha and
--out-dir in check; clean temporary directories.
- Fix the documented/template dependency syntax and add regression tests for
determinism, export attributes, collisions, deterministic CI selection and
remote tag identity.
cflmy
merged commit c367d1df3e into main2026-12-02 23:12:57 +08:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements the shared component release transaction required by
marqdo#96 M1:
one implementation for stdlib and extension repositories, no parallel
release protocol, no second manifest and no new release service.
What this adds
scripts/component-release/release.py— self-contained release transaction:the exact tagged commit (
git archive <sha> -- <allow>+gzip -n), builttwice and byte-compared; refuses unsafe/empty paths and archive members
outside the released paths.
release-evidence.jsonschema(verified by
scripts/reconcile-releases.py), with the same-SHA Woodpeckercipipeline discovered through the public read-only API; publishing isrefused when no successful same-SHA CI exists.
release-evidence.jsonlast, byte-for-byte readback of every asset, thenmake public. Published bytes are never overwritten; identical re-runs are
idempotent; different bytes for the same tag fail closed.
scripts/component-release/README.md+templates/publish.yml— how acomponent repository pins the kit (root commit + sha256) in a protected
tag-only Woodpecker workflow; push/PR lanes only run the deterministicpackage self-check and never hold the publish token.
tests/integration/test_component_release.py— 14 contract tests fordeterminism, path safety, version/dependency identity, evidence shape, CI
discovery and publish ordering.
Rollout
The kit is consumed by the stdlib repositories through a pinned raw file at a
reviewed root commit; the first independent releases produced with the same
logic were published in the respective component repositories and verified by
the root reconcile path (progress recorded on #96). This PR itself publishes
nothing and changes no existing release bytes.
Tests
python3 -m unittest discover -s tests/integration— 142 tests OKpython3 scripts/check-layout.py— OKpython3 scripts/check-repo-conventions.py— PASS (38 components)