Skip to content

Warn at boot when a cell runs another hotcell release - #90

Merged
flavorjones merged 1 commit into
masterfrom
card-5278-cell-version-skew
Oct 1, 2026
Merged

flavorjones merged 1 commit into
masterfrom
card-5278-cell-version-skew

Conversation

@flavorjones

@flavorjones flavorjones commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Motivation

Since #73, a cell reports its hotcell-server version as server_version in its hotcell.describe answer. HotCell.describe_cells did not compare it with the client's version.

docs/DEPLOYMENT.md and the generated Gemfile.tt said that a version skew answers protocol on every request. A cell answers protocol only to a different PROTOCOL_VERSION (request.rb:29).

Details

  1. HotCell.describe_cells warns when a cell's server_version differs from HotCell::Client::VERSION:

    hotcell active_storage: this client is 0.7.0 and the cell reports hotcell-server "0.6.0".
    

    A cell older than 0.6.0 reports no version, so its warning shows nil. The warning escapes control characters in the version, so a cell cannot forge a log line.

  2. Remove the false claim from docs/DEPLOYMENT.md and Gemfile.tt.

Fixes #21

Copilot AI balanced review requested due to automatic review settings October 1, 2026 18:50

Copilot AI 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.

Copilot review overview

🟢 Approved

The warning is backward-compatible, safely handles untrusted values, and has focused behavioral coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Adds boot-time warnings for client/server release skew and corrects documentation about protocol compatibility.

Changes:

  • Warns when hotcell-client and hotcell-server versions differ.
  • Preserves compatibility with older cells and sanitizes untrusted version values.
  • Adds integration/security tests and updates deployment guidance.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File Description
README.md Documents the version-skew warning.
CHANGELOG.md Records the new client warning.
docs/​DEPLOYMENT.md Clarifies release versus protocol skew.
hotcell-client/​lib/​hot_cell/​cell.rb Implements sanitized version-skew warnings.
hotcell-client/​lib/​hot_cell/​install/​Gemfile.tt Corrects generated lockstep guidance.
hotcell-client/​test/​integration_test.rb Tests matching, differing, and absent versions.
hotcell-client/​test/​describe_survival_test.rb Tests protection against forged log lines.
hotcell-client/​test/​install_test.rb Corrects the installer test explanation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/DEPLOYMENT.md Outdated
Comment thread hotcell-client/lib/hot_cell/cell.rb Outdated
Comment thread hotcell-client/lib/hot_cell/cell.rb Outdated
Comment thread CHANGELOG.md Outdated
@flavorjones
flavorjones force-pushed the card-5278-cell-version-skew branch 3 times, most recently from 5e4ef80 to 0a90e75 Compare October 1, 2026 19:36
`HotCell.describe_cells` did not compare a cell's `server_version` with
the client's version. `docs/DEPLOYMENT.md` and the generated cell
`Gemfile` said that a version skew answers `protocol` on every request,
which is false.

Warn at boot when the versions differ, and remove the false claim.

[Fix #21]
@flavorjones
flavorjones force-pushed the card-5278-cell-version-skew branch from 0a90e75 to 2889a22 Compare October 1, 2026 19:36
@flavorjones
flavorjones merged commit 163c62c into master Oct 1, 2026
39 of 42 checks passed
@flavorjones
flavorjones deleted the card-5278-cell-version-skew branch October 1, 2026 19:56
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.

Report the hotcell-server gem version in the describe response

2 participants