aeoptimize 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +8 -0
- package/README.md +2 -2
- package/dist/cli/index.js +1 -1
- package/docs/release-v0.6.md +11 -10
- package/examples/github-action-sample/.github/workflows/aeoptimize.yml +1 -1
- package/examples/github-action-sample/README.md +1 -1
- package/package.json +3 -2
- package/scripts/verify-publish-source.sh +25 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable user-visible changes will be documented here. The project follows Semantic Versioning after the v0.6 evidence baseline is released.
|
|
4
4
|
|
|
5
|
+
## 0.6.2
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Added a fail-closed publish source gate that requires `HEAD` to match the fetched `origin/main` commit before npm publication.
|
|
10
|
+
- Prepared a corrective release after npm 0.6.1 exposed the pre-squash PR commit as `gitHead`; the verified package contents were correct, but the release provenance did not match the merged commit.
|
|
11
|
+
- Kept scoring rules, output contracts, and runtime behavior unchanged.
|
|
12
|
+
|
|
5
13
|
## 0.6.1
|
|
6
14
|
|
|
7
15
|
### Fixed
|
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ node -e "const r=require('./aeoptimize-report.json'); process.exit(r.overall.tot
|
|
|
64
64
|
The v0.6 GitHub Action is advisory by default. It reports findings without blocking the workflow:
|
|
65
65
|
|
|
66
66
|
```yaml
|
|
67
|
-
- uses: cucuwang/aeoptimize@v0.6.
|
|
67
|
+
- uses: cucuwang/aeoptimize@v0.6.2
|
|
68
68
|
with:
|
|
69
69
|
path: dist
|
|
70
70
|
```
|
|
@@ -72,7 +72,7 @@ The v0.6 GitHub Action is advisory by default. It reports findings without block
|
|
|
72
72
|
Projects can explicitly choose blocking mode after accepting a baseline:
|
|
73
73
|
|
|
74
74
|
```yaml
|
|
75
|
-
- uses: cucuwang/aeoptimize@v0.6.
|
|
75
|
+
- uses: cucuwang/aeoptimize@v0.6.2
|
|
76
76
|
with:
|
|
77
77
|
path: dist
|
|
78
78
|
fail-on-low-score: 'true'
|
package/dist/cli/index.js
CHANGED
|
@@ -13,7 +13,7 @@ const program = new Command();
|
|
|
13
13
|
program
|
|
14
14
|
.name('aeoptimize')
|
|
15
15
|
.description('Deterministic content-readiness lint for websites and documentation')
|
|
16
|
-
.version('0.6.
|
|
16
|
+
.version('0.6.2');
|
|
17
17
|
// ── scan command ───────────────────────────────────────────────────
|
|
18
18
|
program
|
|
19
19
|
.command('scan <target>')
|
package/docs/release-v0.6.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# v0.6 release and rollback guide
|
|
2
2
|
|
|
3
|
-
Version 0.6.
|
|
3
|
+
Version 0.6.2 is the provenance-corrective release for the v0.6 evidence-bounded scoring, packaging, and GitHub Action contracts. npm 0.6.1 contained the verified candidate bytes but exposed the pre-squash PR commit as `gitHead`, so no v0.6.1 Git tag or GitHub Release was created. Version 0.6.2 is not released until npm, the Git tag, and the GitHub Release are each created and read back independently.
|
|
4
4
|
|
|
5
5
|
## Release acceptance
|
|
6
6
|
|
|
@@ -11,9 +11,9 @@ Before publication, run `npm ci` and `npm run release:check` from the intended r
|
|
|
11
11
|
3. An actual `npm pack` candidate contains the required public files, its SHA-256 is recorded, and a clean consumer can invoke `aeoptimize`, `aeo`, and `aeo-cli` from that exact tarball.
|
|
12
12
|
4. CI succeeds on Node.js 22 and 24 for the release commit.
|
|
13
13
|
5. The JSON automation contract and Action sample tests pass.
|
|
14
|
-
6. The npm account is verified immediately before publishing.
|
|
14
|
+
6. The npm account is verified immediately before publishing, and the publish source gate confirms that `HEAD` is the exact fetched `origin/main` commit.
|
|
15
15
|
|
|
16
|
-
CI runs the same candidate gate on Node.js 22 and 24 and compares version, filename, SHA-256, file count, and unpacked size. `prepublishOnly` invokes the candidate gate again
|
|
16
|
+
CI runs the same candidate gate on Node.js 22 and 24 and compares version, filename, SHA-256, file count, and unpacked size. `prepublishOnly` invokes the candidate gate again, refuses a dirty worktree, and refuses publication unless `HEAD` matches `origin/main` exactly. Run `git fetch origin main` immediately before the authorized publish so the remote-tracking ref is current.
|
|
17
17
|
|
|
18
18
|
Publishing, tagging, creating a GitHub Release, changing npm dist-tags, and deprecating a version are separate external mutations and require separate maintainer authorization.
|
|
19
19
|
|
|
@@ -25,6 +25,7 @@ Publishing, tagging, creating a GitHub Release, changing npm dist-tags, and depr
|
|
|
25
25
|
- Require byte-identical candidate manifests from Node.js 22 and 24 before the release can proceed.
|
|
26
26
|
- Bind the public verifier's CLI smoke checks to the downloaded, hash-verified npm tarball.
|
|
27
27
|
- Fail closed when a CLI alias, tag target, repository identity, or GitHub Release state does not match.
|
|
28
|
+
- Fail closed before publication when the checked-out commit differs from the fetched `origin/main` commit.
|
|
28
29
|
- Exercise every v0.6 rule fixture through the real HTML parser boundary.
|
|
29
30
|
|
|
30
31
|
No scoring rule, rule weight, JSON field, Action input, or Action output changes in this patch. No ranking, traffic, indexing, rich-result, AI Overview, or citation outcome is claimed by this release.
|
|
@@ -35,16 +36,16 @@ After an authorized npm publication:
|
|
|
35
36
|
|
|
36
37
|
```bash
|
|
37
38
|
npm view aeoptimize version dist-tags --json
|
|
38
|
-
npm view aeoptimize@0.6.
|
|
39
|
-
consumer_root=$(mktemp -d "${TMPDIR:-/tmp}/aeoptimize-v0.6.
|
|
40
|
-
npm install --prefix "$consumer_root" aeoptimize@0.6.
|
|
39
|
+
npm view aeoptimize@0.6.2 version gitHead repository homepage bugs dist --json
|
|
40
|
+
consumer_root=$(mktemp -d "${TMPDIR:-/tmp}/aeoptimize-v0.6.2-consumer.XXXXXX")
|
|
41
|
+
npm install --prefix "$consumer_root" aeoptimize@0.6.2
|
|
41
42
|
"$consumer_root/node_modules/.bin/aeoptimize" --version
|
|
42
43
|
"$consumer_root/node_modules/.bin/aeo" --version
|
|
43
44
|
"$consumer_root/node_modules/.bin/aeo-cli" --version
|
|
44
45
|
rm -rf -- "$consumer_root"
|
|
45
46
|
```
|
|
46
47
|
|
|
47
|
-
After separately authorized tag and GitHub Release creation, verify that `v0.6.
|
|
48
|
+
After separately authorized tag and GitHub Release creation, verify that `v0.6.2` points to the tested release commit and that the Release is published rather than draft or prerelease.
|
|
48
49
|
|
|
49
50
|
The fail-closed public verifier checks npm `latest`, the exact version, public repository identity, the downloaded tarball SHA-256, all three installed CLI aliases, the tag target, and the published GitHub Release. The tarball hash is the required artifact-identity gate. If npm exposes `gitHead`, it must match the expected release commit; absence is reported as informational because npm's publish contract guarantees tarball integrity but does not guarantee that metadata field.
|
|
50
51
|
|
|
@@ -56,11 +57,11 @@ bash scripts/verify-release-v0.6.sh <verified-release-commit> <verified-package-
|
|
|
56
57
|
|
|
57
58
|
An npm dist-tag rollback changes what `npm install aeoptimize` selects; it does not remove exact-version installs. Never silently move an existing Git tag to different code.
|
|
58
59
|
|
|
59
|
-
If npm 0.6.
|
|
60
|
+
If npm 0.6.2 is unsuitable, request separate authorization for each mutation and restore `latest` to the last fully released version rather than the provenance-mismatched 0.6.1 artifact:
|
|
60
61
|
|
|
61
62
|
```bash
|
|
62
63
|
npm dist-tag add aeoptimize@0.6.0 latest
|
|
63
|
-
npm deprecate aeoptimize@0.6.
|
|
64
|
+
npm deprecate aeoptimize@0.6.2 "Use 0.6.0 until the corrective release is available."
|
|
64
65
|
```
|
|
65
66
|
|
|
66
|
-
Mark the GitHub Release with the same warning.
|
|
67
|
+
Mark the GitHub Release with the same warning. Never create or retarget `v0.6.1` merely to mask its npm `gitHead` mismatch. Preserve immutable versions as evidence, fix forward in 0.6.3, rerun the complete release acceptance suite, and only then move npm `latest` to the corrective version.
|
|
@@ -6,4 +6,4 @@ This directory is a copyable end-to-end sample for the v0.6 Action contract.
|
|
|
6
6
|
- `site/index.html` is a deterministic public input.
|
|
7
7
|
- The Action is advisory by default. The sample does not block a pull request on an unreviewed score threshold.
|
|
8
8
|
|
|
9
|
-
The workflow becomes reproducible only after both `aeoptimize@0.6.
|
|
9
|
+
The workflow becomes reproducible only after both `aeoptimize@0.6.2` exists on npm and the immutable `v0.6.2` Git tag points to the matching release commit. Until both artifacts exist, use the local CLI or the release-candidate package during controlled verification.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aeoptimize",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Deterministic content-readiness lint for static websites and documentation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/core/index.js",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"fixtures/",
|
|
22
22
|
"examples/github-action-sample/",
|
|
23
23
|
"scripts/verify-release-candidate.sh",
|
|
24
|
+
"scripts/verify-publish-source.sh",
|
|
24
25
|
"scripts/verify-release-v0.6.sh",
|
|
25
26
|
".claude-plugin/",
|
|
26
27
|
"docs/methodology.md",
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
"dev": "tsc --watch",
|
|
40
41
|
"test": "vitest run",
|
|
41
42
|
"test:watch": "vitest",
|
|
42
|
-
"prepublishOnly": "npm run release:check"
|
|
43
|
+
"prepublishOnly": "npm run release:check && bash scripts/verify-publish-source.sh"
|
|
43
44
|
},
|
|
44
45
|
"keywords": [
|
|
45
46
|
"aeo",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -u
|
|
3
|
+
|
|
4
|
+
if ! command -v git >/dev/null 2>&1; then
|
|
5
|
+
echo "missing required command: git" >&2
|
|
6
|
+
exit 2
|
|
7
|
+
fi
|
|
8
|
+
|
|
9
|
+
if ! head_commit=$(git rev-parse --verify HEAD 2>/dev/null); then
|
|
10
|
+
echo "publish source gate: HEAD is unavailable" >&2
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
if ! main_commit=$(git rev-parse --verify refs/remotes/origin/main 2>/dev/null); then
|
|
15
|
+
echo "publish source gate: origin/main is unavailable; run git fetch origin main" >&2
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
if [ "$head_commit" != "$main_commit" ]; then
|
|
20
|
+
echo "publish source gate: HEAD is $head_commit; expected origin/main $main_commit" >&2
|
|
21
|
+
echo "fetch origin/main and publish from its exact commit" >&2
|
|
22
|
+
exit 1
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
echo "Publish source gate passed: HEAD matches origin/main at $head_commit."
|