Skip to content

fix(go): make released modules self-contained - #28

Closed
spencercjh wants to merge 1 commit into
lathe-cli:mainfrom
spencercjh:codex/released-modules-self-contained
Closed

fix(go): make released modules self-contained#28
spencercjh wants to merge 1 commit into
lathe-cli:mainfrom
spencercjh:codex/released-modules-self-contained

Conversation

@spencercjh

@spencercjh spencercjh commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remove the published go-cobra module's repository-local replacement
  • keep Go and Cobra tests inside their module boundaries
  • verify packed modules from a temporary consumer with workspace mode disabled
  • keep the two Go module release versions aligned

Problem

The released Go modules were not fully representative of standalone consumers: go-cobra carried a local ../go replacement, and tests reached outside their module directories. That could let repository-local state hide an incomplete release.

The source-tree Cobra check now copies both modules to a temporary directory and adds a one-off replacement only to that temporary copy. No go.work file or workspace dependency is committed.

Validation

  • node scripts/check.mjs
  • release consumer checks run go list, go test, and build a minimal Cobra program with GOWORK=off
  • GitHub Actions

Stack

This is PR 1 of 3 and is based on main. It is followed by #29 and #30.

Signed-off-by: Spencer Cai <jiahao.cai@dynamia.ai>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bb49f11136

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +20 to +21
cd "$tmp/modules/go-cobra"
GOWORK=off go test ./...

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Test Cobra without requiring the unreleased core tag

When preparing any new version, prepare-release.mjs updates go-cobra/go.mod to require that same, not-yet-published core version and then runs make check; this standalone go test therefore attempts to download the new core module before .github/workflows/release.yml creates its go/vX.Y.Z tag, blocking release preparation. Use the copied core module for this pre-release test, or defer the standalone resolution check until after the core tag is published.

Useful? React with 👍 / 👎.

Comment thread scripts/check.mjs
Comment on lines +334 to +338
[
"source",
"go-test-fixtures",
"node",
["scripts/sync-go-testdata.mjs", "--check"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Record the new parity owner in the architecture map

Adding sync-go-testdata.mjs to the parity gate introduces a new generated Go-fixture synchronization owner, but docs/architecture.mmd still lists only check.mjs · sync-hosts.mjs and does not show the generated Go testdata artifact. Update the canonical map alongside this enforcement change so it continues to document the actual source-to-artifact boundary.

AGENTS.md reference: AGENTS.md:L140-L148

Useful? React with 👍 / 👎.

@spencercjh spencercjh closed this Aug 25, 2026
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