Skip to content

ci: verify dependency license evidence - #36

Merged
AlexStocks merged 3 commits into
mainfrom
codex/wp0-license-dependencies
Aug 29, 2026
Merged

ci: verify dependency license evidence#36
AlexStocks merged 3 commits into
mainfrom
codex/wp0-license-dependencies

Conversation

@AlexStocks

@AlexStocks AlexStocks commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add release licenses, which reads a built binary's actual Go build info and verifies top-level license/notice evidence for every linked module
  • serialize the bounded manifest with the Go 1.27 encoding/json/v2 API and report module/native dependency counts without local paths
  • add an idempotent make license-dependencies target for the standard binary
  • add a stable license-dependencies CI job with explicit SQLite development headers and a 14-day evidence artifact
  • add a real-binary regression test and extend the workflow topology contract

Rationale

WP0-C in #3 requires dependency-license evidence before release packaging. The repository already uses collectLicenses during release archive creation; this change exposes that implementation for ordinary pull requests instead of adding a second license scanner.

The portable SDK prerequisite landed on main through #35. This branch was rebuilt directly on the current main Head so the obsolete #34 stack and its conflict are no longer part of the pull request.

Behavior, API, and compatibility

  • no public API, protocol, generated-contract, persistence, or runtime behavior changes
  • fails when a module referenced by the built standard binary is unavailable in the Go module cache or lacks a top-level license/notice file
  • standard evidence includes the embedded sqlite-vec license; Full native assets remain validated through the release packaging path
  • the uploaded manifest contains module identities, license filenames, and hashes, but no local checkout or module-cache paths

Validation

  • targeted red/green proof for the release inventory entry point and CI topology contract
  • go test -count=1 ./tools/release
  • go test -count=1 ./...
  • go vet ./tools/release
  • make license-dependencies twice in LF Linux; both manifests were byte-identical with 95 Go modules and 1 native dependency
  • make check-generated
  • make check
  • make lint (0 issues)
  • make license-check
  • go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12
  • git diff --check

Exact PR Head validated locally: 2525fb25ac12dd1c9a931333d7c180a526ddbf7f.

AI usage

Implemented and reviewed with Codex assistance. The new test was checked against test-guard, and the final commit was revalidated in a clean LF Linux clone.

@AlexStocks
AlexStocks force-pushed the codex/wp0-portable-sdk branch from 297fb67 to eac7fbd Compare August 28, 2026 10:57
@AlexStocks
AlexStocks force-pushed the codex/wp0-license-dependencies branch from ec76fde to 10e9c86 Compare August 29, 2026 05:15
@AlexStocks
AlexStocks changed the base branch from codex/wp0-portable-sdk to main August 29, 2026 05:15
AlexStocks and others added 3 commits August 29, 2026 13:54
Rebuild the stale stacked change on current main, expose the existing release license collector as a CI entry point, and keep the evidence bounded and deterministic. Use Go 1.27 encoding/json/v2 for the new JSON surface and provision SQLite headers explicitly in the independent job.

Constraint: Keep the change limited to release tooling, CI topology, documentation, regression coverage, and the required learned rule.

Rejected: Retaining the rewritten stacked base, duplicating the license scanner, or relying on preinstalled SQLite headers.

Confidence: High.

Scope-risk: No public API, protocol, persistence, generated contract, or runtime behavior changes.

Tested: Targeted red-green release tests, go vet ./tools/release, git diff --check, and two identical Linux real-binary license manifests with 95 Go modules and 1 native dependency.

Not-tested: Full Windows release tests because Windows does not preserve Unix executable mode and the standard CGO build is not a supported Windows binary contract.

Co-authored-by: OmX <omx@oh-my-codex.dev>
GitHub did not create check suites when the branch force-update and base retarget occurred together. Add a tree-identical synchronization commit so every pull-request workflow evaluates the rebuilt branch instead of leaving a zero-check evidence gap.

Constraint: Keep the source tree identical to 10e9c86.

Rejected: Treating zero exact-Head runs as green or rerunning workflows bound to the obsolete ec76fde Head.

Confidence: High.

Scope-risk: Commit metadata only; no file content changes.

Tested: The parent tree passed clean-LF Linux release, full Go, generated, lint, vet, license, and actionlint gates.

Not-tested: Exact-Head GitHub Actions are pending this synchronization event.

Co-authored-by: OmX <omx@oh-my-codex.dev>
Name the directory-creation and manifest-write failures by operation so the pinned govet shadow policy no longer treats them as redeclarations of the function's retained error value. Record the reusable prevention rule in the repository engineering contract.

Constraint: Change only the two shadowing declarations and the required learned rule.

Rejected: Disabling govet shadow, adding a lint waiver, or broad refactoring of release error handling.

Confidence: High.

Scope-risk: Error names only; observable success and failure behavior is unchanged.

Tested: Reproduced two govet shadow diagnostics, then passed the targeted release inventory test, go vet ./tools/release, and git diff --check.

Not-tested: Exact-Head GitHub Actions require the updated commit.

Co-authored-by: OmX <omx@oh-my-codex.dev>
@AlexStocks
AlexStocks force-pushed the codex/wp0-license-dependencies branch from 0a56609 to 2525fb2 Compare August 29, 2026 06:00
@AlexStocks
AlexStocks merged commit 976b101 into main Aug 29, 2026
28 checks passed
@AlexStocks
AlexStocks deleted the codex/wp0-license-dependencies branch August 29, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant