Repository navigation
Companion standards, and repairs that keep the whole answer - #35
Merged
Merged
Conversation
…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
force-pushed
the
standard-repair-fixes
branch
from
November 26, 2026 17:38
7bb107b to
e3c18bd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, andfinal_successonly 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.pyand additions to the repair and training-data tests; 1942 tests across the 85 touched or neighbouring modules pass (PYTHONPATH=tests).