Skip to content

Say that a git-derived version stamp is lost unless stamped - #50

Open
anakanemison wants to merge 1 commit into
mschaller/u14-configure-step-strategiesfrom
mschaller/u15-version-stamp
Open

anakanemison wants to merge 1 commit into
mschaller/u14-configure-step-strategiesfrom
mschaller/u15-version-stamp

Conversation

@anakanemison

@anakanemison anakanemison commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

A version derived from the repository (git describe, a commit hash) is lost under Bazel unless it goes through workspace status, and the action graph cannot tell. "Create initial BUILD.bazel files" now names the failure and the mechanism: --workspace_status_command and a stamped genrule.

In any2bazel-lab, both OpenTTD migrations, with and without the skill, produced a binary reporting "norev0000" while reporting success. In the later OpenTTD run with this change, the binary reported the revision.

Stacked on #49 (tracking issue: #35). pytest tests/: 186 passed (132 on main). Lab proposal: P19.

🤖 Generated with Claude Code

A project that derives its version from the repository at configure or
build time (git describe, a commit hash, a build date) loses it under
Bazel unless the migration wires it through workspace status: a genrule
cannot see .git from the sandbox, the generator still runs on both sides,
and the output has the same shape, so the action graph cannot tell.

Measured in any2bazel-lab: both OpenTTD migrations, with
and without the skill, produced a binary reporting "norev0000", "unknown"
and 1970, the project's own fallbacks for "no git information", while
reporting success; the skill-guided one printed CONVERGED errors=0
warnings=0. Other migrations kept the version (a Bitcoin Core one through
--workspace_status_command and a stamp = 1 genrule, as did a pono one), so
it is not a capability gap: nothing in the procedure asks for it.

Adds one paragraph to "Create initial BUILD.bazel files": the failure mode
and the Bazel mechanism that preserves the value. The byte comparison that
catches its absence is the one the convergence-boundary list already asks
for on every generated file.

In the lab's later OpenTTD run with this change, the binary reported the
revision, through --workspace_status_command.

Lab-Proposal: P19

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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