remove otel.metricIntervalMs and the host-level otel.debug
Both are ignored with a warning through the same shim, now nix/host-modules/hive-options-removed.nix. - otel.metricIntervalMs: claude in every agent and hive-c0re's container-resource exporter run at the 60s default. The agent-level services.hyperhive.agent.otel.metricIntervalMs, set only by the meta render, goes too (warning shim in nix/agent-modules/otel-removed.nix). - otel.debug: services.hyperhive.agent.otel.debug stays, documented and set in an agent's own config; the meta render no longer emits it.
This commit is contained in:
parent
4b5707768c
commit
0a5f35bda3
14 changed files with 136 additions and 152 deletions
|
|
@ -1,46 +0,0 @@
|
|||
# Removal shim for `services.hyperhive.c0re.operatorPronouns` and
|
||||
# `services.hyperhive.c0re.contextWindowTokens`.
|
||||
#
|
||||
# A definition of either is ignored and produces a warning, so a host that
|
||||
# still sets one keeps evaluating. The agents' system prompt
|
||||
# (hive-agent/prompts/system.md) names the operator's pronouns itself, and
|
||||
# the harness (hive-agent/src/harness_state.rs) holds the per-model context
|
||||
# windows it uses until a turn reports the model's own.
|
||||
#
|
||||
# Self-contained and deletable, like ./swarm-peers-removed.nix: one file to
|
||||
# remove when the deprecation window closes.
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.services.hyperhive.c0re;
|
||||
in
|
||||
{
|
||||
options.services.hyperhive.c0re = {
|
||||
operatorPronouns = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
visible = false;
|
||||
internal = true;
|
||||
description = "Removed and ignored. `null` is \"not set\".";
|
||||
};
|
||||
contextWindowTokens = lib.mkOption {
|
||||
type = lib.types.nullOr (lib.types.attrsOf lib.types.int);
|
||||
default = null;
|
||||
visible = false;
|
||||
internal = true;
|
||||
description = "Removed and ignored. `null` is \"not set\".";
|
||||
};
|
||||
};
|
||||
|
||||
config.warnings =
|
||||
lib.optional (cfg.operatorPronouns != null) ''
|
||||
services.hyperhive.c0re.operatorPronouns is removed and ignored: the
|
||||
operator's pronouns will be a per-operator profile setting. Until then
|
||||
every agent's system prompt says she/her. Remove this setting.
|
||||
''
|
||||
++ lib.optional (cfg.contextWindowTokens != null) ''
|
||||
services.hyperhive.c0re.contextWindowTokens is removed and ignored: the
|
||||
agent harness uses the context window the model reports after each
|
||||
turn, and before the first one its own defaults (haiku 200000, sonnet
|
||||
1000000, opus 1000000 tokens). Remove this setting.
|
||||
'';
|
||||
}
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
./swarm-victoriametrics.nix
|
||||
./swarm-wireguard.nix
|
||||
./swarm.nix
|
||||
./c0re-options-removed.nix
|
||||
./hive-options-removed.nix
|
||||
./host-ca-removed.nix
|
||||
./nats-callout-removed.nix
|
||||
./swarm-required-services.nix
|
||||
|
|
|
|||
|
|
@ -125,12 +125,6 @@ in
|
|||
# The rule: the collector holding the credential achieves nothing while
|
||||
# anything else hands out a copy, so there is exactly one holder and it
|
||||
# is on the host.
|
||||
// lib.optionalAttrs (otel.metricIntervalMs != null) {
|
||||
HYPERHIVE_OTEL_METRIC_INTERVAL_MS = toString otel.metricIntervalMs;
|
||||
}
|
||||
// lib.optionalAttrs otel.debug {
|
||||
HYPERHIVE_OTEL_DEBUG = "1";
|
||||
}
|
||||
)
|
||||
// {
|
||||
# In-cluster forge URL — the gateway vhost (`forge.<domain>`), which
|
||||
|
|
|
|||
62
nix/host-modules/hive-options-removed.nix
Normal file
62
nix/host-modules/hive-options-removed.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
# Removal shim for four host options: `c0re.operatorPronouns`,
|
||||
# `c0re.contextWindowTokens`, `otel.metricIntervalMs` and `otel.debug`.
|
||||
#
|
||||
# A definition of any of them is ignored and produces a warning, so a host
|
||||
# that still sets one keeps evaluating. The agents' system prompt
|
||||
# (hive-agent/prompts/system.md) names the operator's pronouns itself, the
|
||||
# harness (hive-agent/src/harness_state.rs) holds the per-model context
|
||||
# windows it uses until a turn reports the model's own, every OTEL exporter
|
||||
# on the hive runs at its SDK's default cadence, and an agent's own config
|
||||
# sets `services.hyperhive.agent.otel.debug`.
|
||||
#
|
||||
# Self-contained and deletable, like ./swarm-peers-removed.nix: one file to
|
||||
# remove when the deprecation window closes.
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.services.hyperhive;
|
||||
|
||||
# `null` is "not set".
|
||||
ignored =
|
||||
type:
|
||||
lib.mkOption {
|
||||
type = lib.types.nullOr type;
|
||||
default = null;
|
||||
visible = false;
|
||||
internal = true;
|
||||
description = "Removed and ignored.";
|
||||
};
|
||||
|
||||
removed =
|
||||
path: value: why:
|
||||
lib.optional (value != null) ''
|
||||
services.hyperhive.${path} is removed and ignored: ${why} Remove this
|
||||
setting.
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.services.hyperhive = {
|
||||
c0re.operatorPronouns = ignored lib.types.str;
|
||||
c0re.contextWindowTokens = ignored (lib.types.attrsOf lib.types.int);
|
||||
otel.metricIntervalMs = ignored lib.types.ints.positive;
|
||||
otel.debug = ignored lib.types.bool;
|
||||
};
|
||||
|
||||
config.warnings =
|
||||
removed "c0re.operatorPronouns" cfg.c0re.operatorPronouns ''
|
||||
the operator's pronouns will be a per-operator profile setting. Until
|
||||
then every agent's system prompt says she/her.
|
||||
''
|
||||
++ removed "c0re.contextWindowTokens" cfg.c0re.contextWindowTokens ''
|
||||
the agent harness uses the context window the model reports after each
|
||||
turn, and before the first one its own defaults (haiku 200000, sonnet
|
||||
1000000, opus 1000000 tokens).
|
||||
''
|
||||
++ removed "otel.metricIntervalMs" cfg.otel.metricIntervalMs ''
|
||||
claude in every agent and hive-c0re's container-resource exporter both
|
||||
export metrics at the SDK default of 60 seconds.
|
||||
''
|
||||
++ removed "otel.debug" cfg.otel.debug ''
|
||||
to see one agent's OTEL SDK diagnostics, set
|
||||
services.hyperhive.agent.otel.debug = true in that agent's own config.
|
||||
'';
|
||||
}
|
||||
|
|
@ -158,18 +158,6 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
debug = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Emit OTEL SDK diagnostic messages to every agent's stderr by
|
||||
setting `CLAUDE_CODE_OTEL_DIAG_STDERR=1`. Useful when
|
||||
troubleshooting collector connectivity or endpoint config;
|
||||
leave off in normal operation to avoid noise in agent logs.
|
||||
Only meaningful when `enable` is true.
|
||||
'';
|
||||
};
|
||||
|
||||
collector.upstreamHeaderName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Authorization";
|
||||
|
|
@ -306,23 +294,6 @@ in
|
|||
copied into the store and never passed in argv.
|
||||
'';
|
||||
};
|
||||
|
||||
metricIntervalMs = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.ints.positive;
|
||||
default = null;
|
||||
example = 10000;
|
||||
description = ''
|
||||
Metric export interval in milliseconds, set as
|
||||
`OTEL_METRIC_EXPORT_INTERVAL` for every agent. Claude Code's
|
||||
default is 60000 (60s). Leave `null` to use that default.
|
||||
|
||||
Each agent runs claude as a short-lived per-turn process; claude
|
||||
force-flushes metrics on shutdown, so this is not required for
|
||||
metrics to be exported, but a lower value gives more frequent
|
||||
intermediate flushes within long turns. Cosmetic, not a
|
||||
correctness knob.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.services.hyperhive.otel.enable (
|
||||
|
|
|
|||
Loading…
Reference in a new issue