feat: benchmark credential parity, transcript, honest results + read-tier accuracy (tasks 0032, 0033) #36

Merged
alexion merged 10 commits from task-0032-bench-read-report-persistence into main 2026-07-18 10:28:33 -04:00
Owner

Summary

This branch began as read-tier accuracy work (tasks 0032/0033) and grew to fix a benchmark-fairness bug it surfaced, add the tooling that made the diagnosis possible, and correct the published results.

Read-tier accuracy (original scope — tasks 0032/0033)

  • Persist the agent's final report on read result records (0032).
  • Name the filtered state in the issue-list count line (0033).
  • Run the bench agent in a neutral working directory, so a forgotten -R errors instead of silently resolving the harness's own checkout.

Benchmark fairness — credential parity

The neutral-working-directory change above removed the gitea-axi arm's only source of credentials — it had been defaulting repo and login from the harness checkout — leaving it the one arm the harness never authenticated.
It then had to reverse-engineer the tea-login system on every task, burning ~4 turns each; since turns drive cache-read (the dominant cost metric), this alone made gitea-axi look like the worst arm.

  • Pre-authenticate the gitea-axi arm through its own env interface (GITEA_AXI_API_URL / GITEA_AXI_TOKEN), the symmetric counterpart to the gitea-mcp server's env.
  • Verified live: create-memory-leak-issue dropped from 10 turns to 3.

Transcript persistence

  • Persist the ordered tool transcript on every result record, so an arm's turn cost is diagnosable directly from the store.
  • This is the feature that made the credential diagnosis possible in the first place.

issue view: labels by default + --fields

  • issue view never rendered labels and gave no way to add them, forcing a round-trip through issue list --fields labels.
  • Show labels by default (a detail view should be complete) and add a --fields flag (assignees, closedAt, milestone, updatedAt, url), mirroring issue list / search.
  • Strengthen SKILL.md: the required search issues / search prs subcommand form, and pointing agents at issue view for a single issue's fields.
  • Verified live: read-issue-labels-and-state dropped from 10 turns to 4.

Honest results

  • Rewrite bench/README.md against a clean 4-arm snapshot (240 samples, all arms fairly credentialed, executed together).
  • Raw REST posts the lowest cost-equivalent tokens and leads every tier; gitea-axi is a clear second and the lowest-cost structured interface, beating gitea-mcp and tea on every tier at 100% success.
  • The prior "gitea-axi wins on cost" claim rested on the pre-isolation checkout credentials and is corrected; the raw-REST arm is kept, since a benchmark of agent-CLIs that omits the token floor always crowns the wrapper.

Tests

All green — 390 project tests, 115 bench tests.
New behavior (transcript persistence, the arm credential env, issue view labels, issue view --fields) was written test-first through the test-driven-development sub-agent.

## Summary This branch began as read-tier accuracy work (tasks 0032/0033) and grew to fix a benchmark-fairness bug it surfaced, add the tooling that made the diagnosis possible, and correct the published results. ## Read-tier accuracy (original scope — tasks 0032/0033) - Persist the agent's final report on read result records (0032). - Name the filtered state in the issue-list count line (0033). - Run the bench agent in a neutral working directory, so a forgotten `-R` errors instead of silently resolving the harness's own checkout. ## Benchmark fairness — credential parity The neutral-working-directory change above removed the gitea-axi arm's only source of credentials — it had been defaulting repo and login from the harness checkout — leaving it the one arm the harness never authenticated. It then had to reverse-engineer the `tea`-login system on every task, burning ~4 turns each; since turns drive cache-read (the dominant cost metric), this alone made gitea-axi look like the worst arm. - Pre-authenticate the gitea-axi arm through its own env interface (`GITEA_AXI_API_URL` / `GITEA_AXI_TOKEN`), the symmetric counterpart to the gitea-mcp server's env. - Verified live: `create-memory-leak-issue` dropped from 10 turns to 3. ## Transcript persistence - Persist the ordered tool transcript on every result record, so an arm's turn cost is diagnosable directly from the store. - This is the feature that made the credential diagnosis possible in the first place. ## `issue view`: labels by default + `--fields` - `issue view` never rendered labels and gave no way to add them, forcing a round-trip through `issue list --fields labels`. - Show labels by default (a detail view should be complete) and add a `--fields` flag (assignees, closedAt, milestone, updatedAt, url), mirroring `issue list` / `search`. - Strengthen `SKILL.md`: the required `search issues` / `search prs` subcommand form, and pointing agents at `issue view` for a single issue's fields. - Verified live: `read-issue-labels-and-state` dropped from 10 turns to 4. ## Honest results - Rewrite `bench/README.md` against a clean 4-arm snapshot (240 samples, all arms fairly credentialed, executed together). - Raw REST posts the lowest cost-equivalent tokens and leads every tier; gitea-axi is a clear second and the lowest-cost *structured* interface, beating gitea-mcp and tea on every tier at 100% success. - The prior "gitea-axi wins on cost" claim rested on the pre-isolation checkout credentials and is corrected; the raw-REST arm is kept, since a benchmark of agent-CLIs that omits the token floor always crowns the wrapper. ## Tests All green — 390 project tests, 115 bench tests. New behavior (transcript persistence, the arm credential env, `issue view` labels, `issue view --fields`) was written test-first through the test-driven-development sub-agent.
alexion added 1 commit 2026-07-17 09:51:35 -04:00
feat: persist agent report on read result records (task 0032)
All checks were successful
CI / test (pull_request) Successful in 52s
4cbed21ff3
Retain the agent's final report on the benchmark result record for read
tasks, so a failed read is diagnosable directly from the stored record
instead of only carrying an opaque `incorrect` tag. The runner resolves
the scoring spec once and records `run.finalReport` when the spec is a
read; mutation records omit the field entirely. The sample store needs no
change — it serializes whatever record it is handed.

This is the prerequisite for confirming the read-open-issue-count failure
from real report text before the state-aware count-line change (task 0033).
alexion added 1 commit 2026-07-17 10:10:02 -04:00
feat: name filtered state in issue list count line (task 0033)
Some checks failed
CI / test (pull_request) Failing after 54s
1166a48130
Make the `issue list` count line name the state it filtered on, so the
answer to "how many issues are open?" is present on the summary line
rather than only inferable from each row. The count line now renders
`count: 5 open of 5 total`; the command composes the state into a generic
optional qualifier while `formatCountLine` stays state-agnostic, so
`pr list`, `search`, and `dashboard` are unaffected. `--state all` imposes
no narrowing and stays unqualified.

The wording is chosen so an agent quoting the summary lands on a phrase the
benchmark read-checker already accepts (`5 open`), closing the accuracy gap
this feature targets. Pairs with the report persistence in task 0032.
alexion changed title from feat: persist agent report on read result records (task 0032) to feat: read-tier accuracy — report persistence + state-aware count line (tasks 0032, 0033) 2026-07-17 10:10:47 -04:00
alexion added 1 commit 2026-07-17 10:47:00 -04:00
fix: run the bench agent in a neutral working directory
Some checks failed
CI / test (pull_request) Failing after 52s
a6ab749211
The SDK driver ran the agent with no explicit cwd, so its shell inherited
the harness's own checkout. When the agent omitted `-R OWNER/NAME`, the
gitea-axi (and tea) CLI defaulted the repository from that local checkout —
silently resolving the harness repo instead of the seeded throwaway — and
returned a plausible but wrong result (e.g. `count: 0 open of 0 total` for a
repo with no issues). This contaminated read-tier scoring for the checkout-
defaulting arms and was surfaced by the newly persisted read reports.

Give each run a fresh, empty working directory outside any checkout, so a
forgotten `-R` errors instead of hitting the wrong repository, and delete it
when the run ends.
alexion changed title from feat: read-tier accuracy — report persistence + state-aware count line (tasks 0032, 0033) to feat: read-tier accuracy — report persistence, state-aware count line, neutral agent cwd (tasks 0032, 0033) 2026-07-17 10:47:50 -04:00
alexion added 1 commit 2026-07-17 11:56:18 -04:00
fix: ignore markdown emphasis when matching read answers
Some checks failed
CI / test (pull_request) Failing after 51s
05b72f6987
The read checker matched a task's required-fact phrasings as plain
substrings of the agent's report after only lowercasing and collapsing
whitespace. An answer that was substantively correct but wrapped a value in
markdown (e.g. `**5**`) failed the match, because the emphasis markers broke
the phrase adjacency (`**5** open` does not contain `5 open`) — a correct
answer scored incorrect on formatting alone.

Strip markdown emphasis/code markers (`*`, `_`, backtick) during
normalization so the match is on substance, not presentation. A guard test
confirms a wrong value still fails after stripping.
alexion added 5 commits 2026-07-17 22:39:16 -04:00
Records stored only a run's token/turn totals, so an arm's turn cost —
the dominant driver of cache-read tokens — could not be diagnosed from
the store. Retain the ordered transcript of tool invocations (the exact
shell commands, MCP calls, and built-in tools the run made) on every
scored record, absent only for a hung run that produced no transcript.

The canonical TranscriptEntry shape lives on the record (result.ts); the
isolation audit's ToolUse now aliases it so the persisted and audited
shapes cannot drift.
The gitea-axi arm was the only shell arm handed no credentials: the
runner set only PATH, so the agent had to reverse-engineer the tea-login
system — guessing a profile name and hunting for a config file — before
any real work, burning ~4 turns per task. Since turns drive cache-read,
the benchmark's dominant cost metric, this scaffolding gap alone inflated
gitea-axi's cost-equivalent tokens above every other arm.

Hand the arm its host and token through gitea-axi's own env interface
(GITEA_AXI_API_URL / GITEA_AXI_TOKEN), the symmetric counterpart to the
gitea-mcp server's GITEA_HOST / GITEA_ACCESS_TOKEN env: both name the
same two facts, and both still leave the agent to name the repository per
call. A shell arm now carries a credential env (empty for tea and
raw-api, which need none), merged under PATH in the driver.

Also strengthen SKILL.md so a cold agent targets and authenticates on the
first call: an explicit "Targeting and authentication" section replaces
the buried, optional-looking one-liner, spelling out that outside a
checkout `-R OWNER/NAME` plus the environment's token is all that is
needed — do not go hunting for a config file or login profile.

Verified live: create-memory-leak-issue dropped from 10 turns to 3 and
its cache-read fell ~3.8x, with the auth flailing gone from the transcript.
`issue view` rendered state but never labels, and offered no way to add
them — so reading one issue's labels forced a detour through
`issue list --fields labels` and hunting the matching row. The benchmark
transcripts showed agents paying this round-trip on every labels/state
read.

Show labels by default in the detail view (a detail view should be
complete), and add a `--fields` flag mirroring `issue list` / `search`
to append assignees, closedAt, milestone, updatedAt, url on request.

Also strengthen SKILL.md against the two command-discovery round-trips
the transcripts exposed: name the required `search issues` / `search prs`
subcommand form (a bare `search "<query>"` is invalid), and point agents
straight at `issue view <n>` for a single issue's fields.

Verified live: read-issue-labels-and-state dropped from 10 turns to 4
(cache-read ~3.3x lower), the transcript reduced to three clean commands
with the search-help and issue-list round-trips gone.
docs: rewrite bench results for the clean 4-arm snapshot
Some checks failed
CI / test (pull_request) Failing after 54s
040daed39d
The prior results table and narrative claimed gitea-axi posts the lowest
cost-equivalent tokens. That snapshot predated the neutral-working-dir
isolation fix, when the checkout-defaulting arms (gitea-axi, tea) drew
repo and login for free from the harness's own checkout — so gitea-axi
was implicitly pre-authenticated and looked like the winner.

On a clean run with every arm fairly credentialed and executed together,
raw REST is the cheapest on cost-equivalent tokens and leads every tier —
terse HTTP is the token floor no wrapper undercuts. gitea-axi is a clear
second overall and the lowest-cost structured interface, beating gitea-mcp
and tea on every tier at 100% success. Keep the raw-REST arm and state
this plainly rather than crown the wrapper by omitting the floor.

Numbers regenerated from bench:report over the 240-sample clean snapshot.
alexion changed title from feat: read-tier accuracy — report persistence, state-aware count line, neutral agent cwd (tasks 0032, 0033) to feat: benchmark credential parity, transcript, honest results + read-tier accuracy (tasks 0032, 0033) 2026-07-17 22:40:06 -04:00
alexion added 1 commit 2026-07-17 22:52:15 -04:00
test: update e2e tracer count-line assertions for task 0033
All checks were successful
CI / test (pull_request) Successful in 55s
CI / test (push) Successful in 56s
a557745e59
The state-aware count line from task 0033 (1166a48) renders
`count: N open of M total`, and the unit tests were updated to match, but
the three e2e tracer assertions still expected the old bare
`count: N of M total`. They are skipped without GITEA_AXI_E2E_URL, so the
staleness only surfaced in CI, where the e2e tier runs. Update them to the
state-qualified form the shipped code already produces — default `open`,
`--state closed` → `closed`. The code was correct; the tests were stale.
alexion merged commit a557745e59 into main 2026-07-18 10:28:33 -04:00
alexion deleted branch task-0032-bench-read-report-persistence 2026-07-18 10:28:33 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alexion/gitea-axi#36