Skip to content

Let hotfix enable replace its own earlier output - #265

Merged
gilesknap merged 1 commit into
mainfrom
hotfix-enable-markers
Sep 14, 2026
Merged

gilesknap merged 1 commit into
mainfrom
hotfix-enable-markers

Conversation

@gilesknap

Copy link
Copy Markdown
Member

Problem

Found during the hotfix end-to-end test on t11-beamline. podbench restart and hotfix restart refuse legacy wiring with "lifecycle protocol unavailable; update hotfix wiring and roll out", but hotfix enable reported the chart "unchanged" because a podbench-hotfix-claim block existed. There was no upgrade path. Running hotfix values against the legacy pod also captured the old supervisor loop as the application entrypoint and wrapped the hold-aware liveness probe a second time.

Change

  • Generated workload lines are bracketed with # podbench-hotfix: begin podbench <version> and # podbench-hotfix: end. A later enable replaces the marked region.
  • Files written before the markers are upgraded: with a claim block present, each generated key block is replaced where it sits, so user keys between them (blueapi's ingress) survive. Without a claim block the keys are the user's and are refused as before.
  • The Chart.yaml dependency is repinned to the current chart version.
  • entrypoint() unwraps a supervisor already running in the pod, both generations, including the else branch of the editable-checkout fallback. unwrap_probe() strips a hold guard before probes are wrapped again, and health_command() uses it too.

Verified

  • 10 unit tests in tests/test_hotfix_enable.py: fresh insert, marked rerun idempotent, legacy upgrade, user keys between blocks kept, refusal without claim, top-level layout, dependency repin, entrypoint and probe unwrapping.
  • Live: hotfix enable on fresh clones of t11-services upgraded bl11t-mo-sim-01 from the inline loop with exec bash -c /epics/ioc/start.sh as fallback and one hold guard, and marked t11-blueapi while keeping its ingress and comments. Both files parse; result pushed as gilesknap/t11-services branch podbench-mo-sim-lifecycle.

Related: #264 (headless VS Code) is the test harness this came out of.

🤖 Generated with Claude Code

`hotfix enable` returned "unchanged" whenever a claim block existed, so
wiring written by an older podbench could never be upgraded, while
`podbench restart` refused that wiring with "lifecycle protocol
unavailable". Generated workload lines are now bracketed with
`# podbench-hotfix: begin/end` comments and a later run replaces the marked
region. Files from before the markers are upgraded too: with a claim block
present, each generated key block is replaced where it sits and user keys
between them survive. Without a claim block, generated keys still belong to
the user and are refused. The Chart.yaml dependency is repinned to the
current chart version instead of being left alone.

Reading a pod that already runs a supervisor no longer nests supervisors:
`entrypoint()` recovers the application command from the supervisor's
launch argument, including the else branch of the editable-checkout
fallback, and probe commands lose their hold guard before being wrapped
again.

Verified against the live t11-beamline charts: the legacy IOC upgraded with
the image start script as fallback and a single hold guard, and the BlueAPI
chart kept its ingress and comments while gaining markers.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 26 minutes.

Check out review usage here.

View limit details

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

This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 3bf65eed-af05-45f9-a73f-264e7a4ba99c

📥 Commits

Reviewing files that changed from the base of the PR and between b5ab64a and 5f0b68f.

📒 Files selected for processing (4)
  • src/podbench/hotfix_enable.py
  • src/podbench/hotfix_values.py
  • src/podbench/lifecycle_health.py
  • tests/test_hotfix_enable.py

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

@gilesknap
gilesknap merged commit d0a03ae into main Sep 14, 2026
12 checks passed
@gilesknap
gilesknap deleted the hotfix-enable-markers branch September 14, 2026 21:00
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