Repository navigation
fix(release): enforce ASF source candidate compliance - #3999
Conversation
jackwener
left a comment
There was a problem hiding this comment.
Approving the implementation. Here is what I checked, and what I deliberately did not.
Verified
- Path handling is safe before extraction.
validateArchiveEntriesrejects absolute paths, backslashes, and./..segments, and it runs beforevalidateArchiveContentsunpacks anything. So the new full-archive extraction cannot be steered outside its temporary directory. Entry types are then restricted to regular files and directories, which refuses symlinks and device nodes. - The text allowlist is fitted to this repository rather than guessed. Across all 3,167 tracked files, only two groups fall outside
textSourceExtensions/textSourceBasenames: 64.pngfiles and one.sqlitefixture. Every one of those that can reach an archive is matched by a pattern in the new inventory. The 14.pngfiles the inventory does not match all live under.maka-shots/, which is bothexport-ignored and listed inforbiddenSegments, so they cannot enter a candidate. - The whole-file scan for ZIP magic produces no false positives on the current tree. I ran it across all 65 binary files; none contains
PK\x03\x04,PK\x05\x06, orPK\x07\x08. - Gate routing behaves as the description claims.
planTestsselectsasfSourcefor this diff, and a change todocs/code-origin-audit.mdon its own selects the ASF source gate without pulling in the full code lane. - Tests pass.
node --test scripts/asf-source-release.test.mjsgives 32 of 33 passing on my machine. The one failure iscreates reproducible candidates from committed files only, and it fails only becausegpgis not installed here, not because of anything in this change. CI is green on85f8f2da3.
Two things that will trip later — neither blocks this PR
1. Both allowlists are finite and compared as exact strings. knownNonCategoryXLicenses matches license text literally, so MIT OR Apache-2.0 passes but Apache-2.0 OR MIT does not, and (MPL-2.0 OR Apache-2.0) is listed with parentheses while MIT OR Apache-2.0 is listed without them. The first dependency that arrives with a well-formed but unlisted SPDX expression will stop a release until someone edits that set. The same is true of textSourceExtensions: adding an ordinary Makefile, .xml, or .editorconfig will fail the verifier. Both fail closed and fail loudly, which is the right direction. I would only ask that docs/code-origin-audit.md say where to add the new value when this happens, so whoever hits it at release time is not left guessing.
2. The verifier reads its own allowlist out of the candidate it is verifying. docs/code-origin-audit.md is both the inventory and an archived file. That is self-referential, and I think it holds up: archive integrity comes from the detached signature and the SHA-512, not from the inventory, and the magic-byte checks run before the inventory and independently of it, so listing a path cannot be used to smuggle an executable. I raise it so the property is written down rather than rediscovered later.
One inconsistency worth resolving
The description says "This is intentionally a draft until a human contributor reviews the archive boundary...", but this pull request is not marked as a draft. Please either restore draft status or update that paragraph, so the stated intent and the actual state agree.
What this approval does not cover
I reviewed the code. I am not signing off on the release and legal judgments your description asks a human to make: the archive boundary, the finite non-Category-X classification, the npm lock and workspace assumptions, and the contents of the provenance inventory. Those still need a human committer.
Posted by an automated review agent operated by @jackwener. This is not an
independent human review and does not satisfy the committer review required by
CONTRIBUTING.md. A human is accountable for this comment — please push back if
anything here is wrong.
简体中文
本条评论由 @jackwener 运行的自动化审查程序发出。它不构成 CONTRIBUTING.md
所要求的独立人类审查,也不能替代人类审查。有人类对本条评论负责,如有错误请直接指出。
8f5a8c5 to
3dc6c04
Compare
Exclude the DeepSeek Harness runtime toolchain from ASF source archives and make candidate verification fail closed over nested npm licensing and non-text inputs. Generated-by: Codex
Document that the optional DeepSeek Harness runtime toolchain can only be built from a complete Git checkout, and bind the retained profile inputs to the source archive contract. Generated-by: Codex
Allow unlicensed private source configurations only when they declare no dependencies or their direct dependency closure is backed by a classified sibling npm lockfile. Generated-by: Codex
Bind manifest dependencies and workspace links to npm lock provenance, trust only the generated notice inventory, reject ambiguous archive paths and binary formats, and route provenance edits through the ASF source gate. Generated-by: Codex
3dc6c04 to
ddf34fa
Compare
Summary
Make
apache-maka-0.2.0-incubating-src.tar.gzthe enforcement boundary for source-candidate compliance.scripts/asf-source-release.mjs, the release workflow, legal documents, generated notices, anddocs/code-origin-audit.mdas the existing authorities rather than adding a parallel scannerRefs #2974
Verification
TDD red/green coverage includes:
Ran on Node 24 with the repository npm toolchain:
npm run check:asf-source— 92 passednode --test scripts/ci-test-plan.test.mjs— 44 passedapache-maka-0.2.0-incubating-src.tar.gzfrom commitddf34fa2bbb31c185297f5dfe103b8c4fa76b033141c2350e924f492ba3af6683628c88a6b284afe8c112a3665f141373c631e60b264b7ea24b5e6e90bc9ac31895b99119362c1a19afa70119595ef2d0305263cnpm ci, generated npm/CLI notice checks, full workspace build/typecheck, andcheck:asf-sourcepassednpm --workspace @maka/eval run test:distpassed 75 Node tests and 74 Python tests; 6 environment-specific Python tests skippednpm run lintchecked 2,829 files andnpm run format:checkchecked 1,703 filesNot run: the full repository
npm test; CI owns the full test matrix.Review focus
This PR is ready for review. Its finite license and text-source allowlists intentionally fail closed: a new valid SPDX expression or source format requires an explicit reviewed update rather than being accepted implicitly. The provenance inventory is itself part of the signed candidate, while compiled/archive magic is rejected before that inventory can authorize a path.
The current automated approval covers the implementation but is not an independent human committer review and does not approve the release/legal judgments. A human committer still needs to review the archive boundary, the finite non-Category-X classification, npm lock/workspace assumptions, and the provenance inventory. Human maintainers retain sole authority to approve, merge, select an RC, sign, stage, or vote on a release.
AI use
Select exactly one:
Tool(s) and scope: OpenAI Codex authored the implementation, tests, documentation/provenance updates, adversarial-review fixes, and this PR description; it also ran the local candidate-bound verification described above. A human contributor must review the code and release/legal judgments and is solely responsible for approval and merge.
Checklist
Does this PR entail a change in behavior?