yau-plant-assistant/api/tools
Claude 41c4cbbbdc Correct H29 and the retention framing: the query window is always one week
The query window is a rolling seven days by design, and stays that way against
the real SQL historian - it is not parsed out of the question. Two things I
wrote assumed otherwise.

H29 was wrong in two ways. It demanded the words "retention" and "seven days",
and it BANNED "no records found" - which contradicts CLAUDE.md, where that is
the required wording for zero rows. With a fixed one-week window June genuinely
has zero rows in what was queried, so the phrase is correct rather than evasive.
It also described the missing piece as question-window parsing, which is not a
gap but the design.

Rewritten to pin the risk that actually exists: SUBSTITUTION. A question naming
June must never be answered with this week's figure wearing June's label.
Answering "there were 14" would be exactly that, and nothing downstream could
catch it. The observed answer refuses the substitution and states the window it
used, so the case now passes on its merits rather than being red by default.
must_not is the only half run_eval enforces, so the banned phrases are ones
that appear only on a substitution.

outside_retention is reframed as what it is: a GUARD, always false while every
caller asks for seven days, there so a caller who later passes a longer window
cannot get an empty result that reads as "nothing happened".

REQUESTS.md and the removal guide now say that extending retention on its own
is inert - the window would still ask for a week of a longer history. Both
halves are needed, or neither.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-31 16:49:02 +10:00
..
__init__.py Scaffold the WRPS plant operations assistant repository 2026-08-20 13:56:32 +10:00
equipment.py Scaffold the WRPS plant operations assistant repository 2026-08-20 13:56:32 +10:00
metrics.py Correct H29 and the retention framing: the query window is always one week 2026-08-31 16:49:02 +10:00
retrieval.py Identify the procedure first, then withhold its steps 2026-08-28 10:54:13 +10:00