Skip to content

Preserve active Velocity configuration on failed reload - #104

Merged
BenCodez merged 1 commit into
mainfrom
codex/preserve-velocity-config-reload
Oct 2, 2026
Merged

BenCodez merged 1 commit into
mainfrom
codex/preserve-velocity-config-reload

Conversation

@BenCodez

@BenCodez BenCodez commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Problem

MCHT finding 20261002T012032106596Z-aa5ef0416165 confirmed that normal Velocity YAML reload substitutes an empty root after parsing fails. VotingPlugin can consequently lose its active MQTT selection and administrator settings. This is a configuration-preservation failure, not evidence of live vote loss.

Change

  • Load a replacement before publishing it; missing/unreadable/malformed reload throws UncheckedIOException and retains the last valid snapshot.
  • Open the input before invoking Configurate so its missing-file fallback cannot manufacture a replacement snapshot.
  • Preserve startup creation/default handling and intentionally empty valid YAML.
  • Do not rewrite the failed source file; successful later reload still works.

Validation

  • Regressions reproduced on unchanged source (2 expected failures).
  • Focused YAML tests: 17 passed.
  • mvn -B -f SimpleAPI/pom.xml -Dsimpleapi.mqtt.broker=/path/to/ephemeral/mosquitto clean install: 433 tests passed, including real broker restart and shared-artifact checks; full/shared/shared-sources artifacts produced.
  • git diff --check passed; independent source-read-only review: No findings.

VotingPlugin has a separate strict normal-reload/runtime guard, so deploying its fix does not require a simultaneous SimpleAPI API upgrade. MCHT host-side component validation remains pending execution access; no live transport/vote safety claim.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 1da27d77-4219-4875-a741-0b432132c0dd

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 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
🔒 Security Review ✅ Completed 2026-10-02T01:50:14.882459Z fa011b1 PR opened
ℹ️ 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.

@BenCodez
BenCodez merged commit 3bb1f92 into main Oct 2, 2026
5 checks passed
@BenCodez
BenCodez deleted the codex/preserve-velocity-config-reload branch October 2, 2026 01:52
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