You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- derive service name from pyproject.toml
- add uptime starttime and uptime seconds
- add .data total size and first-level directory sizes
- add pytest coverage for the health response shape - 2026-03-15 23:53:00
Copy file name to clipboardExpand all lines: CODING_AGENTS.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,7 @@ Before introducing new types, validators, formats, or storage conventions:
47
47
- When adding new behavior, include tests covering the change.
48
48
- New classes must have pytest coverage at a minimum for IPC and system calls.
49
49
- Use `SystemCall` (`src/pypnm/lib/system_call/`) for subprocess/system calls; do not call `subprocess.run` directly in app code.
50
+
- Avoid `try`/`except` inside hot loops; Ruff PERF rules flag this often. Move exception handling into a helper or restructure the loop before handing back commit/save commands.
- Any changes to `deploy/docker/config/system.json` must also be made in `demo/settings/system.json`.
52
53
- Keep `deploy/docker/config/system.json.template` aligned with `deploy/docker/config/system.json`.
@@ -117,6 +118,7 @@ Before introducing new types, validators, formats, or storage conventions:
117
118
- Testing expectations:
118
119
- Run at least: `python3 -m compileall src`, `ruff check src`, `ruff format --check .`, `pytest -q`.
119
120
- After any code change, run `ruff check src` and `pytest -q`. If only Markdown changes are made, run `mkdocs build -s` instead.
121
+
- Review new loops and exception paths for Ruff performance rules before finalizing; do not rely on the user to discover PERF issues during `git-save.sh`.
120
122
- This is mandatory for every code update in this repo: do not finalize work without reporting `ruff check` and `pytest` results (or a clear blocker).
121
123
- If an integration test is optional/gated (for example Postgres DSN), note skips explicitly in the summary.
If the returned `version` is older than expected, verify the tag used in the deploy command and confirm the namespace matches the running deployment.
41
+
Example response:
42
+
43
+
```json
44
+
{
45
+
"status": "ok",
46
+
"service": {
47
+
"name": "pypnm-docsis",
48
+
"version": "1.4.2.0"
49
+
},
50
+
"uptime": {
51
+
"starttime": 1773640097,
52
+
"uptime": 1
53
+
},
54
+
"data": {
55
+
"path": ".data",
56
+
"size_bytes": 1761579619,
57
+
"directories": {
58
+
"json": 1728244816,
59
+
"xlsx": 0,
60
+
"pnm": 17349665,
61
+
"csv": 2819493,
62
+
"png": 2805111,
63
+
"db": 3388387,
64
+
"archive": 6968882,
65
+
"msg_rsp": 3265
66
+
}
67
+
}
68
+
}
69
+
```
70
+
71
+
If the returned `service.version` is older than expected, verify the tag used in the deploy command and confirm the namespace matches the running deployment.
0 commit comments