Skip to content

release: version the product as 0.1.0 with a traceable build identity - #88

Merged
TusanHomichi merged 3 commits into
mainfrom
claude/86-versioning
Oct 14, 2026
Merged

TusanHomichi merged 3 commits into
mainfrom
claude/86-versioning

Conversation

@TusanHomichi

Copy link
Copy Markdown
Member

Primary Issue

Refs #86. The last acceptance item, tagging v0.1.0 after merge, happens once the release's contents (#85, #87) are on main, so the issue stays open until then.

Problem And Outcome

Every surface reported 0.0.0, so a running binary could not be traced to source (docs/preview.md said so). After this PR the product is 0.1.0 with one source of truth. Every surface shows version and commit, and a guard fails the gates when the web package or the changelog drifts from the Cargo version.

Changes

  • ADR 0022 (docs/decisions/0022-product-versioning.md):
    • SemVer, pre-1.0 (minor = capability, migration, or operator action; patch = fixes and presentation).
    • 1.0.0 is reserved for the Milestone 6 production-readiness decision.
    • Format, record-schema, and migration versions keep their own contracts.
    • The Cargo workspace version is the single source.
    • Build identity is version plus commit; tags are vX.Y.Z on main and never move.
  • Version:
    • [workspace.package] version = "0.1.0"; the crate inherits it.
    • web/package.json and its lockfile set via npm version; Cargo.lock updated.
  • Build identity:
    • build.rs records CONSOLEBOOK_BUILD_COMMIT: the pinned value from the environment for release builds, otherwise HEAD via git rev-parse --git-path (correct in worktrees), otherwise unknown.
    • lib.rs exposes BUILD_COMMIT and BUILD_IDENTITY.
    • --version prints consolebook 0.1.0 (0bc201f22fdf). /api/instance and /api/health add commit. The startup log adds commit. The footer shows 0.1.0 (commit).
  • Guard (tests/release_version.rs): the version is MAJOR.MINOR.PATCH; web/package.json and both lockfile fields equal it; CHANGELOG.md has a ## [VERSION] section; BUILD_IDENTITY is consistent. The existing health and instance tests now also assert commit.
  • Docs: CHANGELOG.md (0.1.0) and docs/releasing.md (bump, changelog, PR, tag). The preview runbook, development index, and README point to them.
  • Hygiene: removes scripts/__pycache__/proof.cpython-313.pyc, which chore(proof): run the documented gates and leave a receipt #82 committed by mistake, and ignores __pycache__/.

Correction rung: 2 (mechanical). Version drift fails cargo test, and an ignore rule keeps bytecode out of the tree.

Scope

Verification

  • Candidate revision: 0bc201f (clean tree)
  • Local full gates passed: all 7 steps, with the permission-bypass capabilities dropped and system Chromium 141. Tree 44857bd0855c18e4f4f1b6a2ace6352532443432; receipt.json sha256 7d27b8d8fb4176529ec8654c2d891435b2c1e2035ee6837d9892ecc7ce4901c7.
  • target/debug/consolebook-server --version prints consolebook 0.1.0 (0bc201f22fdf).
  • Guard negative control: with web/package.json set to 0.1.1, release_version fails: assertion left == right failed: web/package.json version, left: "0.1.1", right: "0.1.0". Restored, 4/4 pass.
  • Hosted pr-gate: pending.
  • Added or updated tests when behavior changed
  • Added an ADR for the durable decision (0022)
  • All fixtures and examples are invented

Review And Merge Notes

  • Review focus:
    • The ADR's bump rules, and the relation to format versions.
    • build.rs rerun triggers: a new commit must rebuild the identity, while an unchanged checkout must not rebuild each time.
  • Merge order: after web: make the everyday screens usable and presentable #85. Both touch +layout.svelte in separate hunks; a trial merge resolves automatically.
  • Review performed: self-review only.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts


Generated by Claude Code

Every surface reported 0.0.0, so a running binary could not be traced to
source. ADR 0022 adopts Semantic Versioning, pre-1.0, with the Cargo
workspace version as the single source; web/package.json and its lockfile
mirror it, and CHANGELOG.md must carry a section for it.
tests/release_version.rs fails the gates when any of them drift.

build.rs records the source commit (CONSOLEBOOK_BUILD_COMMIT when a
release build pins it, otherwise HEAD, otherwise "unknown"). --version
and the startup log show "VERSION (COMMIT)"; /api/instance and
/api/health report version and commit; the footer shows both.

docs/releasing.md holds the bump, changelog, and tag procedure; the
preview runbook and development index point to it.

Refs #86

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
#82 swept scripts/__pycache__/proof.cpython-313.pyc into the tree with
`git add -A` after the script had been imported for testing. Remove it
and ignore __pycache__/ so the class cannot recur (rung 2: the ignore
rule makes it unstageable by default).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

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-14T17:24:48.350729Z 5b4058e New commits
ℹ️ 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.

@TusanHomichi
TusanHomichi merged commit 37e5477 into main Oct 14, 2026
1 check passed
@TusanHomichi
TusanHomichi deleted the claude/86-versioning branch October 14, 2026 17:44

Copy link
Copy Markdown
Member Author

Merged as 37e5477.

Verification on the merged head 5b4058e (this branch plus main with #85):

  • Local full gates passed, 7/7, with the permission-bypass capabilities dropped and system Chromium; 57 e2e passed. Clean tree; receipt sha256 dc26c6963365cb044a142e805a91fde9f2aaaec974a48e32d9eff6363049159d.
  • Hosted fmt-clippy-test passed on 5b4058e.
  • main's tree after the merge (30233797d8da) is identical to the tested tree.
  • No review threads.

#86 stays open until v0.1.0 is tagged, after #89 and #91.


Generated by Claude Code

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.

2 participants