GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mcpx: reproducible man page, single-source version, guard tests for generated artefacts by dezren39 · Pull Request #2537 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Oct 30, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Closes #1895.

What changed

Man page is reproducible. ManPage dated itself with time.Now(), and package.nix runs mcpx man in postInstall — so $out/share/man/man1/mcpx.1 embedded the build day and nix build --rebuild could diff across a UTC midnight. The date now comes from SOURCE_DATE_EPOCH (which nixpkgs exports), falling back to a fixed release date, never the clock.

Version has one literal. ldflags now interpolates ${version} instead of repeating 0.1.0, so package.nix carries the literal once. internal/buildcheck asserts package.nix's version, the ldflags stamp and cmd/mcpx/main.go's default agree — and it keeps the e2e binary (built without ldflags) honest.

Generated artefacts are asserted, per the issue's recommended approach C:

  • completions carry the version they were generated for (mcpx <version> header), matching --version;
  • every Commands() entry appears in the man page and in each of bash/zsh/fish;
  • an e2e test proves the shipped binary's --version, man page header and all three completions agree, with the man date taken from SOURCE_DATE_EPOCH.

Verification

  • go test ./internal/cli/ ./internal/buildcheck/ — pass
  • go test ./internal/e2e/ -run TestBinaryArtefactsNameTheSameVersion — pass
  • go build ./..., go vet on the touched packages — clean; gofmt clean on touched files

Note on the issue's 3B

The issue suggests var version = "dev" so an unstamped binary can never be mistaken for a release. This PR keeps 0.1.0 and makes disagreement a test failure instead, which preserves the e2e binary's version report and still removes the drift: the value is written once in package.nix and checked against main.go. Switching the default to dev is a separate, compatible decision for the release pipeline (#158).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
dezren39 added 2 commits October 29, 2026 21:26
@dezren39
repo-keeper: snapshot code 2026-10-29 21:26 CDT
a49def8
@dezren39
mcpx: reproducible man page, single-source version, guard tests for g…
c4e7c3d
…enerated artefacts

Closes #1895.

- man page: date from SOURCE_DATE_EPOCH, fixed release fallback instead of
  time.Now(), so a pinned Nix build reproduces the page byte for byte.
- version: ldflags now interpolate ${version}, so package.nix carries the
  literal once; internal/buildcheck asserts package.nix, the ldflags stamp
  and cmd/mcpx/main.go agree.
- generated artefacts are now asserted: man page and all three completions
  carry the version, every Commands() entry appears in each of them, and an
  e2e test proves the shipped binary's --version, man page and completions
  agree.
@dezren39
dezren39 requested a review from a team as a code owner October 30, 2026 03:06
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 34410d0a-8941-42d2-82d0-7c0f4cba8870
Commits

Reviewing files that changed from the base of the PR and between 7d1b081 and eb79a58.

Files selected for processing: 9
  • bin/sessions.json
  • pkgs/mcpx/internal/buildcheck/version_test.go
  • pkgs/mcpx/internal/cli/completion.go
  • pkgs/mcpx/internal/cli/completion_test.go
  • pkgs/mcpx/internal/cli/generated_artefacts_test.go
  • pkgs/mcpx/internal/cli/manual.go
  • pkgs/mcpx/internal/cli/root.go
  • pkgs/mcpx/internal/e2e/artefacts_test.go
  • pkgs/mcpx/package.nix
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T03:09:37.857354Z c4e7c3d PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 30, 2026
View reviewed changes

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

Copy link
Copy Markdown

There was a problem hiding this comment.

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: c4e7c3d468

ℹ️ 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".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/package.nix
"-s"
"-w"
"-X main.version=0.1.0"
"-X main.version=${version}"

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 30, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P1 Badge Bind version before interpolating it into ldflags

The argument to buildGo127Module is a non-recursive attribute set, so its version attribute is not in lexical scope for ${version}. There is also no enclosing let binding or function argument named version. Consequently, evaluating the mcpx package through pkgs/default.nix fails with an undefined-variable error, preventing the Nix package from building. Bind the version in an enclosing let, use a recursive attribute set, or use the builder's final-attributes form before referencing it here.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Oct 30, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in eb79a58: version is now bound once in an enclosing let and inherited into the derivation, so ${version} in ldflags resolves. Verified: nix eval .#packages.x86_64-linux.mcpx.version returns the version and the derivation instantiates (previously undefined-variable), and go test ./internal/buildcheck/ passes — the literal still appears exactly once in package.nix.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39 dezren39 mentioned this pull request Oct 30, 2026
mcpx: the nix derivation's generated man page, completions and version are unverified, and one of them is not reproducible #1895
Closed
@github-actions github-actions Bot assigned dezren39 Oct 30, 2026
@dezren39
mcpx: bind version in a let so ldflags interpolation evaluates (#1895)
eb79a58
The buildGo127Module argument is a non-recursive attribute set, so
${version} in ldflags had no binding in scope and evaluating the
package failed with an undefined-variable error (Codex P1 on #2537).
Bind version once in an enclosing let and inherit it into the
derivation; the literal still appears exactly once, so the
internal/buildcheck single-source guard still passes, and
nix eval .#packages.x86_64-linux.mcpx.version now returns the version
and the derivation instantiates.
@dezren39
dezren39 merged commit 2eddd32 into main Oct 30, 2026
7 of 9 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/3140-1895-mcpx-reproducible-man-version-guards branch October 30, 2026 04:31
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 1 follow-up: rebase-and-merge queue for 90 blocked PRs (batches A–H) #13903
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

mcpx: the nix derivation's generated man page, completions and version are unverified, and one of them is not reproducible

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.