remove the hive dashboard's stats page and the price table behind it
The ST4TS page (/stats.html), GET /api/stats-hive, hive-c0re's hive_stats rollup and the modelPrices option that only fed its cost estimate are gone. Each agent's own /stats page and the turn-stats database it reads are unchanged. Setting modelPrices now fails evaluation with a message saying so.
This commit is contained in:
parent
1d3ab2fae5
commit
5e9a22cb38
1 changed files with 112 additions and 1207 deletions
|
|
@ -1470,12 +1470,6 @@ let
|
|||
c0re.assets = pkgs.gnused;
|
||||
c0re.xdgIcons = pkgs.gnugrep;
|
||||
c0re.hyperhiveRev = "abc123";
|
||||
c0re.modelPrices.sonnet = {
|
||||
input = 1.0;
|
||||
output = 2.0;
|
||||
cache_read = 3.0;
|
||||
cache_write = 4.0;
|
||||
};
|
||||
c0re.agentCpuQuota = "300%";
|
||||
c0re.agentMemoryMax = "8G";
|
||||
c0re.agentCpuWeight = 50;
|
||||
|
|
@ -1501,7 +1495,6 @@ let
|
|||
&& path c.xdgIcons == path pkgs.gnugrep
|
||||
&& path c.servedFrontend == path pkgs.coreutils
|
||||
&& c.hyperhiveRev == "abc123"
|
||||
&& c.modelPrices.sonnet.cache_write == 4.0
|
||||
&& c.agentCpuQuota == "300%"
|
||||
&& c.agentMemoryMax == "8G"
|
||||
&& c.agentCpuWeight == 50
|
||||
|
|
@ -1516,7 +1509,6 @@ let
|
|||
"assets"
|
||||
"xdgIcons"
|
||||
"hyperhiveRev"
|
||||
"modelPrices"
|
||||
"agentCpuQuota"
|
||||
"agentMemoryMax"
|
||||
"agentCpuWeight"
|
||||
|
|
@ -1575,12 +1567,37 @@ let
|
|||
&& !(lib.any (path: refused bare path) (lib.attrNames setting))
|
||||
&& !(lib.any (path: refused sibling path) (lib.attrNames setting));
|
||||
}
|
||||
{
|
||||
# The price table fed only the hive dashboard's stats page, which is gone.
|
||||
# A definition under either namespace fails evaluation naming the option;
|
||||
# a host that sets none, or a moved sibling, does not.
|
||||
name = "a definition of the removed modelPrices option fails evaluation, naming the option";
|
||||
ok =
|
||||
let
|
||||
refused =
|
||||
m: path:
|
||||
lib.any (
|
||||
a: !a.assertion && lib.hasInfix "services.hyperhive.${path}.modelPrices" a.message
|
||||
) m.assertions;
|
||||
prices = {
|
||||
sonnet = {
|
||||
input = 3.0;
|
||||
};
|
||||
};
|
||||
in
|
||||
refused (hiveWithController { c0re.modelPrices = prices; }) "c0re"
|
||||
&& refused (hiveWithController {
|
||||
deploy.hive-controller.modelPrices = prices;
|
||||
}) "deploy.hive-controller"
|
||||
&& !(refused bare "c0re")
|
||||
&& !(refused bare "deploy.hive-controller")
|
||||
&& !(refused (hiveWithController { c0re.buildSlots = 3; }) "c0re");
|
||||
}
|
||||
{
|
||||
# What the moved options render with their defaults: the flake source, the agent limits
|
||||
# and build slots in serve.json, the sudoless-hivectl group's members,
|
||||
# and the model price table. The same values the options held at their
|
||||
# old paths.
|
||||
name = "the flake source, agent limits, build slots, admin group and price table render their defaults unchanged";
|
||||
# and build slots in serve.json, and the sudoless-hivectl group's
|
||||
# members. The same values the options held at their old paths.
|
||||
name = "the flake source, agent limits, build slots and admin group render their defaults unchanged";
|
||||
ok =
|
||||
let
|
||||
serve = builtins.fromJSON (
|
||||
|
|
@ -1597,8 +1614,6 @@ let
|
|||
&& serve.agent_cpu_weight == 80
|
||||
&& serve.agent_io_weight == 80
|
||||
&& serve.build_slots == 1
|
||||
&& serve.model_prices.opus.input == 5.0
|
||||
&& serve.model_prices.haiku.cache_write == 2.0
|
||||
&& allLocal.users.groups.hive-admin.members == [ ];
|
||||
}
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue