Keep the reset's weekday English on every machine
This commit is contained in:
@@ -23,3 +23,4 @@ Decisions live in `docs/decisions.md`:
|
|||||||
- review: the premises chunk's whole review is the human's approval
|
- review: the premises chunk's whole review is the human's approval
|
||||||
- workflow-bench/: the remote may show the bench cases' names and commit SHAs
|
- workflow-bench/: the remote may show the bench cases' names and commit SHAs
|
||||||
- statusline.py: a field absent, null or of the wrong type is left out silently; only input that is not a JSON object warns
|
- statusline.py: a field absent, null or of the wrong type is left out silently; only input that is not a JSON object warns
|
||||||
|
- statusline.py: the reset's weekday is English on every machine
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
import dataclasses
|
import dataclasses
|
||||||
import datetime
|
import datetime
|
||||||
import json
|
import json
|
||||||
import locale
|
|
||||||
import math
|
import math
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -154,10 +153,6 @@ def main() -> str:
|
|||||||
raw = None
|
raw = None
|
||||||
if not isinstance(raw, dict):
|
if not isinstance(raw, dict):
|
||||||
return f"{RED}warning: statusline.py's input is not a JSON object{RESET}"
|
return f"{RED}warning: statusline.py's input is not a JSON object{RESET}"
|
||||||
try:
|
|
||||||
locale.setlocale(locale.LC_TIME, "")
|
|
||||||
except locale.Error:
|
|
||||||
pass
|
|
||||||
# Zone None: astimezone converts to the machine's own zone, daylight saving included.
|
# Zone None: astimezone converts to the machine's own zone, daylight saving included.
|
||||||
status = parse(raw, None)
|
status = parse(raw, None)
|
||||||
return render(status, current_branch(status.directory), os.environ.get("HOME", ""), datetime.datetime.now().astimezone())
|
return render(status, current_branch(status.directory), os.environ.get("HOME", ""), datetime.datetime.now().astimezone())
|
||||||
|
|||||||
@@ -87,3 +87,7 @@
|
|||||||
## statusline.py: a field absent, null or of the wrong type is left out silently; only input that is not a JSON object warns
|
## statusline.py: a field absent, null or of the wrong type is left out silently; only input that is not a JSON object warns
|
||||||
|
|
||||||
2026-10-02, larv-review in PR #191, declining the logging audit's 🟢 to warn on a field of the wrong type. Applies KISS (`principles/technical-principles.md`). Absent and null fields are normal: API users get no `rate_limits`. Claude Code's schema changes more often by renaming or removing a field than by changing a field's type, and a type warning catches neither. Warning on types would need a table of the schema to catch only the rarer change. Valid while `parse` reads the fields one by one, with no schema table.
|
2026-10-02, larv-review in PR #191, declining the logging audit's 🟢 to warn on a field of the wrong type. Applies KISS (`principles/technical-principles.md`). Absent and null fields are normal: API users get no `rate_limits`. Claude Code's schema changes more often by renaming or removing a field than by changing a field's type, and a type warning catches neither. Warning on types would need a table of the schema to catch only the rarer change. Valid while `parse` reads the fields one by one, with no schema table.
|
||||||
|
|
||||||
|
## statusline.py: the reset's weekday is English on every machine
|
||||||
|
|
||||||
|
2026-10-02, lilleman in PR #191, answering the product-owner review: the old `date +%a` followed `LC_TIME`; Python's `%a` does only after `setlocale`, which made the pure `reset_suffix` read process-wide state. Serves goal 1: the status line reads the same on every machine. Valid while the status line is read by its author alone.
|
||||||
|
|||||||
Reference in New Issue
Block a user