Skip to content

Fix lifecycle hooks, force flags, release pre-flight checks#156

Merged
jonathonbyrdziak merged 1 commit intomasterfrom
fix/lifecycle-hooks-force-flags-logging
Apr 4, 2026
Merged

Fix lifecycle hooks, force flags, release pre-flight checks#156
jonathonbyrdziak merged 1 commit intomasterfrom
fix/lifecycle-hooks-force-flags-logging

Conversation

@jonathonbyrdziak
Copy link
Copy Markdown
Contributor

Summary

  • Watcher force flags: protocol stop and start called by the release watcher now use --force so they never block on stale locks
  • ProtocolStop --force: Added --force (-f) option to override locks, matching ProtocolStart
  • Post-start hook ordering: Hooks now run after all other start steps (security, health, summary, status dashboard) have completed and displayed
  • Container readiness wait: Fibonacci backoff (1,1,2,3,5,8,13,21,34,55…) up to 2 minutes before running post_start hooks
  • release:create pre-flight: Aborts on dirty working tree, unpulled remote changes, or push rejection; rolls back local tag + VERSION commit on failure
  • self:update --nightly: Fixed detached HEAD bug where Git::branch() returned garbage after a tag checkout
  • Lifecycle debug logging: Full logging of hook resolution, container state, exec commands, exit codes, and output

Test plan

  • Run protocol start and verify post_start hooks run after the status dashboard displays
  • Verify lifecycle hook output appears in /var/log/protocol/protocol.log
  • Test protocol stop --force overrides a stale lock
  • Test protocol release:create with uncommitted changes (should abort)
  • Test protocol release:create when behind remote (should abort)
  • Test protocol self:update --nightly from a detached HEAD state

🤖 Generated with Claude Code

…nd debug logging

- Watcher now passes --force to stop/start so it never blocks on stale locks
- ProtocolStop gets --force (-f) option matching ProtocolStart
- post_start hooks now run after all other start steps complete and display
- Container readiness check with Fibonacci backoff (up to 2min) before hooks
- release:create aborts on dirty tree, unpulled remote changes, or push rejection
- release:create rolls back local tag + VERSION commit if branch push fails
- self:update --nightly fixed for detached HEAD (uses symbolic-ref)
- Detailed logging throughout lifecycle hooks for debugging

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jonathonbyrdziak jonathonbyrdziak merged commit 69fb7af into master Apr 4, 2026
5 of 8 checks passed
@jonathonbyrdziak jonathonbyrdziak deleted the fix/lifecycle-hooks-force-flags-logging branch April 4, 2026 21: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.

1 participant