fix(#1896): remove dead forge_notify reason drop-list + auto-unsubscribe

This commit is contained in:
damocles 2026-06-24 23:07:48 +02:00
commit 9f40bd13f9
4 changed files with 20 additions and 182 deletions

View file

@ -584,45 +584,6 @@ in
'';
};
options.hyperhive.forge.keepSubscriptions = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
When true (the default), the forge notification poller will NOT
auto-unsubscribe from repo watches after delivering a
"subscribed"-reason notification. Sub-agents keep their broad
subscriptions so they stay informed about repos they contribute to.
Set to false for agents (e.g. the manager) that use reason-based
filtering and do not need firehose-level repo visibility they will
auto-unsubscribe after receiving a watched-repo notification.
'';
};
options.hyperhive.forge.skipNotifyReasons = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
example = [
"subscribed"
"participating"
];
description = ''
Forgejo notification `reason` values to suppress in the forge
notification poller. Notifications with these reasons are marked
read and silently dropped; all others including notifications
with a null or unrecognised reason are delivered.
Drop-list is safer than an allow-list: directed signals
(`review_requested`, `assigned`, `mention`) are never silently
missed even if Forgejo returns an unexpected reason string.
Empty list (the default) delivers all notifications. Set to
`[ "subscribed" "participating" ]` for agents like the manager
that want only direct mentions and reviews, not the full repo
firehose. Rendered to the `HIVE_FORGE_NOTIFY_SKIP_REASONS`
environment variable consumed by the harness poller at runtime.
'';
};
options.hyperhive.dashboardLinks = lib.mkOption {
type = lib.types.listOf (
lib.types.submodule {
@ -1155,12 +1116,6 @@ in
# (compact-on-overflow) still fires when the session is truly full.
HIVE_COMPACT_WATERMARK_TOKENS = "0";
}
// lib.optionalAttrs config.hyperhive.forge.keepSubscriptions {
HIVE_FORGE_KEEP_SUBSCRIPTIONS = "1";
}
// lib.optionalAttrs (config.hyperhive.forge.skipNotifyReasons != [ ]) {
HIVE_FORGE_NOTIFY_SKIP_REASONS = lib.concatStringsSep "," config.hyperhive.forge.skipNotifyReasons;
}
// lib.optionalAttrs (config.hyperhive._bashEnvFragments != "") {
# Non-interactive bash invocations (claude's `Bash` tool runs
# `bash -c`) source $BASH_ENV at startup — drops every active

View file

@ -1,16 +1,7 @@
{ ... }:
{
imports = [ ./harness-base.nix ];
# Entry-point for the privileged root agent (ruth). Referenced from
# `flake.nix` (`nixosConfigurations.ruth`) and the meta-flake's
# `applied/ruth/flake.nix`. Forge subscription/participation firehose
# stays off so ruth's inbox isn't drowned in noise.
hyperhive.forge = {
keepSubscriptions = false;
skipNotifyReasons = [
"subscribed"
"participating"
];
};
# `applied/ruth/flake.nix`.
imports = [ ./harness-base.nix ];
}