Commit graph

1 commit

Author SHA1 Message Date
Claude
038cdc510c Add the operator shift log as a third evidence source
A shift log is continuously updated, which rules out both stores we already
have. Not doc_chunks: that store is built on doc_number + revision +
effective_date and nothing in it is citable until a human confirms the header,
so a record changing every shift would wear out the gate that makes procedure
citations trustworthy. Not the historian: we hold read-only on imh and may not
write to it at all, it is keyed on the CI Server item and a log entry has no
item, and its seven-day retention would expire the one source that could
outlive it.

So a table in pg-ai, read on the historical lane because that lane's contract
already fits it - a time window, rows, and "no records found" when there are
none. Entries are rows, NOT citations: a citation is a controlled document with
a confirmed revision and an operator's note is not one however true it is. The
Citation contract is untouched.

Routed on the question text rather than a classifier label. Adding a sixth
class to the five-way classifier - the most safety-relevant component in the
stack - to reach one demo source would be a poor trade. Case S01 pins the
trigger.

Demo entries are anchored to the start of today in site local time, so a
re-run always lands them inside the rolling seven days and the shift label
always matches the clock. The alarm fixtures are absolute and have gone stale;
this cannot. Future-dated entries are dropped, and the load asserts the window
and the count rather than trusting them.

Eval, 78 -> 80 cases:
  S01, S02  the shift log, whole and filtered by equipment
  N04       repointed at the environmental discharge licence. The old wording
            asked about the shift log, which now exists, so it had stopped
            testing "no such source" - a different answer from "no records
            found", and the distinction is the point of the case.
  H02       window changed to a relative one. It still fails, on a false
            positive in _contains_quantity: "the last 3 days" reads as a
            fabricated figure, so the correct zero-row answer is rejected.
            Left for its own change.

80 cases: 97.5% overall, 100% classification, p95 5257 ms. One contract
violation (H02), so the Phase 8 gate is still not met.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 13:01:31 +10:00