Files
aimsight-optimizer/sessions/SNCF01_2026-10-14T0645_2026-10-22T1030_20261118T1350Z/tools.md
T

63 lines
4.7 KiB
Markdown

# Modification
**Verdict**: nothing to change
**Changed**: none
**data.py**: unchanged
## What the analyst used
- Tools: `inventory.py` (window), `overview.py` (`--table no` on the window; `--rigid` on 19/10 and 20/10 with `--follow`), `ranges.py` (`--rolling 4 --instants 2` on corr; `--min-measurements 4` on the references' error_value), `days.py --bounds --smoothing 3 --night 0-4` (target median, then per sensor), `summary.py` (15 min `--mark` tables on the moments), `metrics.py` (empty metrics), `plot.py`, `thumbnails.py`. `quality.py` did not apply (no quality columns).
- Own script: `scripts/build_labels.py` (writes `labels.jsonl`; only useful for this range).
- What got in the way:
1. `days.py --bounds` on the target median said "never > 5 noises" on most cycle days, because some targets rise while others fall in the same day and the median cancels them. The analyst then ran `days.py --bounds --sensors <one>` for 5 targets in a shell `for` loop (the guide forbids loops), and asked for a sentence in the guide.
2. `ranges.py --rolling 4` did not catch a slow three-hour shift; `days.py` and `overview.py --rigid` did.
3. `precedents.py` did not answer (Ollama had no model). That is a labeling tool, not part of the tools.
4. A second shell loop ran `ranges.py` over four short windows, with a dummy `--outside` (a one-minute window) and `--k 3`. It only served to check single night points on this range.
## Diagnosis
- `days.py --bounds`, target median: when targets move in opposite directions over the day, their median cancels out. Reading one target at a time needs one run per sensor (`--sensors X`). The fault is in the tool's design, which has no way to give one series per sensor, and in the guide, which never says that the median can cancel. The guide already points in that direction ("`--sensors` the targets that carry the cycle", "`--fraction 0.3`"), but only for other symptoms.
- `ranges.py --rolling 4`: works as documented. Rolling with N measurements removes any deviation longer than the window, and the guide already says to use "a few hours to a day" under a drift. No defect in the tool.
- The `ranges.py` loop with a dummy `--outside`: served only this range. No defect in the tool.
## What I decided
- `days.py`: left. The right fix has two parts: a `--each` option, so that `--bounds` gives one series per sensor of `--sensors` in a single command with no loop, and a sentence in the `days.py` section of `GUIDE.md` saying that the target median cancels targets that move in opposite directions (then use `--each --sensors`). Both need a `GUIDE.md` change. Per `tools/CLAUDE.md`, a new option enters the guide in the same change, and the request forbids committing `GUIDE.md` (already modified by another session). A script-only change would break the target's rule, so I made none (see "Not fixed").
- `ranges.py`: left. It behaves as the guide says.
- `build_labels.py`, the ranges loop: left where they are (specific to this range).
- `precedents.py`: outside the target.
## What changed
none
## Why
No change: the one defect worth fixing needs `GUIDE.md`, which this request does not allow me to commit.
## Checks
No fix, so no trial command. I reread the analyst's own output (`work/days_bounds.txt`): the `corr_x` lines for the target median say "never > 5 noises" on 15, 16, 17, 19, 20 and 21/10. Over the same days the analyst measured P7 cx at +12.9 to +27.6 noises when run alone. This confirms point 1.
Report commands rerun: 0, no failure (nothing changed).
## For the user to decide
- Whether to apply, in a later session where `GUIDE.md` is free, `days.py --bounds --each` (one series per sensor of `--sensors`, each with its own level, noise and day lines prefixed with the sensor name) together with its guide sentence. An alternative needing only the guide: one sentence in the `days.py` reading paragraph ("a median that never exceeds while single targets move: the targets cancel, run `--sensors` one at a time"). That sentence would still leave the analyst one command per sensor.
## Not fixed
- The target median of `days.py --bounds` hides opposite movements, and the per-sensor workaround needs a loop: not fixed, because the fix needs `GUIDE.md`, which this request forbids committing.
## Limits
none
## Tools
none
## Difficulties
- The request forbids committing `GUIDE.md` (already modified, uncommitted line in "Read first"), while `tools/CLAUDE.md` requires a new option or a guide sentence to go into `GUIDE.md` in the same change. Every fix this evidence calls for goes through the guide, so I committed nothing.
- The output folder already held files from another session (`modification.md`, `validation.md`, `*-S1.txt`, `tools/`). I left them untouched and wrote only `tools.md`.