mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-30 06:25:34 +01:00
Let 32k models back into free-best; count the temp dir as scratch
Some checks are pending
kuhy_credit drift / drift (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
omniroute_offload pre-commit / pre-commit (push) Waiting to run
palette drift / palette (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
Some checks are pending
kuhy_credit drift / drift (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
omniroute_offload pre-commit / pre-commit (push) Waiting to run
palette drift / palette (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
The todoImplementer board's pi turns now fit a 32k window (T2631: tool results clipped, each request cut to the window), so the combo floor drops from 100k to 32k and SEA-LION and ovhanon's gpt-oss come back. free-llm-check-dir refused files under $TMPDIR (/var/disktmp here), so test_hook and test_privacy failed on this PC: the system temp dir now counts as scratch, as /tmp does. Bug-class-check: scratch roots hard-coded /tmp; now include tempfile.gettempdir() (todoImplementer T2631) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1f52d5f6b3
commit
da2bf4f78e
@ -29,10 +29,10 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
MIN_PROMPT = 16_000
|
MIN_PROMPT = 16_000
|
||||||
MIN_TETRIS = 0.85
|
MIN_TETRIS = 0.85
|
||||||
# OmniRoute caps a combo's input at its smallest member's limit; a board turn sends
|
# OmniRoute caps a combo's input at its smallest member's limit. A board turn once
|
||||||
# 35k+ tokens and grows, so one 32k member failed every turn with "Input exceeds
|
# sent 35k+ tokens and grew, so one 32k member failed every turn (T2628); since T2631
|
||||||
# context window" (todoImplementer T2628).
|
# the board's pi turns fit a 32k window (piturn.WINDOW), so 32k members are in again.
|
||||||
MIN_CONTEXT = 100_000
|
MIN_CONTEXT = 32_000
|
||||||
# testStatus (or lastErrorType) of a login that is gone: kuhy reconnects it
|
# testStatus (or lastErrorType) of a login that is gone: kuhy reconnects it
|
||||||
DEAD = frozenset({"expired", "unauthorized"})
|
DEAD = frozenset({"expired", "unauthorized"})
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
"""Fail-closed checks on what may be sent to free (logging, maybe training) providers.
|
"""Fail-closed checks on what may be sent to free (logging, maybe training) providers.
|
||||||
|
|
||||||
A file may go out only if it lives in a PUBLIC GitHub repo, or under /tmp or
|
A file may go out only if it lives in a PUBLIC GitHub repo, or under /tmp,
|
||||||
/var/log, and is not a secret-shaped file. Every text is scanned for credential
|
/var/log or the system temp dir ($TMPDIR, /var/disktmp on kuhy's PC), and is
|
||||||
|
not a secret-shaped file. Every text is scanned for credential
|
||||||
patterns; that scan has no override.
|
patterns; that scan has no override.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -11,13 +12,14 @@ import json
|
|||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import tempfile
|
||||||
import time
|
import time
|
||||||
from fnmatch import fnmatch
|
from fnmatch import fnmatch
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
CACHE = Path.home() / ".cache/omniroute_offload/visibility.json"
|
CACHE = Path.home() / ".cache/omniroute_offload/visibility.json"
|
||||||
CACHE_TTL_S = 86400
|
CACHE_TTL_S = 86400
|
||||||
SCRATCH_ROOTS = (Path("/tmp"), Path("/var/log"))
|
SCRATCH_ROOTS = (Path("/tmp"), Path("/var/log"), Path(tempfile.gettempdir()))
|
||||||
DENIED_HOME_DIRS = (".ssh", ".config", ".gnupg", ".aws", ".claude")
|
DENIED_HOME_DIRS = (".ssh", ".config", ".gnupg", ".aws", ".claude")
|
||||||
DENIED_NAMES = (
|
DENIED_NAMES = (
|
||||||
".env",
|
".env",
|
||||||
@ -58,7 +60,7 @@ def path_refusal(path: Path, *, home: Path) -> str | None:
|
|||||||
return f"{path}: under ~/{sub}"
|
return f"{path}: under ~/{sub}"
|
||||||
if _repo_root(path) or any(path.is_relative_to(root) for root in SCRATCH_ROOTS):
|
if _repo_root(path) or any(path.is_relative_to(root) for root in SCRATCH_ROOTS):
|
||||||
return None
|
return None
|
||||||
return f"{path}: not in a public repo, /tmp or /var/log"
|
return f"{path}: not in a public repo, /tmp, /var/log or the temp dir"
|
||||||
|
|
||||||
|
|
||||||
def file_refusal(path: Path, *, home: Path) -> str | None:
|
def file_refusal(path: Path, *, home: Path) -> str | None:
|
||||||
|
|||||||
@ -267,24 +267,32 @@ def test_keep_live_survives_an_unreachable_api(
|
|||||||
def test_refresh_leaves_out_a_model_under_the_context_floor(
|
def test_refresh_leaves_out_a_model_under_the_context_floor(
|
||||||
cfg: gwc.Config, admins: list[FakeAdmin], capsys: pytest.CaptureFixture[str]
|
cfg: gwc.Config, admins: list[FakeAdmin], capsys: pytest.CaptureFixture[str]
|
||||||
) -> None:
|
) -> None:
|
||||||
"""OmniRoute caps a combo at its smallest member: a 32k one failed 35k turns."""
|
"""OmniRoute caps a combo at its smallest member; board turns fit 32k (T2631)."""
|
||||||
_write(
|
_write(
|
||||||
cfg,
|
cfg,
|
||||||
HEADER
|
HEADER
|
||||||
+ "nv/big\tyes\t1.0\t128000\n"
|
+ "nv/big\tyes\t1.0\t128000\n"
|
||||||
+ "sea/small\tyes\t0.9\t128000\n"
|
+ "sea/small\tyes\t0.9\t128000\n"
|
||||||
|
+ "sea/tiny\tyes\t0.9\t128000\n"
|
||||||
+ "groq/measured\tyes\t0.9\t16000\n"
|
+ "groq/measured\tyes\t0.9\t16000\n"
|
||||||
+ "or/unknown\tyes\t0.9\t128000\n",
|
+ "or/unknown\tyes\t0.9\t128000\n",
|
||||||
)
|
)
|
||||||
CONTEXTS.update({"nv/big": 128000, "sea/small": 32768, "groq/measured": 400000})
|
CONTEXTS.update(
|
||||||
|
{
|
||||||
|
"nv/big": 128000,
|
||||||
|
"sea/small": 32768,
|
||||||
|
"sea/tiny": 16384,
|
||||||
|
"groq/measured": 400000,
|
||||||
|
}
|
||||||
|
)
|
||||||
assert combo.refresh(cfg) is True
|
assert combo.refresh(cfg) is True
|
||||||
assert admins[0].upserts == [(api.COMBO, ["nv/big", "or/unknown"])]
|
assert admins[0].upserts == [(api.COMBO, ["nv/big", "sea/small", "or/unknown"])]
|
||||||
|
|
||||||
|
|
||||||
def test_refresh_keeps_the_combo_when_no_model_is_big_enough(
|
def test_refresh_keeps_the_combo_when_no_model_is_big_enough(
|
||||||
cfg: gwc.Config, admins: list[FakeAdmin], capsys: pytest.CaptureFixture[str]
|
cfg: gwc.Config, admins: list[FakeAdmin], capsys: pytest.CaptureFixture[str]
|
||||||
) -> None:
|
) -> None:
|
||||||
_write(cfg, HEADER + "sea/small\tyes\t0.9\t32000\n")
|
_write(cfg, HEADER + "sea/small\tyes\t0.9\t30000\n")
|
||||||
assert combo.refresh(cfg) is False
|
assert combo.refresh(cfg) is False
|
||||||
assert admins[0].upserts == []
|
assert admins[0].upserts == []
|
||||||
assert "dead: none" in capsys.readouterr().err
|
assert "dead: none" in capsys.readouterr().err
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user