Skip to content

Decouple adapter runtime_version from the package build version - #8

Merged
reflog merged 3 commits into
mainfrom
reflog/engine-runtime-version
Sep 24, 2026
Merged

reflog merged 3 commits into
mainfrom
reflog/engine-runtime-version

Conversation

@reflog

@reflog reflog commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Why

Upgrading prod boxes from v0.0.4 to v0.0.5 on 2026-09-24 orphaned every Geneva artifact. cmd/geneva-server/run_linux.go set steering.Config.RuntimeVersion to the package build version, the descriptor advertised it as runtime_version, and Artifact.ValidateFor requires required_runtime_version to match exactly. Every published artifact requires "0.0.4", so on restart the controller quarantined persisted state:

persisted artifact compatibility check failed: generation 1: artifact requires runtime version "0.0.4", adapter provides exact version "0.0.5"

and every subsequent prepare failed with adapter_failure. v0.0.5 only added status reporting; strategy interpretation did not change.

Change

  • adapter.RuntimeVersionGeneva = "0.0.4": the engine/strategy compatibility version, with the bump rule documented next to it (bump only when grammar, engine semantics, or action behavior change).
  • cmd/geneva-server: steering config construction moved into steeringConfig, which sets RuntimeVersion to the constant. The package version stays on /healthz, logs, and telemetry.
  • steering.Config.RuntimeVersion defaults to the constant instead of "dev"; the field remains as a test seam for incompatibility tests.
  • docs/adapter-v1.md and README.md describe runtime_version as the engine compatibility version and state the bump rule.

The value stays 0.0.4, so existing artifacts and persisted state on v0.0.4 boxes stay valid. Boxes already on v0.0.5 with quarantined state recover through the normal Prepare → Verify → ActivateForNewConnections remediation once this ships.

Tests

New in cmd/geneva-server/runtime_version_linux_test.go, exercising the real steeringConfig with the build version overridden:

  • TestDescriptorRuntimeVersionIsEngineVersionRegardlessOfBuild: descriptor runtime_version equals the constant for builds dev, 0.0.4, 0.0.5, 9.9.9-rc1.
  • TestEngineVersionArtifactPreparesUnderDifferentBuild: an artifact requiring the constant prepares, verifies, and activates under a different build version.
  • TestPersistedStateSurvivesBuildUpgradeWithSameEngineVersion: state written by build 0.0.4 restores under build 0.0.5 with the same active generation and no quarantine file.

With the old wiring (RuntimeVersion: version) all three fail, the last with the exact prod error above. go test ./... and golangci-lint run ./... are clean.

Summary by CodeRabbit

  • Compatibility
    • Adapter descriptors now report the engine compatibility version separately from the package build version.
    • Artifacts use the engine compatibility version required by the server, keeping compatibility consistent across builds.
  • Documentation
    • Clarified when the engine compatibility version changes and how version changes affect existing artifacts and persisted state.

The descriptor advertised the build version as runtime_version and artifacts
must require it exactly, so the v0.0.4 -> v0.0.5 upgrade quarantined every
box's persisted state and failed every prepare with adapter_failure even
though v0.0.5 did not change strategy interpretation.

adapter.RuntimeVersionGeneva (0.0.4) is now the engine compatibility version
used for the descriptor, steering.Config.RuntimeVersion and artifact checks.
It is bumped only when grammar, engine semantics or action behavior change.
The package version stays on /healthz, logs and telemetry.
@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 318a299d-0e04-4c6c-ac84-ae6f2cddd489

📥 Commits

Reviewing files that changed from the base of the PR and between 77eaddb and 3e74662.

📒 Files selected for processing (10)
  • README.md
  • bench/run.sh
  • cmd/geneva-server/run_linux.go
  • cmd/geneva-server/runtime_version_linux_test.go
  • docs/adapter-v1.md
  • e2e/run.sh
  • internal/adapter/types.go
  • internal/steering/controller.go
  • internal/steering/lifecycle_test.go
  • scripts/harness-lib.sh
 _________________________________________
< Code review: now with 100% more rabbit. >
 -----------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

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

🟡 Changes recommended

The runnable Docker harness payloads still use "dev" and will fail exact-version compatibility checks.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Decouples Geneva engine compatibility from package build versions, preserving artifact and persisted-state validity across compatible upgrades.

Changes:

  • Adds and documents adapter.RuntimeVersionGeneva.
  • Uses the engine version for descriptors, validation, and steering defaults.
  • Adds cross-build compatibility tests and updates documentation.
  • Critical finding: e2e/run.sh and bench/run.sh still submit artifacts requiring "dev".
File Summary
README.md Documents engine-compatible runtime versions.
internal/​steering/​lifecycle_test.go Aligns lifecycle fixtures with the compatibility version.
internal/​steering/​controller.go Defaults runtime compatibility to the engine constant.
internal/​adapter/​types.go Defines the compatibility version and bump policy.
docs/​adapter-v1.md Updates adapter contract documentation.
cmd/​geneva-server/​runtime_version_linux_test.go Tests build-independent descriptors and state restoration.
cmd/​geneva-server/​run_linux.go Wires steering configuration to the engine version.

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

Comment thread cmd/geneva-server/run_linux.go Resolved
e2e/run.sh and bench/run.sh hard-coded required_runtime_version "dev", which
no longer matches the engine compatibility version the descriptor advertises.

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

🟢 Approval recommended

No unresolved review issues were identified, and all reviewed changes are approval-ready.

Review effort: Lite
Findings: None

Resolved since last review (1)

…sfer

The sidecar caches counter reads for 2s, so the inbound step could see a
reading taken before the transfer and fail with zero SYNs.

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

🟢 Approval recommended

No unresolved blocking issues were identified.

Review effort: Lite
Findings: None

@reflog
reflog merged commit 953aefa into main Sep 24, 2026
4 checks passed
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