Set KIMAKI_NO_DEFAULT_CHANNEL on managed Kimaki services - #317
Merged
Conversation
Kimaki recreates a general-purpose #kimaki-<bot> channel, welcome message, and tutorial thread on every start. On a wp-coding-agents install the real project channel is the site channel, so the default is pure noise — it has been reappearing on every restart since the install was created. remorses/kimaki@7a9ab1e8 added KIMAKI_NO_DEFAULT_CHANNEL=1 as the supported opt-out (fixes remorses/kimaki#175). Set it in all three render sites: the fresh systemd unit, the upgrade-time template that merges into an installed unit, and the launchd plist. The variable is unreleased upstream at time of writing, so this is inert on current Kimaki builds and takes effect the moment a host upgrades. That is the point of setting it declaratively rather than scripting a deletion. Only the launchd plist was reachable from the existing bridge-render snapshots, because bridge_render_systemd receives its env block as an argument instead of building it. tests/kimaki-no-default-channel.sh covers the two systemd paths, and specifically that an upgrade merges the variable into an already-installed unit without duplicating it or clobbering operator-owned Environment= lines — an opt-out that only applies to fresh installs would leave every existing host noisy forever.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kimaki recreates a general-purpose
#kimaki-<bot>channel, welcome message, and tutorial thread on every start. On a wp-coding-agents install the real project channel is the site channel, so the default is pure noise — it has been reappearing on every restart of every managed install since setup.remorses/kimaki@7a9ab1e8addedKIMAKI_NO_DEFAULT_CHANNEL=1as the supported opt-out (fixesremorses/kimaki#175). This sets it.Three render sites, not one
_kimaki_install_systemd→ENV_BLOCKbridge_update_systemd→TEMPLATE_ENVbridge_render_launchdThe middle one is the one that matters most and the easiest to miss. Every host that already exists got its unit written before the opt-out was available, so an implementation that only touches the fresh-install path would fix nothing on any box currently running.
Inert today, correct tomorrow
7a9ab1e8lands afterrelease: kimaki@0.23.1and still carries an unconsumed changeset, so the variable is not in any published Kimaki. An unknown env var is ignored, so this is a no-op on current builds and self-activates the moment a host upgrades.That is deliberate. The alternative I started with was a polling script that hunted the channel down and deleted it after startup — more moving parts, racy, and obsolete the day upstream shipped the flag. A declarative
Environment=line has no runtime behavior to go wrong.Test
tests/bridge-render.shsnapshots only reach the launchd plist:bridge_render_systemdtakes its env block as an argument rather than building it, so neither systemd path is snapshot-covered. That gap is why the new test exists.tests/kimaki-no-default-channel.shdrives the realbridge_update_systemdagainst a unit written the way a pre-opt-out host has it, and asserts:Environment=HOST_CUSTOM=line survives the mergeunchanged)1Verified non-vacuous: reverting just the
TEMPLATE_ENVline makes the suite exit 1.The
kimaki-launchdsnapshot is refreshed for the new key.bridge-render,kimaki-multi-instance,kimaki-launchd-start,service-identity-adoption, andpostureall still pass;bash -nclean across the repo.Follow-up
Applying this to h44lacrosse.com is an operator action and is not part of this PR. It will not silence that box until Kimaki ships a release containing
7a9ab1e8.