Zum Inhalt

Paired replays

Is the reading rendered, the default since #585, better or worse than cleaned? Two runs of evaluate, one for each reading, can't tell: their samples differ, and the engine doesn't answer the same context the same way twice. A paired run replays each sample in two or three ways, its arms, with the same memo and the same moment: A with the reading cleaned, A′ with A again, which shows how often the engine changes its answer by itself, and D with the reading rendered, as #545 describes. evaluate --paired runs one on your computer, and the input paired of the workflow Evaluate on GitHub.

A paired run

In the repository's checkout, as for Measure the accuracy:

export GH_REPO=OWNER/REPO
PYTHONPATH=path/to/issue-assistant python3 -P -m issue_assistant evaluate --paired AAD --issues 20
  • The samples. Not the newest closed issues: evaluate --paired reads every closed issue that evaluate reads, up to 1,000, orders them by the SHA-256 of a fixed seed, the repository and the number, and takes the first that evaluate would replay, up to --issues, at most 100. The order of an issue doesn't change when another one closes, and --skip N,N,… leaves out the issues of an earlier run, such as the line that paired-report gives, and takes the next ones in that order. evaluate without --paired keeps its choice of the newest.
  • The arms. AAD replays each sample with the reading cleaned (A), with it again (A′) and with the reading rendered (D); AD leaves A′ out. The order of the arms turns from sample to sample, so that a drift of the engine over a run counts as no effect of D. The context is written anew for each arm, through one view of GitHub for the sample that keeps each search by its words, each related repository, and the reactions, the permissions and the other issues that an analysis reads: A and A′ read the same bytes, and D searches again only for words of its own text.
  • The renderings. They are asked for once, before the first replay, by number as the reading rendered reads them: the issue and the comments of every sample, with the other issues and the discussions. D asks later only for what that read doesn't hold, such as an older issue that its own search finds, within the same limits of Evaluate, which count each sample once whatever the arms; A and A′ ask for none. When not one text got a rendering, or GitHub failed on the texts so that none was asked for, the run stops before its first replay, with the texts by reason, since D would read what A reads.
  • The files. NAME-paired.json and the report NAME-paired.md go next to the checkout, or where --report names the report, with the file beside it. The file is written anew after each sample, complete false until the last, so a run that stops keeps the samples it finished. An arm that fails is counted by its kind, such as stopped at max_turns or met an error of GitHub, never by its message; any other error ends the run by the name of its type alone. --paired refuses any READING, since it reads both, A on cleaned and D on rendered, and leaves [context] reading aside.
  • The cost. Each arm is a run of the engine's command line, so a paired run costs two or three times what evaluate does: about $0.23 and 42 s a replay with Opus on 2026-11-09, so about $14 and 42 minutes for 20 issues on AAD.

In the workflow Evaluate

The workflow Evaluate of this repository runs a paired run on GitHub, in the job replay with its runner, its firewall, its read-only token and the secret of the environment issue-assistant, as How the numbers get here describes. A maintainer starts it under Actions → Evaluate → Run workflow, or from a terminal:

gh workflow run evaluate.yml --repo Dennis-Otto/issue-assistant \
  -f repository=Dennis-Otto/paperless-sync -f issues=20 -f paired=AAD
  • The inputs. paired is no by default, a measurement of the accuracy page, or AAD or AD; issues takes at most 100 then; reading stays repository, since a paired run reads both, A on cleaned and D on rendered, whatever the repository's reading; and skip takes the issue numbers to leave out, separated by commas without spaces, such as the line of an earlier report for that repository. The step checks skip and reading before the first replay, and refuses skip without paired.
  • The time. The step Replay the closed issues stops after 330 minutes, below the 350 of the job, so that the files of a run that runs out of time are still kept. 100 issues on AAD take about 3.5 hours, with up to 20 minutes for the renderings.
  • The artifact paired keeps paired.json and paired.md for 7 days, also when the step failed or ran out of time: paired.json then holds the samples finished before, with complete false, and paired-report paired.json writes their report. It warns when an earlier step failed before anything was written.
  • The summary of the job gives the lines of the run and the tables of the measures, as the report has them.
  • No paired number reaches the accuracy page. The step sets the output paired in place of report, so the job publish doesn't run.
  • The cost. Each issue costs two replays on AD and three on AAD, about $0.23 each with Opus on 2026-11-09, and at most $1.00, the limit of a replay. So 2 issues on AD cost about $1, 20 on AAD about $14 and 42 minutes, and 100 on AAD about $68, at most $300. A run of each repository may go side by side, since only runs of one repository wait for each other.
  • A first run. 2 issues on AD in one repository show the texts left out by reason, and the requests and the points of the renderings, before a larger run. Then one run for each repository, and paired-report with all of their files pools them: download the artifacts, such as with gh run download RUN --repo Dennis-Otto/issue-assistant --name paired --dir RUN, and give paired-report each paired.json.

The file and the report

  • The file. A paired run keeps NAME-paired.json, one entry for each sample: numbers, booleans and issue numbers, and of words only the repository, the engine, the model, the day and the names that issue_assistant/pairing.py gives, such as the arms and the reasons why a text was left out. It holds no name of a label: each measure is given by its counts of right and wrong choices. What the converter took out is counted by its kinds alone, never by the names that the notices show, so that the reader of the file still knows each word that it may hold; an arm of a file written before these counts reads as one that took out nothing.
  • The report. paired-report FILE.json… writes the report of one or more such files, such as one for each repository of a pilot, of one engine and model; like accuracy-page, it calls no GitHub. The files come from a job with an AI, so it refuses a file with any other kind of value, a file above 2 MB, one whose objects and lists nest deeper than 32 levels (a run nests 7), a repository that isn't owner/name, an engine that the assistant doesn't know and an issue that appears twice for one repository. Its heading, # Paired replays of the issue assistant on …, isn't that of a report of evaluate, so accuracy-page refuses it, and no paired number reaches the accuracy page.
  • What it rests on. The runs with their day, arms, seed, whether each is complete and the issues it skipped; how many samples a maintainer opened, which the assistant never analyzes; how many had their own text changed in D, how many only their context, and how many had their own text left out in D, by reason, which D didn't answer and no pair with D grades; the requests of renderings before the first replay; and for each arm the texts read from their rendering and those left out, by reason (Left out, as …), the sums of what the reading took out of them, what the converter took out of the renderings by kind (Taken out by the converter: unknown to it, hidden by the page, drawings and math as their notes, references and link targets that the source doesn't hold, content below the deepest elements and what a limit of length or width cut), whose names are in the notices of the replays (a replay of a file written before these counts counted nothing: it is left out of the sums, an arm without any shows a dash, and a line says how many replays weren't counted), and the calls of GitHub of its replays, without the reads before the first replay.
  • The measures. A table for Type, Areas, Topics and Priority, with a row for D against A and one for A′ against A: the graded issues, those where the second arm is better and those where it is worse, the share ψ where the two differ with its 95 % Wilson interval, the difference and its one-sided 95 % lower bound. Type and Priority are right when the one choice is among the labels that people chose, and their bound is a Wald bound with a half added to each cell of the 2 × 2 table. Areas and Topics are counts: the mean difference of right choices per issue with its lower bound, and of wrong ones with its upper bound, given only once 10 graded issues differ. Duplicates and questions are counted by agreement, and graded only where there is an original or a reporter who isn't a maintainer.
  • What step 2 needs. The graded issues, the issues, the replays and the dollars for a margin of 5 and of 10 points, by n = ⌈(z₀.₉₅ + z₀.₈₀)² · ψ / margin²⌉, from the ψ of D against A on Type and from the upper end of its interval: with 6 of 60 issues differing, ψ is 10 % (4.7 % to 20.1 %), and a margin of 5 points needs 248 and 499 graded issues; a ψ of 6 % needs 149.
  • Cost and time, issue by issue. For each arm the replays, its failures by kind, the dollars, the mean turns and seconds, and its cost over the samples where it ran first, since a later arm may read part of its prompt from the engine's cache; then a line for each issue with each arm's counts. A failed arm takes its sample out of the pairs with that arm only. For each repository, the issues of its files on one line, ready for --skip of the next run.

What a paired report can't tell

  • It decides no pass. It computes the bounds; the margin, and whether D passes it, are the maintainer's.
  • Below 149 graded issues, the bound holds less well. A seeded simulation of #545 passed a D worse by the margin 6.9 to 12 % of the time with 62 to 75 graded issues, instead of about 6 %; the report marks such a number with *.
  • The issues are mostly their maintainer's own, as the accuracy page says, and a pass speaks for those texts.
  • Duplicates and questions are only agreement: no closed issue of the three repositories of the workflow has a duplicate original that Evaluate sees, and no user's issue holds a maintainer's question.