Skip to content

Companion standards, and repairs that keep the whole answer - #35

Merged
daniel-rossier merged 3 commits into
mainfrom
standard-repair-fixes
Nov 26, 2026
Merged

daniel-rossier merged 3 commits into
mainfrom
standard-repair-fixes

Conversation

@daniel-rossier

Copy link
Copy Markdown
Contributor

Two changes found while answering an IPI question bound to ARM DDI 0487.

Truncated repaired answers. The normative repair prompt cut the rejected answer at 1200 characters and asked the model to keep everything the findings did not touch; the model copied the answer up to the cut and stopped there, and the fragment was shown in place of a complete answer. The prompt now carries the whole answer. A repair whose draft carries a tool call, stops at the token limit or ends mid-sentence now fails, so the original is withheld as before. The repair call is recorded with the purpose normative_repair, and final_success only labels a primary turn whose output is the answer the user saw.

Companion standards. DDI 0487 names the GIC system registers and defers their fields to the GIC architecture specification (IHI 0069), so one question can need both. /standard add <id> <revision> binds a document beside the active one and /standard drop <id> removes it. Search covers every bound standard (results interleaved by rank), fetch and cite find the standard holding a source, the model is told which companions are bound, and the guards recognise their names. The conformance verdict is still judged against the active standard.

Tests: new test_standard_companions.py and additions to the repair and training-data tests; 1942 tests across the 85 touched or neighbouring modules pass (PYTHONPATH=tests).

…er saw

The normative repair prompt cut the rejected answer at 1200 characters
and told the model to keep everything the findings did not touch. The
model kept it, copied the answer up to the cut, and stopped there: the
two truncated answers seen in use ("If you want, I can pull the", and a
source id cut in half) were the originals' first 1200 characters,
rewritten. The prompt now carries the rejected answer in full.

The fragment was then accepted and shown in place of a complete answer.
As a second line of defence, a repair now fails when its draft carries a
tool call, stops at the token limit, or ends mid-sentence, so the
original is withheld as before.

The episode labelled that fragment final_success: the repair was
recorded as a primary_agent turn and the label went to the last turn
whatever the user was shown. The repair call is now recorded with the
purpose normative_repair, and final_success goes to the last turn only
when it is a primary turn whose output is the visible answer, so a
withheld or replaced answer no longer becomes a positive example.
A question can need two documents: the Arm Architecture Reference Manual
names the GIC system registers and defers their fields to the GIC
architecture specification, so an answer about raising an SGI needs
both, and only one standard could be bound.

/standard add <id> <revision> binds another document beside the active
one, /standard drop <id> removes it. Companions are kept in the active
binding file, held to the same canonical-source check, carried in the
session's binding as "companions", shown on the banner, in status and
list, and staged into an image only with their documents.

standard.search covers every bound standard when no standard_id is
given, interleaving the results by rank since scores from two corpora
are not on one scale; fetch and cite find the standard holding the
source; standard_id selects one. The model is told which companions are
bound, and the guards recognise their names. A conformance verdict is
still judged against the active standard alone.
Two kinds of number slipped through every guard in real answers: a
register field copied at the wrong bit ("IRM, bit [40]" answered as
bit [4]) and file:line references counted by hand off sed output
(ipi_setup_sgi cited at smp.c:1230, defined at 1231).

The normative claims guard now collects the positions register
descriptions state ("FIELD, bit [n]", "FIELD, bits [h:l]") and reports
MISPOSITIONED_FIELD when an answer gives a field a position none of them
states. Only fields the evidence positions are checked, and any stated
position satisfies a claim, since one field name recurs across
registers. The finding is repairable, as wording.

The final answer's file:line references are checked against the files
the turn touched: when the line does not hold the symbol named beside
the reference but exactly one line within three does, the reference is
corrected and the answer says so; anything else is left as written.
@daniel-rossier
daniel-rossier merged commit 2121566 into main Nov 26, 2026
2 checks passed
@daniel-rossier
daniel-rossier deleted the standard-repair-fixes branch November 26, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant