gitea-fix-diff-highlight-overlap

Based on#36539
SegmentInvestigate-and-fix
Typebug
## Task

we're getting reports that inline diffs in code review look broken.
the add/remove highlighting bleeds into the syntax
colours instead of cleanly marking the changed token. most obvious on small edits like prefixing a
method call. diagnose and fix.

## General instructions

- The code repo is at /repo/gitea.
- You are inside of a Docker container. You may not be able to perform all operations you would normally be able to do on a local machine. Dependencies have not been pre-installed, and you may need to install them yourself.
- You are expected to act autonomously as a software engineer to complete tasks you are given.
- Do not stop until you feel you have completed the task and your code changes can be merged.
- You may need to use software engineering skills like analyzing the codebase, researching technologies, running services, analyzing logs, etc. to complete the task. Not all tasks will be solvable by reading source code alone.

Agent Results

AgentTastefulBasicVerifierValidationRubricBloatPractTasteCheated
Oracle
7/71.0x5.04.0
Gemini 3.1 Pro
2/70.5x3.02.0
Gemini 3.5 Flash
2/71.4x3.02.0
GLM-5.2
2/70.0x5.04.0
GPT-5.4
2/70.1x3.01.0
GPT-5.5
2/73.2x4.03.0
Kimi K2.6
2/70.0x5.03.0
Opus 4.7
2/70.0x5.03.0
Opus 4.8
2/70.0x5.04.0
Sonnet 4.6
2/70.3x3.03.0
Sonnet 5
2/70.0x5.03.0
No-Op
2/7
Agent details

Verifier Tests

Gemini 3.1 Pro2/7

Taste Scores

Patch Bloat0.5x
52 agent / 96 oracle SLOC, 1 / 1 files(raw: 16.2x)
Practice Alignment — 3.0/5
3
style consistency
2
pattern adherence
4
library usage
2
abstraction level
3
documentation fit
Relative Taste — 2.0/5
3
minimality
2
approach quality
2
hygiene
3
fluency
2
craftsmanship

Agent Patch