workers down --until takes a date or an ISO date-time on every Python version (Z, offsets); tested at one minute either side. done / next: fix 5 (inferred age)
This commit is contained in:
1 parent
e34dabfdb0
commit
8100295f98
3 files changed
+49
-4
No files matched your search
+1
-1
@@ -31,7 +31,7 @@ LONG = {
|
||||
'status': ' sisi status [--json] [--learning] recent units with their scorecards, then trends by project, risk profile, model and policy version (median and p95; no single score)',
|
||||
'verifiers': ' sisi verifiers [WORDS] [--lang L] [--kind K] [--rung N] [--section S] [--installed] [--json]\n list ways to know work is correct, by section\n sisi verifiers show ID [--trace] one entry in full, and whether its tool is installed here; --trace also prints where each folded lesson lives in it\n sisi verifiers for "<claim>" best-matching verifiers for a claim or piece of work\n sisi verifiers doctor | lint which tools are installed; validate the library',
|
||||
'done': ' sisi done [ID] [--trace] recipes: which checks make a kind of work done; --trace also prints where each folded lesson lives in the recipe\n sisi done for "<work>" best-matching recipe',
|
||||
'workers': ' sisi workers [--refresh] the agent tools and models found here, what is usable now and why not, allowance and price where known, delegations waiting for a judgement, and the judged record as three tables\n sisi workers fact W --price N|--score N --source S record a price (per million tokens) or benchmark standing (0-100), with its source and date\n sisi workers avoid|prefer PATTERN --why TEXT your own routing constraints, honoured by `sisi route`\n sisi workers only PROVIDER PATTERN... --why TEXT | --remove make only the matching models of that provider routable\n sisi workers note PATTERN \"TEXT\" --why SOURCE | --remove a standing fact about workers matching PATTERN, shown with route results\n sisi workers down W --reason limit|auth|missing|error [--until DATE] | up W mark a worker unavailable / available again\n sisi workers import FILE merge another ledger file into the delegation ledger (row counts printed; safe to repeat)',
|
||||
'workers': ' sisi workers [--refresh] the agent tools and models found here, what is usable now and why not, allowance and price where known, delegations waiting for a judgement, and the judged record as three tables\n sisi workers fact W --price N|--score N --source S record a price (per million tokens) or benchmark standing (0-100), with its source and date\n sisi workers avoid|prefer PATTERN --why TEXT your own routing constraints, honoured by `sisi route`\n sisi workers only PROVIDER PATTERN... --why TEXT | --remove make only the matching models of that provider routable\n sisi workers note PATTERN \"TEXT\" --why SOURCE | --remove a standing fact about workers matching PATTERN, shown with route results\n sisi workers down W --reason limit|auth|missing|error [--until DATE|TIME] | up W mark a worker unavailable / available again\n sisi workers import FILE merge another ledger file into the delegation ledger (row counts printed; safe to repeat)',
|
||||
'route': ' sisi route --kind K --difficulty N [--review-of W] [--explain]\n the most affordable usable worker for this kind and difficulty, and the mechanism to start it with (host subagents, host cross-provider delegation, or sisi delegate); --explain says why',
|
||||
'delegate': ' sisi delegate brief | check FILE | guide the delegation-contract template (eight parts); which parts a brief lacks; the orchestration playbook\n sisi delegate --kind K --difficulty N --brief FILE [--worker W] [--review-of W] [--cwd DIR]\n run one brief on the chosen worker unattended; prints only its final report, the transcript path, and the judge command; a brief without outcome, acceptance or files it may change is refused\n sisi delegate judge ID --outcome accepted|rejected --check none|diffstat|tests|read|review [--minutes N]\n record your judgement of a delegation run, so the next choice learns from it; judge work run any other way with --worker W --type K --difficulty N instead of ID\n sisi delegate amend ID | recent [-n N] [--project P] mark a judged delegation that later proved wrong; list recent judgements to find an id',
|
||||
'eval': ' sisi eval list|add|run|compare|shadow|judge|status|import\n the evaluation harness: benchmark cases from real work, isolated\n replay, policy comparison and independent judging (see docs/evaluation.md);\n `sisi eval` alone prints status; run without --tasks replays check cases only',
|
||||
|
||||
+9
-3
@@ -383,6 +383,12 @@ def _parse_time(value):
|
||||
return float(text)
|
||||
except ValueError:
|
||||
pass
|
||||
# a trailing Z (UTC) and a +HHMM offset are accepted on every Python version; a time with no
|
||||
# zone is read as local time, a bare date as the start of that day
|
||||
if text[-1:] in ("Z", "z"):
|
||||
text = text[:-1] + "+00:00"
|
||||
elif re.search(r"[+-]\d{4}$", text) and "T" in text.upper().replace(" ", "T"):
|
||||
text = text[:-2] + ":" + text[-2:]
|
||||
try:
|
||||
return datetime.datetime.fromisoformat(text).timestamp()
|
||||
except ValueError:
|
||||
@@ -1737,17 +1743,17 @@ def _cmd_brief_check(args):
|
||||
|
||||
def _cmd_down(args):
|
||||
if not args:
|
||||
print("usage: sisi workers down WORKER --reason limit|auth|missing|error [--until DATE] [--note TEXT]")
|
||||
print("usage: sisi workers down WORKER --reason limit|auth|missing|error [--until DATE|DATETIME] [--note TEXT]")
|
||||
return 1
|
||||
worker = str(args[0]).strip().lower().rstrip("/")
|
||||
reason = _opt(args, "--reason")
|
||||
if reason not in REASONS:
|
||||
print("usage: sisi workers down WORKER --reason limit|auth|missing|error [--until DATE] [--note TEXT]")
|
||||
print("usage: sisi workers down WORKER --reason limit|auth|missing|error [--until DATE|DATETIME] [--note TEXT]")
|
||||
return 1
|
||||
until = _opt(args, "--until")
|
||||
until_ts = _parse_time(until) if until is not None else None
|
||||
if until is not None and until_ts is None:
|
||||
print("sisi: --until wants a date like 2026-12-01 or 2026-12-01T09:00", file=sys.stderr)
|
||||
print("sisi: --until wants a date like 2026-12-01 or a time like 2026-12-01T09:00 (add Z or an offset such as +02:00 for a zone)", file=sys.stderr)
|
||||
return 1
|
||||
note = _opt(args, "--note")
|
||||
record_down([worker], reason, note, until_ts=until_ts)
|
||||
|
||||
Reference in new issue
Block a user