Repository navigation
fix(release): check notices against actual distributed components - #6523
Conversation
Replace whole-source fingerprints with reviewed component and license-data digests. Reuse Cargo metadata and actual bundle inputs so business edits preserve coverage and newly bundled locked packages require review. Join Cargo build output by package identity and verify the completed product before packing. Preserve pinned license sources, target-union coverage and the unchanged notice document. Generated-by: Codex
Astro-Han
left a comment
There was a problem hiding this comment.
Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.
I reviewed the final 11-file diff at 2c2b3c6a3f4d01bea9a9594e0cbdc5cfab0938b8, including the component collector, reviewed-catalog format, Cargo build-output handoff, release ordering, all changed tests and command documentation.
The verifier now recomputes component identities and license-data digests from the target's Cargo dependency closure and actual product bundle inputs. It checks the reviewed notice document digest, rejects unreviewed or changed components and conflicting installed license data, and allows a reviewed platform union to cover a smaller target. cargo.mjs joins build-script output to the executable by package ID; packaging validates the bundle produced by that build before assembling the package. I found no confirmed P0–P2 defect in the inspected source.
Executed locally: three existing notice behavior tests pass, covering first-party source edits versus a newly bundled locked package, license/source/integrity/supplement changes, platform subsets and conflicting installed duplicates. Cargo metadata is mocked by those tests. Eight existing build/launcher tests also pass, covering artifact selection, unrelated build-script output, staging and process failures/signals. I explicitly excluded the notice test that performs a real Cargo build because this machine has no Cargo toolchain; I did not run the standalone product bundler or native packaging.
Separately, I reconstructed the exact #6520 follow-up 9341667e5105d19648df29166e27c4d7b336d1d8 and ran its unchanged production source-fingerprint verifier successfully. Only five manifest entries changed from a2b7d44a; source and notice-document bytes are unchanged. This closes my earlier fingerprint P2 findings in #6517/#6520. It is not a full acceptance of the storage migration or settings UI.
The subsequent merged Rust d513a72e updates the CUA component entries and source URLs. Its completed product worker in run 41277034369 executes the actual new notices.mjs check successfully. That is hosted evidence, not my independent native build. The overall run and the separate PR run remain in progress at this check. I did not reproduce the author's real Cargo/TSX counterexamples, full inventory generation or complete native release build.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
The exact-head run 41275068547 has finished: 1,980 passed, one failed, 26 skipped. The failure is the existing A later completed
|
Summary
A business-only SDK edit invalidated the notice snapshot, while importing an existing locked package from an untracked TSX file could add shipped code without failing the same check. Replace the 2,931 whole-source fingerprints with 1,361 reviewed component identities and independently recomputed license-data digests. The 2,681,462-byte notice document is byte-identical.
Generation and checking share the Cargo dependency-closure and actual JavaScript bundle-owner collectors. Component identity includes source provenance; license data includes declarations, authors used in the notice, all discovered local license files and supplement references. Conflicting installed copies fail. Existing pinned-license and Playwright source checks remain.
Native packaging consumes
bundle-inputs.jsonfrom the actual Cargo build script, joined to the executable by package ID. Verify the current target's components after building and before packing; the reviewed catalog can cover other platforms. Standalonenotices checkbuilds a temporary product bundle, clears ambient UI-cache selection and does not download license texts. It does not build the complete native CLI.Verification
scripts/rust/*.test.mjstests pass, including source-only edits, newly bundled locked components, source/integrity/license/supplement changes, target subsets and conflicting installed duplicates.semver@7.8.5: REJECTED as required, with unchanged lockfiles. Probe changes were restored.git diff --checkand pre-commit checks pass.A complete native CLI/V8 release build was not run. Standalone checking now needs the UI compiler/product bundle to establish actual component coverage; release packaging reuses its already built product and does not run a second bundler.
Review focus
notices.mjsowns one component/licensing collector for generation and validation; the old glob/hash model and its source-change rejection test are removed.cargo.mjs,build-cli.mjs,product.mjsandrelease-cli.mjsmigrate the artifact handoff together, without retaining a string-return compatibility path.Diff: 11 files, +1968/−3276 (net −1308), including generated catalog reduction. Runtime tooling changes net +27 lines; tests net +231 lines. English/Chinese command documentation describes component coverage and the standalone build cost.
AI use
Codex authored the refactor, tests and validation; a dedicated GPT-6-astra high advisor performed read-only design and final reviews. The commit retains
Generated-by: Codex.Checklist
The new notice tests depend on the component model and artifact contract; old source-fingerprint behavior was separately reproduced with the real semver counterexample before this refactor. A baseline red-run of the entire new suite is not claimed.
Does this PR entail a change in behavior?