Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
uvx --python 3.15 \
--from 'research-repo-tools==0.2.9' \
--from 'research-repo-tools==0.3.0' \
python -I - <<'PY'
import os
import sys
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
git --no-pager merge-base --is-ancestor "$commit" origin/main
mkdir "$RUNNER_TEMP/handoff"
runtime=(uv run --no-config --no-project --isolated --no-cache --python 3.15
--with 'research-repo-tools==0.2.9'
--with 'research-repo-tools==0.3.0'
python -I -m research_repo_tools)
"${runtime[@]}" --root "$GITHUB_WORKSPACE" release assets plan \
tooling/release-evidence.toml --repository "$GITHUB_REPOSITORY" \
Expand All @@ -79,7 +79,7 @@ jobs:
- name: Install trusted package runner
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: "0.13.7"
version: "0.13.9"
enable-cache: false
cache-python: false
- name: Authenticate handoff and prepare the unpublished draft
Expand All @@ -94,7 +94,7 @@ jobs:
# Run Python from the runner's script file, avoiding actionlint #651's stdin deadlock.
shell: >-
uv run --no-config --no-project --isolated --no-cache --python 3.15
--with "research-repo-tools==0.2.9"
--with "research-repo-tools==0.3.0"
python -I "{0}"
run: |
import os
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,4 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ inputs.tag }}
run: just release-verify "$RELEASE_TAG"
run: just release-verify "$RELEASE_TAG" "$RUNNER_TEMP/accepted-candidate/target.json"
15 changes: 8 additions & 7 deletions .github/workflows/release-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Install trusted package runner
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: "0.13.7"
version: "0.13.9"
enable-cache: false
cache-python: false

Expand All @@ -49,7 +49,7 @@ jobs:
run: |
set -euo pipefail
uvx --python 3.15 \
--from 'research-repo-tools==0.2.9' \
--from 'research-repo-tools==0.3.0' \
python -I - <<'PY'
import hashlib, json, os
from pathlib import Path
Expand Down Expand Up @@ -132,14 +132,15 @@ jobs:
path: ${{ runner.temp }}/incoming-candidate
merge-multiple: true

- name: Prepare native dependency provenance
run: just release-dependency-builds

- name: Verify original acquisition and full frozen acceptance
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ inputs.tag }}
CANDIDATE_TRANSFER: ${{ inputs.candidate }}
run: |
just release-dependency-builds
just release-receive "$RUNNER_TEMP/accepted-candidate" --incoming "$RUNNER_TEMP/incoming-candidate"
run: just release-receive "$RUNNER_TEMP/accepted-candidate" --incoming "$RUNNER_TEMP/incoming-candidate"

- name: Upload verified inert archive
id: upload
Expand All @@ -162,7 +163,7 @@ jobs:
- name: Install trusted package runner
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
version: "0.13.7"
version: "0.13.9"
enable-cache: false
cache-python: false

Expand Down Expand Up @@ -196,7 +197,7 @@ jobs:
run: |
set -euo pipefail
uvx --python 3.15 \
--from 'research-repo-tools==0.2.9' \
--from 'research-repo-tools==0.3.0' \
python -I - <<'PY'
import hashlib, json, os
from pathlib import Path
Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dependency-sources.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ release-owned = [ ".", "benches/comparison" ]
[sources.tooling]
project = "python"
package = "research-repo-tools"
version = "0.2.9"
version = "0.3.0"

# Native payload pins follow research-repo-tools v0.2.7's actionlint policy.
[source-builds]
Expand Down
41 changes: 19 additions & 22 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ constraints used by the installed verifier. See GitHub's
## Release command alignment

The common Step 1/Step 2 flow follows the
[research-repo-tools v0.2.9 guide](https://github.com/acgetchell/research-repo-tools/blob/v0.2.9/docs/RELEASING.md).
[research-repo-tools v0.3.0 guide](https://github.com/acgetchell/research-repo-tools/blob/v0.3.0/docs/RELEASING.md).
Draft preparation and authenticated receipt retrieval use the installed shared
API. Release boundaries require published tooling and successful native evidence.

Expand All @@ -130,7 +130,7 @@ API. Release boundaries require published tooling and successful native evidence
| `release-benchmarks TAG [OWNER] [SELECTION]` | Dispatch retained archive attachment from the original owner record and selected acceptance; explicit `CANDIDATE_TRANSFER_FILE` remains a recovery override |
| `release-publish TAG [OWNER] [SELECTION]` | Revalidate acceptance, notes and canonical assets, then explicitly approve GitHub publication |
| `release-upload TAG [OWNER] [SELECTION]` | Dispatch Cargo publication using the existing reviewed acceptance and original publication transfer |
| `release-verify TAG` | Verify stable GitHub assets and the exact crates.io version |
| `release-verify TAG [TARGET]` | Verify stable GitHub assets and the exact crates.io version, with an optional captured `target.json` |

This repository verifies evidence **before** creating or pushing the tag. The
reference's Python distribution inspection requires a pushed tag; that ordering
Expand Down Expand Up @@ -626,8 +626,9 @@ acquisition, final binding and full frozen native acceptance. The no-checkout
attachment job receives an immutable artifact by exact ID, digest and current
attempt, rechecks the draft and original assertions, then attaches
`la-stack-$TAG-criterion-baseline.tar.gz`. The verification job prepares native
Python dependency provenance; no job measures benchmarks or rebuilds the Rust
package.
Python dependency provenance. Use the verification job's step timings to record
scoped Cargo/Python setup, native dependency preparation, acceptance verification
and the time remaining against the 60-minute job limit.

The archive retains original evidence, current Criterion files and a separate
final-release binding. Local ownership, measured revisions, hosts, sessions and
Expand All @@ -646,10 +647,10 @@ From the clean tagged checkout and your human GitHub CLI session:
just release-run release-publish "$TAG" "" "$RELEASE_SELECTION"
```

This verifies acceptance and remote notes, freezes the canonical attached archive
ID/hash in `publication-transfer.json`, then publishes the reviewed draft
through the shared gate. It authorizes GitHub Release publication. The release
must become immutable before Cargo publication.
This verifies the selected acceptance, freezes the canonical attached archive
ID/hash in `publication-transfer.json`, then passes the captured draft target to
the shared publication gate. It authorizes GitHub Release publication. The
release must become immutable before Cargo publication.

Dispatch Cargo publication from that independently retained selection:

Expand Down Expand Up @@ -688,12 +689,13 @@ After the publishing workflow completes:
just release-verify "$TAG"
```

This reads GitHub and crates.io directly and checks the immutable stable
RRT's `release visibility` reads GitHub and crates.io and checks the immutable stable
release, completed nonempty baseline asset, and exact non-yanked crates.io
version with a checksum. It polls only when the exact registry version is
proven absent. Dependency provenance and generated notes are checked by the
publication gates. The visibility recipe works without a synced development
environment.
publication gates. The hosted publishing job passes the captured `target.json`
to also verify the release ID, title, and exact tag commit. The visibility
recipe works without a synced development environment.

Check a clean consumer with a fresh Cargo home before dependent Delaunay releases:

Expand Down Expand Up @@ -780,16 +782,11 @@ benchmark measurements. Preserve the external owner record, preparation,
checkpoint, archive, transfer files, and workflow receipts. Do not run
`just clean` or restart acquisition to troubleshoot those later phases.

The pinned tooling can still spend substantial time installing tools and
rechecking dependency and candidate evidence. Targeted follow-ups are tracked in
research-repo-tools [#225](https://github.com/acgetchell/research-repo-tools/issues/225),
[#232](https://github.com/acgetchell/research-repo-tools/issues/232),
[#233](https://github.com/acgetchell/research-repo-tools/issues/233),
[#234](https://github.com/acgetchell/research-repo-tools/issues/234), and
[#235](https://github.com/acgetchell/research-repo-tools/issues/235).
These are not capabilities supplied by the current pin. Inspect the failed stage
and its retained records before choosing the specific recovery below. An
unconfirmed write outcome requires provider inspection before retrying.
The release jobs install scoped Cargo and locked Python dependencies. The
benchmark attachment workflow reports separate timings for native provenance
preparation and acceptance verification. Inspect the failed stage and its
retained records before choosing the specific recovery below. An unconfirmed
write outcome requires provider inspection before retrying.

If HEAD changes, return to Step 2's synchronization and exact-commit verification.
If a native run/attempt changes, explicitly review a new named selection as
Expand All @@ -808,7 +805,7 @@ permission to create a replacement.
Recover the exact original artifacts by independently recorded immutable IDs,
verify their ZIP digests and producer run/attempts, and retain the original policy,
selection, notes and receipt. Follow the supplying package's
[recovery](https://github.com/acgetchell/research-repo-tools/blob/v0.2.9/docs/PREPARING_DRAFTS.md#retry-and-recovery).
[recovery](https://github.com/acgetchell/research-repo-tools/blob/v0.3.0/docs/PREPARING_DRAFTS.md#retry-and-recovery).
After independent provider/audit review, its `release assets prepare` CLI accepts
`--recover-release-id REVIEWED_ID` with the original pending receipt and frozen
inputs; recovery performs no POST. A captured ID cannot be replaced. This is an
Expand Down
44 changes: 6 additions & 38 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ _ensure-yamllint: _ensure-uv
# Isolate the supplier runtime from the observed candidate checkout.
[positional-arguments]
[private]
[script("uvx", "--no-config", "--isolated", "--managed-python", "--python", "3.15", "--from", "research-repo-tools==0.2.9", "python", "-I")]
[script("uvx", "--no-config", "--isolated", "--managed-python", "--python", "3.15", "--from", "research-repo-tools==0.3.0", "python", "-I")]
_release-candidate *args:
import runpy
from pathlib import Path
Expand Down Expand Up @@ -506,7 +506,7 @@ release-archive owner="" selection="reviewed": (_release-candidate "archive" own

# Use explicit shared asset/recovery operations with an isolated trusted runtime.
[positional-arguments]
[script("uvx", "--no-config", "--isolated", "--managed-python", "--python", "3.15", "--from", "research-repo-tools==0.2.9", "python", "-I")]
[script("uvx", "--no-config", "--isolated", "--managed-python", "--python", "3.15", "--from", "research-repo-tools==0.3.0", "python", "-I")]
release-assets +args:
import sys
from research_repo_tools.cli import main
Expand Down Expand Up @@ -543,8 +543,7 @@ release-notes tag: python-sync
release-publication owner="" selection="reviewed": (_release-candidate "seal" owner "--selection" selection)

# Approve the benchmark-equipped draft as the authenticated maintainer.
release-publish tag owner="" selection="reviewed": (_release-candidate "reviewed" owner "--selection" selection) (release-publication owner selection)
uv run --locked --no-sync research-repo-tools release publish {{ quote(tag) }} --approve
release-publish tag owner="" selection="reviewed": (_release-candidate "publish" tag owner "--selection" selection)

# Verify the maintainer's dispatch input; never acquire timings or build packages.
[positional-arguments]
Expand All @@ -553,7 +552,7 @@ release-receive destination *args:

# Run a recipe with the exact uv declared in this checkout, independent of system updates.
[positional-arguments]
[script("uvx", "--no-config", "--isolated", "--managed-python", "--python", "3.15", "--from", "research-repo-tools==0.2.9", "python", "-I")]
[script("uvx", "--no-config", "--isolated", "--managed-python", "--python", "3.15", "--from", "research-repo-tools==0.3.0", "python", "-I")]
release-run +args:
import sys
from research_repo_tools.config import load
Expand All @@ -574,39 +573,8 @@ release-stage owner="" target="" selection="reviewed": (_release-candidate "stag
release-upload tag owner="" selection="reviewed": (_release-candidate "upload" tag owner "--selection" selection)

# Check remote visibility of the immutable release, required assets, and exact crates.io version.
[positional-arguments]
[script("uvx", "--no-config", "--isolated", "--managed-python", "--python", "3.15", "--from", "research-repo-tools==0.2.9", "python", "-I")]
release-verify tag:
import sys
from pathlib import Path
from subprocess import SubprocessError
from research_repo_tools.config import load
from research_repo_tools.process import ExecutableNotFoundError, format_exception_diagnostics
from research_repo_tools.registry import identity, wait_for_version
from research_repo_tools.release_assets import lookup_release

root = Path.cwd()
policy = load(root=root).publishing
if policy is None:
sys.exit("Release visibility requires a publishing policy.")
tag = sys.argv[1]
version = tag.removeprefix("v")
try:
if tag == version:
raise ValueError("Release visibility requires a stable vX.Y.Z tag.")
identity(policy.registry, policy.package, version)
release = lookup_release(root, policy.repository, tag)
if release.draft or release.prerelease or not release.immutable or release.title != tag:
raise ValueError("Expected the matching immutable, published stable GitHub release.")
required = {pattern.replace("{version}", version) for pattern in policy.required_assets}
uploaded = {name for name, identifier, size, _ in release.assets if size > 0 and (identifier, "uploaded") in release.asset_states}
if missing := required - uploaded:
raise ValueError(f"Missing completed release assets: {', '.join(sorted(missing))}")
if not wait_for_version(policy.registry, policy.package, version, attempts=7).present:
raise ValueError(f"{policy.package} {version} is not visible on {policy.registry}. Inspect the upload run.")
except (ValueError, OSError, SubprocessError, ExecutableNotFoundError) as error:
sys.exit(format_exception_diagnostics(error))
print(f"Verified immutable GitHub release {tag} and {policy.registry} version {version}.")
release-verify tag target="":
uvx --no-config --isolated --managed-python --python 3.15 --from research-repo-tools==0.3.0 research-repo-tools release visibility --registry crates-io --package la-stack --repository acgetchell/la-stack --required-asset {{ quote("la-stack-" + tag + "-criterion-baseline.tar.gz") }} --attempts 7{{ if target == "" { "" } else { " --target " + quote(target) } }} -- {{ quote(tag) }}

# Require final changelog, citation date and package metadata agreement.
release-version-check: python-sync
Expand Down
11 changes: 8 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,14 @@ disable = [
[tool.rumdl.MD013]
line-length = 160

[tool.rumdl.per-file-ignores]
# Preserve the generated and archived changelogs' list spacing.
"CHANGELOG.md" = [ "MD076" ]
"docs/archives/changelog/*.md" = [ "MD076" ]

[tool.uv]
package = false
required-version = "==0.13.8"
required-version = "==0.13.9"
# Semgrep stopped shipping Intel macOS wheels after 1.182.1.
constraint-dependencies = [
"semgrep==1.182.1; sys_platform == 'darwin' and platform_machine == 'x86_64'",
Expand Down Expand Up @@ -119,7 +124,7 @@ build = [
"setuptools==84.2.1",
"wheel==0.48.0",
]
tooling = [ "research-repo-tools[python-tools,semgrep]==0.2.9" ]
tooling = [ "research-repo-tools[python-tools,semgrep]==0.3.0" ]
dev = [
{ include-group = "tooling" },
"actionlint-py==1.7.12.25",
Expand Down Expand Up @@ -147,7 +152,7 @@ cargo-nextest = "0.9.152"
clippy-sarif = "0.8.0"
dprint = "0.65.0"
git-cliff = "2.14.2"
rumdl = "0.3.4"
rumdl = "0.3.5"
sarif-fmt = "0.8.0"
taplo-cli = "0.10.0"
typos-cli = "1.52.2"
Expand Down
Loading
Loading