Compare commits
8 Commits
v0.1.27-rc
...
main
| Author | SHA1 | Date |
|---|---|---|
|
|
3d78c0ca2a | |
|
|
002b945e9b | |
|
|
d2f6f01fcd | |
|
|
d672cfdf71 | |
|
|
cba3855ce3 | |
|
|
7dd69d6973 | |
|
|
e049842194 | |
|
|
fcc29aaefc |
|
|
@ -22,8 +22,9 @@ target/
|
|||
# Local implementation journal (intentionally not committed)
|
||||
/recap.md
|
||||
|
||||
# Generated locally by rust_autobadges/Cargo Tarpaulin
|
||||
# Generated locally or in CI by Cargo Tarpaulin and the badge scripts
|
||||
/tarpaulin-report.html
|
||||
/coverage/
|
||||
|
||||
# Legacy cargo-cyclonedx intermediates may remain in reused CI workspaces.
|
||||
**/sbom.cdx.json
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
[last_run_clean]
|
||||
run_status = "Success"
|
||||
lines_parsed = 440
|
||||
coverage = 92.72
|
||||
|
||||
[last_run_clean.run_duration]
|
||||
secs = 62
|
||||
nanos = 709259686
|
||||
|
||||
[last_run_incremental]
|
||||
run_status = "Success"
|
||||
lines_parsed = 420
|
||||
coverage = 92.84
|
||||
|
||||
[last_run_incremental.run_duration]
|
||||
secs = 45
|
||||
nanos = 633186947
|
||||
15
AGENTS.md
15
AGENTS.md
|
|
@ -237,9 +237,9 @@ cargo doc --no-deps
|
|||
```
|
||||
|
||||
Run `cargo tarpaulin --config tarpaulin.toml` when tests or executable Rust code
|
||||
change. It enforces the 90% line-coverage floor. Refresh
|
||||
the tracked local badges with `rust_autobadges --high-coverage-percent 0.7
|
||||
--mid-coverage-percent 0.3` after a clean test and coverage run.
|
||||
change. It enforces the 90% line-coverage floor. Jenkins renders the version,
|
||||
test, and coverage badges from package metadata and CI results; generated badge
|
||||
files and status snapshots do not belong in the repository.
|
||||
|
||||
Also run focused CLI golden tests and LSP protocol tests once those binaries
|
||||
exist. Favor property tests for replacement idempotence/non-overlap and fuzz
|
||||
|
|
@ -270,7 +270,8 @@ After every milestone's acceptance criteria and quality gates pass, create an
|
|||
annotated Git tag named `v0.1.N`, where `N` is the milestone number, on its
|
||||
completion commit. Before that completion commit, set the workspace package
|
||||
version and internal registry dependency requirements to `0.1.N`, refresh
|
||||
`Cargo.lock`, cut the matching changelog entry, and regenerate the version badge.
|
||||
Verify those artifacts and binary `--version` output agree before tagging. Never
|
||||
move an existing milestone tag; add a corrective commit and a documented
|
||||
successor tag if a published milestone needs amendment.
|
||||
`Cargo.lock` and cut the matching changelog entry. Jenkins derives the version
|
||||
badge from that metadata. Verify the manifests, lockfile, changelog, and binary
|
||||
`--version` output agree before tagging. Never move an existing milestone tag;
|
||||
add a corrective commit and a documented successor tag if a published milestone
|
||||
needs amendment.
|
||||
|
|
|
|||
26
CHANGELOG.md
26
CHANGELOG.md
|
|
@ -6,6 +6,27 @@ All notable changes to John Slop are recorded here. The format follows
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.1.27-rc.8] - 2026-09-30
|
||||
|
||||
### Fixed
|
||||
|
||||
- Selected current Cross target images so all Linux and Windows release
|
||||
artifacts compile with the declared Rust 1.98.1-or-newer toolchain.
|
||||
|
||||
## [0.1.27-rc.7] - 2026-09-30
|
||||
|
||||
### Fixed
|
||||
|
||||
- Used the publisher's repository fallback mapping so releases reach the HTTPS
|
||||
proxy while the developer SSH origin remains unchanged.
|
||||
|
||||
## [0.1.27-rc.6] - 2026-09-30
|
||||
|
||||
### Fixed
|
||||
|
||||
- Published cargo-binstall `.tgz` archives alongside raw binaries so the
|
||||
package metadata added in RC5 resolves to release assets.
|
||||
|
||||
## [0.1.27-rc.5] - 2026-09-30
|
||||
|
||||
### Added
|
||||
|
|
@ -190,7 +211,10 @@ All notable changes to John Slop are recorded here. The format follows
|
|||
- Stdio LSP replacement diagnostics and versioned quick fixes.
|
||||
- Runnable examples, reviewed fixtures, fuzz targets, benchmarks, and CI gates.
|
||||
|
||||
[Unreleased]: https://proxy.dandaedre.com/gitea/idle-org/john-slop/compare/v0.1.27-rc.5...HEAD
|
||||
[Unreleased]: https://proxy.dandaedre.com/gitea/idle-org/john-slop/compare/v0.1.27-rc.8...HEAD
|
||||
[0.1.27-rc.8]: https://proxy.dandaedre.com/gitea/idle-org/john-slop/compare/v0.1.27-rc.7...v0.1.27-rc.8
|
||||
[0.1.27-rc.7]: https://proxy.dandaedre.com/gitea/idle-org/john-slop/compare/v0.1.27-rc.6...v0.1.27-rc.7
|
||||
[0.1.27-rc.6]: https://proxy.dandaedre.com/gitea/idle-org/john-slop/compare/v0.1.27-rc.5...v0.1.27-rc.6
|
||||
[0.1.27-rc.5]: https://proxy.dandaedre.com/gitea/idle-org/john-slop/compare/v0.1.27-rc.4...v0.1.27-rc.5
|
||||
[0.1.27-rc.4]: https://proxy.dandaedre.com/gitea/idle-org/john-slop/compare/v0.1.27-rc.3...v0.1.27-rc.4
|
||||
[0.1.27-rc.3]: https://proxy.dandaedre.com/gitea/idle-org/john-slop/compare/v0.1.27-rc.2...v0.1.27-rc.3
|
||||
|
|
|
|||
|
|
@ -699,7 +699,7 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|||
|
||||
[[package]]
|
||||
name = "john-slop"
|
||||
version = "0.1.27-rc.5"
|
||||
version = "0.1.27-rc.8"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"criterion",
|
||||
|
|
@ -724,7 +724,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "john-slop-core"
|
||||
version = "0.1.27-rc.5"
|
||||
version = "0.1.27-rc.8"
|
||||
dependencies = [
|
||||
"directories",
|
||||
"figment",
|
||||
|
|
@ -742,7 +742,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "john-slop-lsp"
|
||||
version = "0.1.27-rc.5"
|
||||
version = "0.1.27-rc.8"
|
||||
dependencies = [
|
||||
"john-slop-core",
|
||||
"serde_json",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ default-members = [".", "crates/john-slop-core", "crates/john-slop-lsp"]
|
|||
resolver = "3"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.27-rc.5"
|
||||
version = "0.1.27-rc.8"
|
||||
edition = "2024"
|
||||
rust-version = "1.98.1"
|
||||
license = "MIT"
|
||||
|
|
@ -18,8 +18,8 @@ figment = { version = "0.10.19", default-features = false, features = ["toml"] }
|
|||
futures = { version = "0.3.34", default-features = false, features = ["std"] }
|
||||
globset = { version = "0.4.20", default-features = false }
|
||||
insta = { version = "1.48.0", default-features = false }
|
||||
john-slop-core = { version = "0.1.27-rc.5", path = "crates/john-slop-core" }
|
||||
john-slop-lsp-engine = { package = "john-slop-lsp", version = "0.1.27-rc.5", path = "crates/john-slop-lsp" }
|
||||
john-slop-core = { version = "0.1.27-rc.8", path = "crates/john-slop-core" }
|
||||
john-slop-lsp-engine = { package = "john-slop-lsp", version = "0.1.27-rc.8", path = "crates/john-slop-lsp" }
|
||||
miette = { version = "7.6.0", default-features = false, features = ["derive"] }
|
||||
regex = "1.13.1"
|
||||
serde = { version = "1.0.229", features = ["derive"] }
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
[build]
|
||||
|
||||
[build.env]
|
||||
passthrough = ["RUSTUP_TOOLCHAIN"]
|
||||
|
||||
[target.x86_64-unknown-linux-musl]
|
||||
image = "ghcr.io/cross-rs/x86_64-unknown-linux-musl:main"
|
||||
|
||||
[target.aarch64-unknown-linux-musl]
|
||||
image = "ghcr.io/cross-rs/aarch64-unknown-linux-musl:main"
|
||||
|
||||
[target.x86_64-pc-windows-gnu]
|
||||
image = "ghcr.io/cross-rs/x86_64-pc-windows-gnu:main"
|
||||
|
|
@ -8,8 +8,10 @@ pipeline {
|
|||
CARGO_TERM_COLOR = 'always'
|
||||
RUST_BACKTRACE = '1'
|
||||
MSRV = '1.98.1'
|
||||
CARGO_TARPAULIN_VERSION = '0.37.5'
|
||||
CARGO_AUDIT_VERSION = '0.22.2'
|
||||
CARGO_DENY_VERSION = '0.20.2'
|
||||
BADGE_PUBLISH_ROOT = '/mnt/assets/coverage'
|
||||
}
|
||||
|
||||
stages {
|
||||
|
|
@ -65,6 +67,11 @@ pipeline {
|
|||
cargo install cargo-deny --locked --version "${CARGO_DENY_VERSION}"
|
||||
fi
|
||||
|
||||
INSTALLED_TARPAULIN="$(cargo tarpaulin --version 2>/dev/null || true)"
|
||||
if [ "${INSTALLED_TARPAULIN}" != "cargo-tarpaulin-tarpaulin ${CARGO_TARPAULIN_VERSION}" ]; then
|
||||
cargo install cargo-tarpaulin --locked --version "${CARGO_TARPAULIN_VERSION}"
|
||||
fi
|
||||
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
|
@ -148,6 +155,32 @@ pipeline {
|
|||
|
||||
cargo test --locked --test example_fixtures --all-features
|
||||
cargo test --locked --test cli --all-features
|
||||
|
||||
mkdir -p coverage
|
||||
: > "coverage/.tests-passed-${BUILD_NUMBER}"
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
stage('Coverage') {
|
||||
steps {
|
||||
sh '''
|
||||
set -eu
|
||||
|
||||
cargo tarpaulin \
|
||||
--config tarpaulin.toml \
|
||||
--out Json \
|
||||
--output-dir coverage
|
||||
|
||||
mv coverage/tarpaulin-report.json coverage/summary.json
|
||||
coverage_percent=$(sed -n \
|
||||
's/^.*],"coverage":\\([0-9][0-9.]*\\),"covered":[0-9][0-9]*,"coverable":[0-9][0-9]*}$/\\1/p' \
|
||||
coverage/summary.json)
|
||||
scripts/render-coverage-badge.sh \
|
||||
"${coverage_percent}" \
|
||||
coverage/coverage.svg
|
||||
rm coverage/summary.json
|
||||
: > "coverage/.coverage-ready-${BUILD_NUMBER}"
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
|
@ -236,7 +269,7 @@ pipeline {
|
|||
conclusion: 'SUCCESS',
|
||||
name: 'Rust CI',
|
||||
summary: 'JohnSlop passed all CI checks.',
|
||||
text: 'The Linux MSRV/stable matrix, formatting, feature tests, fixtures, docs, Clippy, supply-chain policy, and release build completed successfully.',
|
||||
text: 'The Linux MSRV/stable matrix, formatting, feature tests, fixtures, coverage and badge generation, docs, Clippy, supply-chain policy, and release build completed successfully.',
|
||||
title: 'Build Successful'
|
||||
)
|
||||
|
||||
|
|
@ -248,7 +281,7 @@ pipeline {
|
|||
conclusion: 'FAILURE',
|
||||
name: 'Rust CI',
|
||||
summary: 'JohnSlop failed CI.',
|
||||
text: 'A toolchain, formatting, test, fixture, documentation, Clippy, supply-chain, or release check failed. Check the Jenkins log.',
|
||||
text: 'A toolchain, formatting, test, fixture, coverage, badge generation, documentation, Clippy, supply-chain, or release check failed. Check the Jenkins log.',
|
||||
title: 'Build Failed'
|
||||
)
|
||||
|
||||
|
|
@ -266,5 +299,65 @@ pipeline {
|
|||
|
||||
echo '⚠️ JohnSlop CI is unstable.'
|
||||
}
|
||||
|
||||
cleanup {
|
||||
sh '''
|
||||
set -eu
|
||||
|
||||
mkdir -p coverage
|
||||
test_status=failing
|
||||
if [ -f "coverage/.tests-passed-${BUILD_NUMBER}" ]; then
|
||||
test_status=passing
|
||||
fi
|
||||
scripts/render-test-badge.sh \
|
||||
"${test_status}" \
|
||||
coverage/test.svg
|
||||
|
||||
if [ ! -f "coverage/.coverage-ready-${BUILD_NUMBER}" ]; then
|
||||
scripts/render-coverage-badge.sh - coverage/coverage.svg
|
||||
fi
|
||||
|
||||
package_version=$(awk '
|
||||
$0 == "[workspace.package]" { in_package = 1; next }
|
||||
substr($0, 1, 1) == "[" { in_package = 0 }
|
||||
in_package && $1 == "version" && $2 == "=" {
|
||||
gsub(/^"|"$/, "", $3)
|
||||
print $3
|
||||
exit
|
||||
}
|
||||
' Cargo.toml)
|
||||
if [ -z "${package_version}" ]; then
|
||||
echo "could not determine workspace package version" >&2
|
||||
exit 2
|
||||
fi
|
||||
scripts/render-version-badge.sh \
|
||||
"${package_version}" \
|
||||
coverage/version.svg
|
||||
|
||||
rm -f \
|
||||
coverage/summary.json \
|
||||
coverage/tarpaulin-report.json \
|
||||
"coverage/.tests-passed-${BUILD_NUMBER}" \
|
||||
"coverage/.coverage-ready-${BUILD_NUMBER}"
|
||||
'''
|
||||
|
||||
archiveArtifacts(
|
||||
allowEmptyArchive: false,
|
||||
artifacts: 'coverage/coverage.svg,coverage/test.svg,coverage/version.svg',
|
||||
fingerprint: true
|
||||
)
|
||||
|
||||
sh '''
|
||||
set -eu
|
||||
|
||||
if [ "${BRANCH_NAME:-}" = "main" ]; then
|
||||
scripts/publish-badges.sh \
|
||||
"${BADGE_PUBLISH_ROOT}" \
|
||||
coverage \
|
||||
test \
|
||||
version
|
||||
fi
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
17
README.md
17
README.md
|
|
@ -1,8 +1,8 @@
|
|||
# John Slop
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
John Slop is a local-first linter for concrete signs of low-effort or
|
||||
insufficiently reviewed text and source code. It reports explainable evidence
|
||||
|
|
@ -10,7 +10,16 @@ for human review; it does not prove AI authorship or identify a model.
|
|||
|
||||
## Quickstart
|
||||
|
||||
Rust 1.98.1 or newer is required. Install from the upstream Git repository:
|
||||
With `cargo-binstall` available, install all three prebuilt binaries from the
|
||||
latest release candidate:
|
||||
|
||||
```sh
|
||||
cargo binstall --git https://proxy.dandaedre.com/gitea/idle-org/john-slop \
|
||||
john-slop
|
||||
```
|
||||
|
||||
To build from source, Rust 1.98.1 or newer is required. Install from the
|
||||
upstream Git repository:
|
||||
|
||||
```sh
|
||||
cargo install --git https://proxy.dandaedre.com/gitea/idle-org/john-slop \
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="122" height="18" role="img" aria-label="test-coverage: 93%"><title>test-coverage: 93%</title><linearGradient id="bms-317a4207573154a7" x2="0" y2="100%"><stop offset="0" stop-color="#fff" stop-opacity=".7"/><stop offset=".1" stop-color="#aaa" stop-opacity=".1"/><stop offset=".9" stop-color="#000" stop-opacity=".3"/><stop offset="1" stop-color="#000" stop-opacity=".5"/></linearGradient><clipPath id="bmr-317a4207573154a7"><rect width="122" height="18" rx="4" fill="#fff"/></clipPath><g clip-path="url(#bmr-317a4207573154a7)"><rect width="87" height="18" fill="#555"/><rect x="87" width="35" height="18" fill="#97ca00"/><rect width="122" height="18" fill="url(#bms-317a4207573154a7)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="445" y="140" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="770">test-coverage</text><text x="445" y="130" transform="scale(.1)" fill="#fff" textLength="770">test-coverage</text><text aria-hidden="true" x="1035" y="140" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="250">93%</text><text x="1035" y="130" transform="scale(.1)" fill="#fff" textLength="250">93%</text></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="82" height="18" role="img" aria-label="test: passing"><title>test: passing</title><linearGradient id="bms-5402c39dce014bd3" x2="0" y2="100%"><stop offset="0" stop-color="#fff" stop-opacity=".7"/><stop offset=".1" stop-color="#aaa" stop-opacity=".1"/><stop offset=".9" stop-color="#000" stop-opacity=".3"/><stop offset="1" stop-color="#000" stop-opacity=".5"/></linearGradient><clipPath id="bmr-5402c39dce014bd3"><rect width="82" height="18" rx="4" fill="#fff"/></clipPath><g clip-path="url(#bmr-5402c39dce014bd3)"><rect width="31" height="18" fill="#555"/><rect x="31" width="51" height="18" fill="#97ca00"/><rect width="82" height="18" fill="url(#bms-5402c39dce014bd3)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="165" y="140" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="210">test</text><text x="165" y="130" transform="scale(.1)" fill="#fff" textLength="210">test</text><text aria-hidden="true" x="555" y="140" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="410">passing</text><text x="555" y="130" transform="scale(.1)" fill="#fff" textLength="410">passing</text></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="124" height="18" role="img" aria-label="version: 0.1.27-rc.5"><title>version: 0.1.27-rc.5</title><linearGradient id="bms-637505e5b09c7692" x2="0" y2="100%"><stop offset="0" stop-color="#fff" stop-opacity=".7"/><stop offset=".1" stop-color="#aaa" stop-opacity=".1"/><stop offset=".9" stop-color="#000" stop-opacity=".3"/><stop offset="1" stop-color="#000" stop-opacity=".5"/></linearGradient><clipPath id="bmr-637505e5b09c7692"><rect width="124" height="18" rx="4" fill="#fff"/></clipPath><g clip-path="url(#bmr-637505e5b09c7692)"><rect width="51" height="18" fill="#555"/><rect x="51" width="73" height="18" fill="#fe7d37"/><rect width="124" height="18" fill="url(#bms-637505e5b09c7692)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="265" y="140" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="410">version</text><text x="265" y="130" transform="scale(.1)" fill="#fff" textLength="410">version</text><text aria-hidden="true" x="865" y="140" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="630">0.1.27-rc.5</text><text x="865" y="130" transform="scale(.1)" fill="#fff" textLength="630">0.1.27-rc.5</text></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
|
@ -61,10 +61,10 @@ generated diff.
|
|||
|
||||
## Coverage and badges
|
||||
|
||||
Run line coverage with Cargo Tarpaulin:
|
||||
Run the same line-coverage command used by Jenkins:
|
||||
|
||||
```sh
|
||||
cargo tarpaulin --config tarpaulin.toml
|
||||
cargo tarpaulin --config tarpaulin.toml --out Json --output-dir coverage
|
||||
```
|
||||
|
||||
The configuration enforces a 90% floor. The current suite measured 92.72%
|
||||
|
|
@ -73,16 +73,21 @@ platform/I/O failure injection, malformed archive internals, coordinate
|
|||
overflow, LSP logging/reload failures, and subprocess attribution. Do not add
|
||||
brittle tests or production seams solely to make Tarpaulin count those paths.
|
||||
|
||||
After a clean test and coverage run, refresh the repository-local badges with:
|
||||
`Cargo.toml` is the authoritative version source. Jenkins temporarily renames
|
||||
the Tarpaulin JSON output to `coverage/summary.json`, extracts and validates its
|
||||
overall percentage, renders the badges locally, and then removes the summary.
|
||||
It archives only `coverage/version.svg`, `coverage/test.svg`, and
|
||||
`coverage/coverage.svg`, with fingerprinting. Successful `main` builds publish
|
||||
those files atomically under
|
||||
`/mnt/assets/coverage/idle-org/john-slop/main/`, which serves these mutable URLs:
|
||||
|
||||
```sh
|
||||
rust_autobadges --high-coverage-percent 0.7 --mid-coverage-percent 0.3
|
||||
```
|
||||
- `https://assets.dandaedre.com/coverage/idle-org/john-slop/main/version.svg`
|
||||
- `https://assets.dandaedre.com/coverage/idle-org/john-slop/main/test.svg`
|
||||
- `https://assets.dandaedre.com/coverage/idle-org/john-slop/main/coverage.svg`
|
||||
|
||||
Commit `badges/*.svg` and `.run_status.toml`; do not commit the generated
|
||||
`tarpaulin-report.html`. Coverage is currently a local release gate: Jenkins
|
||||
runs both feature configurations, but its Tarpaulin check is disabled while the
|
||||
job does not publish the report artifact.
|
||||
The asset server is deployment-owned: it must mount assets read-only, disable
|
||||
directory listings, serve SVG with a restrictive content security policy, and
|
||||
revalidate these URLs or apply a short cache lifetime.
|
||||
|
||||
## Test scope
|
||||
|
||||
|
|
@ -96,7 +101,7 @@ Each completed milestone receives an immutable annotated `v0.1.N` Git tag,
|
|||
where `N` is the milestone number, after its acceptance criteria and quality
|
||||
gates pass. Its completion commit must also use package version `0.1.N` in the
|
||||
workspace manifest, internal registry requirements, lockfile, changelog, binary
|
||||
version output, and generated version badge.
|
||||
version output. Jenkins derives the current version badge from that metadata.
|
||||
|
||||
## Fuzzing
|
||||
|
||||
|
|
|
|||
|
|
@ -52,10 +52,11 @@ then pass the path of a readable Gitea token file to the repository wrapper:
|
|||
|
||||
The wrapper keeps the token out of command-line arguments, exports it as
|
||||
`GITEA_TOKEN` only to `rust_realease`, selects the `john-slop` workspace package,
|
||||
and publishes raw binary artifacts. It temporarily selects the canonical HTTPS
|
||||
origin for publication, then restores the SSH development origin after both
|
||||
successful and failed attempts. A hyphenated Cargo version such as
|
||||
`0.1.27-rc.5` automatically marks the Gitea release as a prerelease. Additional
|
||||
and publishes cargo-binstall archives alongside raw binary artifacts. The
|
||||
project-local `rust-release.toml` maps the SSH development origin to the
|
||||
canonical HTTPS proxy for release API and download operations without modifying
|
||||
the Git remote. A hyphenated Cargo version such as
|
||||
`0.1.27-rc.8` automatically marks the Gitea release as a prerelease. Additional
|
||||
arguments are forwarded, so use `--dry-run` before publication and
|
||||
`--replace-assets` only after reviewing an existing release collision. The
|
||||
checkout must be clean and its local and remote `vX.Y.Z` tag must match the
|
||||
|
|
|
|||
|
|
@ -383,9 +383,28 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "john-slop"
|
||||
version = "0.1.27-rc.8"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"globset",
|
||||
"john-slop-core",
|
||||
"john-slop-lsp",
|
||||
"miette",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"similar",
|
||||
"tempfile",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"toml 1.1.6+spec-1.1.0",
|
||||
"tower-lsp-server",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "john-slop-core"
|
||||
version = "0.1.27-rc.5"
|
||||
version = "0.1.27-rc.8"
|
||||
dependencies = [
|
||||
"directories",
|
||||
"figment",
|
||||
|
|
@ -411,7 +430,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "john-slop-lsp"
|
||||
version = "0.1.27-rc.5"
|
||||
version = "0.1.27-rc.8"
|
||||
dependencies = [
|
||||
"john-slop-core",
|
||||
"serde_json",
|
||||
|
|
@ -420,25 +439,6 @@ dependencies = [
|
|||
"tower-lsp-server",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "john-slop"
|
||||
version = "0.1.27-rc.5"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"globset",
|
||||
"john-slop-core",
|
||||
"john-slop-lsp",
|
||||
"miette",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"similar",
|
||||
"tempfile",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"toml 1.1.6+spec-1.1.0",
|
||||
"tower-lsp-server",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.189"
|
||||
|
|
|
|||
36
release.sh
36
release.sh
|
|
@ -30,46 +30,14 @@ export GITEA_TOKEN
|
|||
|
||||
repository_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
manifest_version=$(sed -n 's/^version = "\([^"]*\)"/\1/p' "$repository_dir/Cargo.toml" | head -n 1)
|
||||
release_origin=https://proxy.dandaedre.com/gitea/idle-org/john-slop
|
||||
development_origin=git@git.dandaedre.com:idle-org/john-slop.git
|
||||
|
||||
if ! git -C "$repository_dir" remote get-url origin >/dev/null 2>&1; then
|
||||
echo "Git origin is not configured for $repository_dir" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
origin_switched=false
|
||||
restore_development_origin() {
|
||||
if [ "$origin_switched" = true ]; then
|
||||
if git -C "$repository_dir" remote set-url origin "$development_origin"; then
|
||||
origin_switched=false
|
||||
else
|
||||
echo "error: failed to restore Git origin to $development_origin" >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
git -C "$repository_dir" remote set-url origin "$release_origin"
|
||||
origin_switched=true
|
||||
trap 'restore_development_origin || :' 0
|
||||
trap 'exit 129' 1
|
||||
trap 'exit 130' 2
|
||||
trap 'exit 143' 15
|
||||
|
||||
set -- \
|
||||
"$repository_dir" \
|
||||
--package john-slop \
|
||||
--artifact-format binary \
|
||||
--artifact-format both \
|
||||
"$@"
|
||||
case "$manifest_version" in
|
||||
*-*) set -- "$@" --prerelease ;;
|
||||
esac
|
||||
|
||||
release_status=0
|
||||
rust_realease "$@" || release_status=$?
|
||||
if ! restore_development_origin; then
|
||||
exit 2
|
||||
fi
|
||||
trap - 0 1 2 15
|
||||
exit "$release_status"
|
||||
exec rust_realease "$@"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
[[repository.fallbacks]]
|
||||
origin = "git@git.dandaedre.com:idle-org/john-slop.git"
|
||||
fallback-url = "https://proxy.dandaedre.com/gitea/idle-org/john-slop"
|
||||
|
|
@ -0,0 +1,270 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
usage() {
|
||||
cat >&2 <<'EOF'
|
||||
usage: $0 <version|test|coverage> [options]
|
||||
|
||||
Render one deterministic SVG badge. Defaults:
|
||||
version --text version --value unknown --color #007ec6
|
||||
test --text tests --value passing --color #4c1
|
||||
coverage --text coverage --value - --color #9f9f9f --suffix %
|
||||
|
||||
Options:
|
||||
--text TEXT left-hand label
|
||||
--value VALUE right-hand value
|
||||
--color COLOR value background (#RGB or #RRGGBB)
|
||||
--size PX font size, from 6 through 24 (default: 11)
|
||||
--height PX badge height, from 14 through 64 (default: 20)
|
||||
--label-width PX fixed label width instead of automatic sizing
|
||||
--value-width PX fixed value width instead of automatic sizing
|
||||
--suffix TEXT text appended to the displayed value
|
||||
--output PATH output file (default: coverage/<kind>.svg)
|
||||
-h, --help show this help
|
||||
|
||||
Examples:
|
||||
./ci-coverage-badges.sh version --value 1.2.3
|
||||
./ci-coverage-badges.sh test --value failing
|
||||
./ci-coverage-badges.sh coverage --value 87.4
|
||||
./ci-coverage-badges.sh version --text release --value rc.12 --size 12 --color '#8a2be2'
|
||||
EOF
|
||||
exit "${1:-2}"
|
||||
}
|
||||
|
||||
[ "$#" -ge 1 ] || usage
|
||||
kind=$1
|
||||
shift
|
||||
|
||||
case "$kind" in
|
||||
version)
|
||||
text=version
|
||||
value=unknown
|
||||
color='#007ec6'
|
||||
suffix=
|
||||
output=coverage/version.svg
|
||||
;;
|
||||
test)
|
||||
text=tests
|
||||
value=passing
|
||||
color=
|
||||
suffix=
|
||||
output=coverage/test.svg
|
||||
;;
|
||||
coverage)
|
||||
text=coverage
|
||||
value=-
|
||||
color=
|
||||
suffix=%
|
||||
output=coverage/coverage.svg
|
||||
;;
|
||||
-h|--help) usage 0 ;;
|
||||
*)
|
||||
echo "unsupported badge kind: $kind" >&2
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
|
||||
font_size=11
|
||||
height=20
|
||||
label_width=
|
||||
value_width=
|
||||
color_set=false
|
||||
|
||||
while [ "$#" -gt 0 ]; do
|
||||
option=$1
|
||||
case "$option" in
|
||||
--text|--value|--color|--size|--height|--label-width|--value-width|--suffix|--output)
|
||||
[ "$#" -ge 2 ] || {
|
||||
echo "missing value for $option" >&2
|
||||
exit 2
|
||||
}
|
||||
option_value=$2
|
||||
shift 2
|
||||
case "$option" in
|
||||
--text) text=$option_value ;;
|
||||
--value) value=$option_value ;;
|
||||
--color) color=$option_value; color_set=true ;;
|
||||
--size) font_size=$option_value ;;
|
||||
--height) height=$option_value ;;
|
||||
--label-width) label_width=$option_value ;;
|
||||
--value-width) value_width=$option_value ;;
|
||||
--suffix) suffix=$option_value ;;
|
||||
--output) output=$option_value ;;
|
||||
esac
|
||||
;;
|
||||
-h|--help) usage 0 ;;
|
||||
*)
|
||||
echo "unknown option: $option" >&2
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
validate_text() {
|
||||
field_name=$1
|
||||
field_value=$2
|
||||
if ! printf '%sX\n' "$field_value" | LC_ALL=C awk '
|
||||
BEGIN { valid = 1 }
|
||||
NR != 1 || $0 !~ /^[ -~]+X$/ || length($0) <= 1 { valid = 0 }
|
||||
END { exit(valid == 0 ? 1 : 0) }
|
||||
'; then
|
||||
echo "$field_name must contain printable ASCII characters: $field_value" >&2
|
||||
exit 2
|
||||
fi
|
||||
}
|
||||
|
||||
validate_integer() {
|
||||
field_name=$1
|
||||
field_value=$2
|
||||
minimum=$3
|
||||
maximum=$4
|
||||
case "$field_value" in
|
||||
''|*[!0-9]*)
|
||||
echo "$field_name must be an integer from $minimum through $maximum: $field_value" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
if [ "$field_value" -lt "$minimum" ] || [ "$field_value" -gt "$maximum" ]; then
|
||||
echo "$field_name must be an integer from $minimum through $maximum: $field_value" >&2
|
||||
exit 2
|
||||
fi
|
||||
}
|
||||
|
||||
validate_text text "$text"
|
||||
validate_text value "$value"
|
||||
if [ -n "$suffix" ]; then
|
||||
validate_text suffix "$suffix"
|
||||
fi
|
||||
validate_integer size "$font_size" 6 24
|
||||
validate_integer height "$height" 14 64
|
||||
if [ -n "$label_width" ]; then
|
||||
validate_integer label-width "$label_width" 20 1000
|
||||
fi
|
||||
if [ -n "$value_width" ]; then
|
||||
validate_integer value-width "$value_width" 20 1000
|
||||
fi
|
||||
case "$output" in
|
||||
''|*/) echo "output must name an SVG file: $output" >&2; exit 2 ;;
|
||||
esac
|
||||
|
||||
case "$kind" in
|
||||
test)
|
||||
if [ "$color_set" = false ]; then
|
||||
case "$value" in
|
||||
passing) color='#4c1' ;;
|
||||
failing) color='#e05d44' ;;
|
||||
*) color='#9f9f9f' ;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
coverage)
|
||||
if [ "$value" = '-' ]; then
|
||||
[ "$color_set" = true ] || color='#9f9f9f'
|
||||
else
|
||||
if ! awk -v candidate="$value" 'BEGIN {
|
||||
valid = candidate ~ /^[0-9]+([.][0-9]+)?$/ && candidate >= 0 && candidate <= 100
|
||||
exit(valid ? 0 : 1)
|
||||
}'; then
|
||||
echo "coverage value must be - or a number from 0 through 100: $value" >&2
|
||||
exit 2
|
||||
fi
|
||||
value=$(awk -v candidate="$value" 'BEGIN { printf "%.0f", candidate }')
|
||||
if [ "$color_set" = false ]; then
|
||||
if [ "$value" -ge 90 ]; then
|
||||
color='#4c1'
|
||||
elif [ "$value" -ge 70 ]; then
|
||||
color='#dfb317'
|
||||
else
|
||||
color='#e05d44'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$color" in
|
||||
\#[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]|\#[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]) ;;
|
||||
*) echo "color must be #RGB or #RRGGBB: $color" >&2; exit 2 ;;
|
||||
esac
|
||||
|
||||
display_value=$value$suffix
|
||||
if [ -z "$label_width" ]; then
|
||||
label_width=$(printf '%s\\n' "$text" | awk -v size="$font_size" '{
|
||||
width = int(length($0) * size * 0.64 + 14)
|
||||
print (width < 35 ? 35 : width)
|
||||
}')
|
||||
fi
|
||||
if [ -z "$value_width" ]; then
|
||||
value_width=$(printf '%s\\n' "$display_value" | awk -v size="$font_size" '{
|
||||
width = int(length($0) * size * 0.64 + 14)
|
||||
print (width < 35 ? 35 : width)
|
||||
}')
|
||||
fi
|
||||
|
||||
badge_width=$((label_width + value_width))
|
||||
label_center=$(awk -v width="$label_width" 'BEGIN { printf "%.1f", width / 2 }')
|
||||
value_center=$(awk -v left="$label_width" -v width="$value_width" 'BEGIN {
|
||||
printf "%.1f", left + width / 2
|
||||
}')
|
||||
vertical_center=$(awk -v badge_height="$height" 'BEGIN { printf "%.1f", badge_height / 2 }')
|
||||
|
||||
xml_escape() {
|
||||
sed \
|
||||
-e 's/&/\&/g' \
|
||||
-e 's/</\</g' \
|
||||
-e 's/>/\>/g' \
|
||||
-e 's/"/\"/g'
|
||||
}
|
||||
|
||||
sed_replacement_escape() {
|
||||
sed -e 's/[\\&|]/\\&/g'
|
||||
}
|
||||
|
||||
escaped_text=$(printf '%s' "$text" | xml_escape | sed_replacement_escape)
|
||||
escaped_value=$(printf '%s' "$display_value" | xml_escape | sed_replacement_escape)
|
||||
escaped_title=$(printf '%s: %s' "$text" "$display_value" | xml_escape | sed_replacement_escape)
|
||||
|
||||
output_dir=${output%/*}
|
||||
if [ "$output_dir" != "$output" ]; then
|
||||
mkdir -p "$output_dir"
|
||||
fi
|
||||
temporary="${output}.tmp.$$"
|
||||
trap 'rm -f "$temporary"' EXIT HUP INT TERM
|
||||
|
||||
sed \
|
||||
-e "s/@BADGE_WIDTH@/$badge_width/g" \
|
||||
-e "s/@HEIGHT@/$height/g" \
|
||||
-e "s/@LABEL_WIDTH@/$label_width/g" \
|
||||
-e "s/@VALUE_WIDTH@/$value_width/g" \
|
||||
-e "s/@LABEL_CENTER@/$label_center/g" \
|
||||
-e "s/@VALUE_CENTER@/$value_center/g" \
|
||||
-e "s/@VERTICAL_CENTER@/$vertical_center/g" \
|
||||
-e "s/@FONT_SIZE@/$font_size/g" \
|
||||
-e "s/@COLOR@/$color/g" \
|
||||
-e "s|@TITLE@|$escaped_title|g" \
|
||||
-e "s|@TEXT@|$escaped_text|g" \
|
||||
-e "s|@VALUE@|$escaped_value|g" \
|
||||
>"$temporary" <<'EOF'
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="@BADGE_WIDTH@" height="@HEIGHT@" role="img" aria-label="@TITLE@">
|
||||
<title>@TITLE@</title>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#fff" stop-opacity=".7"/>
|
||||
<stop offset=".1" stop-color="#aaa" stop-opacity=".1"/>
|
||||
<stop offset=".9" stop-opacity=".3"/>
|
||||
<stop offset="1" stop-opacity=".5"/>
|
||||
</linearGradient>
|
||||
<clipPath id="r"><rect width="@BADGE_WIDTH@" height="@HEIGHT@" rx="3"/></clipPath>
|
||||
<g clip-path="url(#r)">
|
||||
<rect width="@LABEL_WIDTH@" height="@HEIGHT@" fill="#555"/>
|
||||
<rect x="@LABEL_WIDTH@" width="@VALUE_WIDTH@" height="@HEIGHT@" fill="@COLOR@"/>
|
||||
<rect width="@BADGE_WIDTH@" height="@HEIGHT@" fill="url(#s)"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" dominant-baseline="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="@FONT_SIZE@">
|
||||
<text x="@LABEL_CENTER@" y="@VERTICAL_CENTER@">@TEXT@</text>
|
||||
<text x="@VALUE_CENTER@" y="@VERTICAL_CENTER@">@VALUE@</text>
|
||||
</g>
|
||||
</svg>
|
||||
EOF
|
||||
|
||||
mv "$temporary" "$output"
|
||||
trap - EXIT HUP INT TERM
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 <badge-publication-root> <badge> [badge...]" >&2
|
||||
echo "badges: coverage test version" >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
[ "$#" -ge 2 ] || usage
|
||||
publication_root=$1
|
||||
shift
|
||||
case "$publication_root" in
|
||||
/*) ;;
|
||||
*)
|
||||
echo "badge publication root must be an absolute path: $publication_root" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
if [ ! -d "$publication_root" ] || [ ! -w "$publication_root" ]; then
|
||||
echo "badge publication root must be an existing writable directory: $publication_root" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
selected=' '
|
||||
for badge in "$@"; do
|
||||
case "$badge" in
|
||||
coverage|test|version) ;;
|
||||
*)
|
||||
echo "unsupported badge: $badge" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
case "$selected" in
|
||||
*" $badge "*)
|
||||
echo "badge selected more than once: $badge" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
selected="$selected$badge "
|
||||
source="coverage/$badge.svg"
|
||||
if [ ! -f "$source" ] || [ ! -s "$source" ] || [ -L "$source" ]; then
|
||||
echo "required badge must be a regular nonempty file, not a symlink: $source" >&2
|
||||
exit 2
|
||||
fi
|
||||
done
|
||||
|
||||
owner_root="$publication_root/idle-org"
|
||||
project_root="$owner_root/john-slop"
|
||||
badge_root="$project_root/main"
|
||||
for directory in "$owner_root" "$project_root"; do
|
||||
if [ -L "$directory" ] || { [ -e "$directory" ] && [ ! -d "$directory" ]; }; then
|
||||
echo "badge destination component is not a directory: $directory" >&2
|
||||
exit 2
|
||||
fi
|
||||
mkdir -p "$directory"
|
||||
chmod 0755 "$directory"
|
||||
done
|
||||
if [ -L "$badge_root" ]; then
|
||||
unlink "$badge_root"
|
||||
elif [ -e "$badge_root" ] && [ ! -d "$badge_root" ]; then
|
||||
echo "badge destination is not a directory: $badge_root" >&2
|
||||
exit 2
|
||||
fi
|
||||
mkdir -p "$badge_root"
|
||||
chmod 0755 "$badge_root"
|
||||
|
||||
temporary=
|
||||
trap 'if [ -n "$temporary" ]; then rm -f "$temporary"; fi' EXIT HUP INT TERM
|
||||
for badge in "$@"; do
|
||||
temporary=$(mktemp "$badge_root/.$badge.svg.XXXXXX")
|
||||
cp "coverage/$badge.svg" "$temporary"
|
||||
chmod 0644 "$temporary"
|
||||
mv -f "$temporary" "$badge_root/$badge.svg"
|
||||
temporary=
|
||||
echo "published $badge badge to $badge_root/$badge.svg"
|
||||
done
|
||||
trap - EXIT HUP INT TERM
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 <line-coverage-percent> <output.svg>" >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
[ "$#" -eq 2 ] || usage
|
||||
percent=$1
|
||||
output=$2
|
||||
|
||||
script_dir=$(CDPATH= cd -P "$(dirname "$0")" && pwd)
|
||||
exec "$script_dir/make-badge.sh" coverage \
|
||||
--value "$percent" \
|
||||
--label-width 75 \
|
||||
--value-width 37 \
|
||||
--output "$output"
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 <passing|failing> <output.svg>" >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
[ "$#" -eq 2 ] || usage
|
||||
status=$1
|
||||
output=$2
|
||||
case "$status" in
|
||||
passing|failing) ;;
|
||||
*)
|
||||
echo "test badge status must be passing or failing: $status" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
script_dir=$(CDPATH= cd -P "$(dirname "$0")" && pwd)
|
||||
exec "$script_dir/make-badge.sh" test \
|
||||
--value "$status" \
|
||||
--label-width 45 \
|
||||
--value-width 55 \
|
||||
--output "$output"
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 <package-version> <output.svg>" >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
[ "$#" -eq 2 ] || usage
|
||||
version=$1
|
||||
output=$2
|
||||
case "$version" in
|
||||
''|*[!0-9A-Za-z.+-]*)
|
||||
echo "package version contains unsupported badge characters: $version" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
script_dir=$(CDPATH= cd -P "$(dirname "$0")" && pwd)
|
||||
exec "$script_dir/make-badge.sh" version \
|
||||
--value "$version" \
|
||||
--label-width 59 \
|
||||
--output "$output"
|
||||
35
tasks.md
35
tasks.md
|
|
@ -825,6 +825,41 @@ dependency policy, package assembly, exact binary versions, and 92.72% clean
|
|||
coverage passed. Earlier RC tags remain unchanged before RC5 is tagged and
|
||||
published.
|
||||
|
||||
## Release candidate 0.1.27-rc.6
|
||||
|
||||
- [x] Publish cargo-binstall `.tgz` archives alongside raw binaries and pin the
|
||||
wrapper argument contract in its integration test.
|
||||
- [x] Synchronize and verify release artifacts at `0.1.27-rc.6`, then publish
|
||||
immutable prerelease `v0.1.27-rc.6` without moving earlier RC tags.
|
||||
|
||||
Acceptance: the publisher receives artifact format `both`; the release contains
|
||||
the target archives named by `package.metadata.binstall`; cargo-binstall
|
||||
installation verification passes; and all standard release gates remain green.
|
||||
|
||||
Accepted on 2026-09-30: the wrapper contract passes artifact format `both` and
|
||||
prerelease mode; formatting, Clippy, both feature test matrices, documentation,
|
||||
MSRV, RustSec, dependency policy, package assembly, exact binary versions, and
|
||||
92.72% clean coverage passed. Earlier RC tags remain unchanged before RC6 is
|
||||
tagged and published.
|
||||
|
||||
## Release candidate 0.1.27-rc.7
|
||||
|
||||
- [x] Replace release-time Git origin mutation with the publisher's project-local
|
||||
repository fallback mapping and retain the SSH development remote unchanged.
|
||||
- [x] Synchronize and verify release artifacts at `0.1.27-rc.7`, then create and
|
||||
push immutable prerelease tag `v0.1.27-rc.7` without moving earlier RC tags.
|
||||
|
||||
Acceptance: the publisher inspection resolves the RC7 package and tag through
|
||||
the fallback-aware project configuration; the integration test observes the SSH
|
||||
origin during successful and failed publisher invocations; and all standard
|
||||
release gates remain green.
|
||||
|
||||
Accepted on 2026-09-30: formatting, Clippy, both feature test matrices,
|
||||
documentation, RustSec, dependency policy, workspace package assembly, exact
|
||||
binary versions, publisher inspection, and 92.72% clean coverage passed. All
|
||||
workspace metadata, lockfiles, evaluation sign-off, changelog, and the generated
|
||||
version badge agree on `0.1.27-rc.7`; earlier RC tags remain unchanged.
|
||||
|
||||
## Deferred by design
|
||||
|
||||
- Statistical or model-based authorship classification.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
schema_version = 1
|
||||
release = "0.1.27-rc.5"
|
||||
release = "0.1.27-rc.8"
|
||||
reviewed_on = "2026-09-30"
|
||||
status = "accepted-with-runtime-catalog-boundary"
|
||||
catalog_sha256 = "da34ce00dfd2d801e772fa440d932abb98c929f5ad08ff3ad5e47e0ed4d84d5a"
|
||||
|
|
|
|||
|
|
@ -9,8 +9,10 @@ use std::{
|
|||
|
||||
use tempfile::TempDir;
|
||||
|
||||
const RELEASE_ORIGIN: &str = "https://proxy.dandaedre.com/gitea/idle-org/john-slop";
|
||||
const DEVELOPMENT_ORIGIN: &str = "git@git.dandaedre.com:idle-org/john-slop.git";
|
||||
const RELEASE_CONFIG: &str = "[[repository.fallbacks]]\n\
|
||||
origin = \"git@git.dandaedre.com:idle-org/john-slop.git\"\n\
|
||||
fallback-url = \"https://proxy.dandaedre.com/gitea/idle-org/john-slop\"\n";
|
||||
|
||||
fn run(command: &mut Command) -> Output {
|
||||
command.output().expect("test command should start")
|
||||
|
|
@ -24,7 +26,7 @@ fn git(repository: &Path, arguments: &[&str]) -> Output {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn release_wrapper_uses_https_then_restores_ssh_on_every_exit() {
|
||||
fn release_wrapper_uses_repository_fallback_without_changing_origin() {
|
||||
for release_status in [0, 17] {
|
||||
let temporary = TempDir::new().expect("temporary directory should be created");
|
||||
let repository = temporary.path().join("repository");
|
||||
|
|
@ -37,9 +39,14 @@ fn release_wrapper_uses_https_then_restores_ssh_on_every_exit() {
|
|||
repository.join("release.sh"),
|
||||
)
|
||||
.expect("release wrapper should be copied");
|
||||
fs::copy(
|
||||
Path::new(env!("CARGO_MANIFEST_DIR")).join("rust-release.toml"),
|
||||
repository.join("rust-release.toml"),
|
||||
)
|
||||
.expect("release configuration should be copied");
|
||||
fs::write(
|
||||
repository.join("Cargo.toml"),
|
||||
"[package]\nname = \"john-slop\"\nversion = \"0.1.27-rc.5\"\n",
|
||||
"[package]\nname = \"john-slop\"\nversion = \"0.1.27-rc.6\"\n",
|
||||
)
|
||||
.expect("manifest should be written");
|
||||
fs::write(repository.join("token.txt"), "test-token\n")
|
||||
|
|
@ -51,6 +58,8 @@ fn release_wrapper_uses_https_then_restores_ssh_on_every_exit() {
|
|||
"#!/bin/sh\n\
|
||||
[ \"$GITEA_TOKEN\" = test-token ] || exit 91\n\
|
||||
git -C \"$1\" remote get-url origin >\"$OBSERVED_ORIGIN\"\n\
|
||||
cat \"$1/rust-release.toml\" >\"$OBSERVED_CONFIG\"\n\
|
||||
printf '%s\\n' \"$@\" >\"$OBSERVED_ARGS\"\n\
|
||||
exit \"$FAKE_RELEASE_STATUS\"\n",
|
||||
)
|
||||
.expect("fake release executable should be written");
|
||||
|
|
@ -72,6 +81,8 @@ fn release_wrapper_uses_https_then_restores_ssh_on_every_exit() {
|
|||
);
|
||||
|
||||
let observed_origin = temporary.path().join("observed-origin.txt");
|
||||
let observed_config = temporary.path().join("observed-config.toml");
|
||||
let observed_args = temporary.path().join("observed-args.txt");
|
||||
let path = format!(
|
||||
"{}:{}",
|
||||
fake_bin.display(),
|
||||
|
|
@ -82,6 +93,8 @@ fn release_wrapper_uses_https_then_restores_ssh_on_every_exit() {
|
|||
.arg("--dry-run")
|
||||
.env("PATH", path)
|
||||
.env("OBSERVED_ORIGIN", &observed_origin)
|
||||
.env("OBSERVED_CONFIG", &observed_config)
|
||||
.env("OBSERVED_ARGS", &observed_args)
|
||||
.env("FAKE_RELEASE_STATUS", release_status.to_string()));
|
||||
|
||||
assert_eq!(output.status.code(), Some(release_status));
|
||||
|
|
@ -89,7 +102,12 @@ fn release_wrapper_uses_https_then_restores_ssh_on_every_exit() {
|
|||
fs::read_to_string(&observed_origin)
|
||||
.expect("fake release should record the temporary origin")
|
||||
.trim(),
|
||||
RELEASE_ORIGIN
|
||||
DEVELOPMENT_ORIGIN
|
||||
);
|
||||
assert_eq!(
|
||||
fs::read_to_string(&observed_config)
|
||||
.expect("fake release should record the project configuration"),
|
||||
RELEASE_CONFIG
|
||||
);
|
||||
assert_eq!(
|
||||
String::from_utf8(git(&repository, &["remote", "get-url", "origin"]).stdout)
|
||||
|
|
@ -97,5 +115,9 @@ fn release_wrapper_uses_https_then_restores_ssh_on_every_exit() {
|
|||
.trim(),
|
||||
DEVELOPMENT_ORIGIN
|
||||
);
|
||||
let arguments = fs::read_to_string(&observed_args)
|
||||
.expect("fake release should record publisher arguments");
|
||||
assert!(arguments.lines().any(|argument| argument == "both"));
|
||||
assert!(arguments.lines().any(|argument| argument == "--prerelease"));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,19 @@ fn workspace_members_and_resolved_versions_are_synchronized() {
|
|||
);
|
||||
}
|
||||
|
||||
let badge = fs::read_to_string("badges/version.svg").expect("version badge must be readable");
|
||||
let temporary = tempfile::tempdir().expect("temporary badge directory must be created");
|
||||
let badge_path = temporary.path().join("version.svg");
|
||||
let output = Command::new("scripts/render-version-badge.sh")
|
||||
.arg(workspace_version)
|
||||
.arg(&badge_path)
|
||||
.output()
|
||||
.expect("version badge renderer must run");
|
||||
assert!(
|
||||
output.status.success(),
|
||||
"version badge rendering failed: {}",
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
);
|
||||
let badge = fs::read_to_string(badge_path).expect("rendered version badge must be readable");
|
||||
assert!(
|
||||
badge.contains(&format!("aria-label=\"version: {workspace_version}\"")),
|
||||
"version badge must advertise workspace version {workspace_version}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue