Datasets:
prompt stringlengths 2.98k 123k | completion stringlengths 161 11k | turn_id stringlengths 32 82 | traj_id stringlengths 30 79 | source stringclasses 8
values | language stringclasses 5
values | phase stringclasses 4
values | stratum stringlengths 15 59 | n_prefix_chars int64 2.89k 120k | n_prefix_tokens int64 739 30k | teacher_lift float64 0 0.78 | modal_share float64 0.11 1 | modal_action_share float64 0.01 1 | modal_norm_share float64 0.01 1 | n_distinct_actions int64 1 200 | n_pool_refs int64 1 257 | thought stringlengths 80 3.49k | action stringlengths 15 10.8k | clean_flags stringclasses 31
values | duel_epoch int64 13 13 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<|im_start|>system
You are a helpful assistant that can interact multiple times with a computer shell to solve programming tasks.
Your response must contain exactly ONE bash code block with ONE command (or commands connected with && or ||).
Include a THOUGHT section before your command where you explain your reasoning... | </think>
THOUGHT: I found the relevant file. The `bleach/linkifier.py` file is likely where the LinkifyFilter is implemented. Let's examine this file to understand how it handles URLs and callbacks.
The analysis is complete. Next command:
```bash
cat bleach/linkifier.py
``` | mozilla__bleach.73871d76.func_pm_op_break_chains__p79vmqxd:2 | mozilla__bleach.73871d76.func_pm_op_break_chains__p79vmqxd | swe | python | mozilla__bleach|func_pm | 7,058 | 1,701 | 0.218398 | 1 | 0.666667 | 1 | 2 | 3 | I found the relevant file. The `bleach/linkifier.py` file is likely where the LinkifyFilter is implemented. Let's examine this file to understand how it handles URLs and callbacks. | ```bash
cat bleach/linkifier.py
``` | suffix_cue_added | 13 | |
<|im_start|>system
You are a helpful assistant that can interact multiple times with a computer shell to solve programming tasks.
Your response must contain exactly ONE bash code block with ONE command (or commands connected with && or ||).
Include a THOUGHT section before your command where you explain your reasoning... | </think>
THOUGHT: Great, I found the file. Now let's examine its contents to understand the issue with the `moduleFactoryFactory` function that's returning `moduleFactory` before it's defined.
The analysis is complete. Next command:
```bash
cat ./bleach/_vendor/html5lib/_utils.py
``` | mozilla__bleach.73871d76.func_pm_ctrl_shuffle__y2u3kdu1:2 | mozilla__bleach.73871d76.func_pm_ctrl_shuffle__y2u3kdu1 | swe | python | mozilla__bleach|func_pm | 6,088 | 1,466 | 0.014147 | 1 | 1 | 1 | 1 | 3 | Great, I found the file. Now let's examine its contents to understand the issue with the `moduleFactoryFactory` function that's returning `moduleFactory` before it's defined. | ```bash
cat ./bleach/_vendor/html5lib/_utils.py
``` | suffix_cue_added | 13 | |
<|im_start|>system
You are a helpful assistant that can interact multiple times with a computer shell to solve programming tasks.
Your response must contain exactly ONE bash code block with ONE command (or commands connected with && or ||).
Include a THOUGHT section before your command where you explain your reasoning... | </think>
THOUGHT: Excellent! All the exact examples from the issue description are now working correctly. The fix I implemented is minimal, consistent with the existing codebase pattern, and resolves the `NameError: name 'data' is not defined` issue that was occurring in the `tagOpenState` method of `HTMLTokenizer`.
L... | mozilla__bleach.73871d76.func_pm_remove_assign__9d0pmwf2:39 | mozilla__bleach.73871d76.func_pm_remove_assign__9d0pmwf2 | swe | python | mozilla__bleach|func_pm | 42,826 | 11,925 | 0.013808 | 0.666667 | 0.666667 | 0.666667 | 2 | 3 | Excellent! All the exact examples from the issue description are now working correctly. The fix I implemented is minimal, consistent with the existing codebase pattern, and resolves the `NameError: name 'data' is not defined` issue that was occurring in the `tagOpenState` method of `HTMLTokenizer`.
Let me submit the f... | ```bash
echo COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT && git add -A && git diff --cached
``` | suffix_cue_added | 13 | |
<|im_start|>system
You are a helpful assistant that can interact multiple times with a computer shell to solve programming tasks.
Your response must contain exactly ONE bash code block with ONE command (or commands connected with && or ||).
Include a THOUGHT section before your command where you explain your reasoning... | </think>
THOUGHT: Based on the PR description, the issue is in the `HTMLTokenizer` class, specifically in the `tagOpenState` method. I can see from the file listing that there's a `_tokenizer.py` file in the `bleach/_vendor/html5lib/` directory. This is likely where the HTMLTokenizer is defined. Let me examine this fil... | mozilla__bleach.73871d76.func_pm_remove_assign__9d0pmwf2:2 | mozilla__bleach.73871d76.func_pm_remove_assign__9d0pmwf2 | swe | python | mozilla__bleach|func_pm | 7,417 | 1,867 | 0.067787 | 1 | 0.333333 | 0.666667 | 3 | 3 | Based on the PR description, the issue is in the `HTMLTokenizer` class, specifically in the `tagOpenState` method. I can see from the file listing that there's a `_tokenizer.py` file in the `bleach/_vendor/html5lib/` directory. This is likely where the HTMLTokenizer is defined. Let me examine this file to understand th... | ```bash
grep -n "tagOpenState\|data" bleach/_vendor/html5lib/_tokenizer.py | head -20
``` | suffix_cue_added | 13 | |
<|im_start|>system
You are a helpful assistant that can interact multiple times with a computer shell to solve programming tasks.
Your response must contain exactly ONE bash code block with ONE command (or commands connected with && or ||).
Include a THOUGHT section before your command where you explain your reasoning... | </think>
THOUGHT: I can see this is a repository for the `bleach` library, which is an HTML sanitization library. The issue mentions HTMLSerializer in the vendored html5lib. I need to find the serializer file, which is likely in the vendored html5lib directory. Let me continue exploring to find the serializer.
The ana... | mozilla__bleach.73871d76.func_pm_remove_assign__kvnou6r5:2 | mozilla__bleach.73871d76.func_pm_remove_assign__kvnou6r5 | swe | python | mozilla__bleach|func_pm | 7,752 | 1,860 | 0.068578 | 1 | 0.333333 | 0.333333 | 3 | 3 | I can see this is a repository for the `bleach` library, which is an HTML sanitization library. The issue mentions HTMLSerializer in the vendored html5lib. I need to find the serializer file, which is likely in the vendored html5lib directory. Let me continue exploring to find the serializer. | ```bash
find . -type f -name "*serializer*" -o -name "* Serializer*"
``` | suffix_cue_added | 13 | |
<|im_start|>system
You are a helpful assistant that can interact multiple times with a computer shell to solve programming tasks.
Your response must contain exactly ONE bash code block with ONE command (or commands connected with && or ||).
Include a THOUGHT section before your command where you explain your reasoning... | </think>
THOUGHT: Now let me approach this more carefully. I need to replace the `\(*` part with nothing while keeping the rest of the regex structure intact. Let me do a targeted replacement:
The analysis is complete. Next command:
```bash
sed -i 's/\\\\\\\\(\* # Match any opening parentheses./ # Removed parenthes... | mozilla__bleach.73871d76.func_pm_remove_assign__bznv6zkw:39 | mozilla__bleach.73871d76.func_pm_remove_assign__bznv6zkw | swe | python | mozilla__bleach|func_pm | 53,517 | 14,877 | 0.077427 | 0.666667 | 0.333333 | 0.333333 | 3 | 3 | Now let me approach this more carefully. I need to replace the `\(*` part with nothing while keeping the rest of the regex structure intact. Let me do a targeted replacement: | ```bash
sed -i 's/\\\\\\\\(\* # Match any opening parentheses./ # Removed parentheses matching/' ./bleach/linkifier.py
``` | reopened_think_tag,suffix_cue_added | 13 | |
<|im_start|>system
You are a helpful assistant that can interact multiple times with a computer shell to solve programming tasks.
Your response must contain exactly ONE bash code block with ONE command (or commands connected with && or ||).
Include a THOUGHT section before your command where you explain your reasoning... | </think>
THOUGHT: I can see this is a Python repository with bleach, which is a library for sanitizing HTML. Since the issue is about URLs with parentheses and port numbers not being handled correctly, I need to find files related to URL parsing or linkification. Let me examine the main bleach directory structure first... | mozilla__bleach.73871d76.func_pm_remove_assign__bznv6zkw:2 | mozilla__bleach.73871d76.func_pm_remove_assign__bznv6zkw | swe | python | mozilla__bleach|func_pm | 6,835 | 1,691 | 0.30694 | 0.666667 | 0.333333 | 0.333333 | 3 | 3 | I can see this is a Python repository with bleach, which is a library for sanitizing HTML. Since the issue is about URLs with parentheses and port numbers not being handled correctly, I need to find files related to URL parsing or linkification. Let me examine the main bleach directory structure first. | ```bash
ls -la bleach/
``` | suffix_cue_added | 13 | |
"<|im_start|>system\nYou are a helpful assistant that can interact multiple times with a computer sh(...TRUNCATED) | "</think>\nTHOUGHT: Let me check the specific lines around the HTMLParser.__init__ method more caref(...TRUNCATED) | mozilla__bleach.73871d76.func_pm_ctrl_shuffle__i08mny8w:44 | mozilla__bleach.73871d76.func_pm_ctrl_shuffle__i08mny8w | swe | python | mozilla__bleach|func_pm | 49,645 | 13,813 | 0.063342 | 0.666667 | 0.333333 | 0.333333 | 3 | 3 | Let me check the specific lines around the HTMLParser.__init__ method more carefully: | ```bash
sed -n '93,110p' ./bleach/_vendor/html5lib/html5parser.py
``` | reopened_think_tag,suffix_cue_added | 13 | |
"<|im_start|>system\nYou are a helpful assistant that can interact multiple times with a computer sh(...TRUNCATED) | "</think>\nTHOUGHT: Now I've found the relevant file. I need to examine the InCellPhase class in the(...TRUNCATED) | mozilla__bleach.73871d76.func_pm_class_shuffle_funcs__9w1txkpx:2 | mozilla__bleach.73871d76.func_pm_class_shuffle_funcs__9w1txkpx | swe | python | mozilla__bleach|func_pm | 6,238 | 1,473 | 0.027646 | 0.666667 | 0.666667 | 0.666667 | 2 | 3 | "Now I've found the relevant file. I need to examine the InCellPhase class in the html5parser.py fil(...TRUNCATED) | ```bash
grep -n "class InCellPhase" ./bleach/_vendor/html5lib/html5parser.py
``` | suffix_cue_added | 13 | |
"<|im_start|>system\nYou are a helpful assistant that can interact multiple times with a computer sh(...TRUNCATED) | "</think>\nTHOUGHT: Let me search more broadly in the bleach codebase for where the keys() method mi(...TRUNCATED) | mozilla__bleach.73871d76.func_pm_remove_cond__hzv02o0o:13 | mozilla__bleach.73871d76.func_pm_remove_cond__hzv02o0o | swe | python | mozilla__bleach|func_pm | 52,486 | 12,664 | 0.093898 | 1 | 0.333333 | 0.333333 | 3 | 3 | "Let me search more broadly in the bleach codebase for where the keys() method might be called on to(...TRUNCATED) | ```bash
grep -r "\.keys" bleach/
``` | reopened_think_tag,suffix_cue_added | 13 |
End of preview. Expand in Data Studio
tessera — corpus epoch 13, full sweep
Teacher-anchored SFT data harvested from every published Affine (Bittensor
SN120) duel scored against corpus epoch 13 — 230 duel records, chal-00760
through chal-01102, covering 2026-08-16 to 2026-08-24.
42,006 rows over 42,006 distinct turns (one row per turn), drawn from
4,981 trajectories and 3,751 strata. That is 70% of the 59,745-turn epoch-13
corpus, and 2.3× the 18,138 rows of
iamPi/tessera-77d11909,
which sampled a subset of the same epoch from the first 76 duels.
Nothing here is private: the subnet publishes every duel record
(s3.hippius.com/affine-sn120/evals/) and the corpus behind it
(.../turns/), and invites training on the teacher_refs field. The teacher
is the subnet's frozen zai-org/GLM-4.5-Air-FP8.
Completion format
</think>
THOUGHT: {thought}
The analysis is complete. Next command:
```bash
{command}
The prompt ends inside an open `<think>` block, so the completion opens with
`</think>`. Every completion round-trips through the validator's own
`split_rollout` ([`evalsrv/chat.py`](https://affine.io/code/evalsrv/chat.py))
to exactly the `(thought, action)` stored in the columns — 42,006/42,006.
The trailing cue is the exact suffix the reigning king
(`vera6/affine-5g4yy75zuz-t6`, reign 36) emits on 99.4% of its own duel
thoughts.
## How a row is chosen
1. **Pool** every teacher reference for a turn across all 230 epoch-13 duels
— 816,661 references over 49,577 distinct turns.
2. **Consensus**: take the most common *first token* of the pooled bash
commands. `modal_share` is its share of the pool — that is, whether the
teacher's samples agree on *which command to run*, not on its exact text.
3. **Select** the reference with the highest lift
(`lp_own − lp_empty`) among those whose command starts with the modal
token. `teacher_lift` is that lift.
4. **Join** metadata from `turns/index/turns_0013.parquet` and render the
prompt as `apply_chat_template(prefix, add_generation_prompt=True)`,
appending `<think>` if the template does not already end with it.
This recipe was reverse-engineered from `tessera-77d11909` and verified
against it: prompt bytes 15/15 byte-identical, `n_prefix_tokens` 15/15,
`teacher_lift` 18,138/18,138, `modal_share` 17,545/17,545 on turns whose pool
reproduces exactly.
The tokenizer is the king's own (`vera6/affine-5g4yy75zuz-t6`, a
`qwen3_5_moe`); `n_prefix_tokens` is the token length of `prompt`.
Note `n_prefix_chars` is the corpus's measure of the raw messages and is
**smaller than `len(prompt)`**, which adds the chat-template wrapper.
## Filters
| dropped | rows |
|---|---|
| thought under 80 chars after cleaning | 5,753 |
| prompt over 30,000 tokens | 867 |
| duplicate `(prompt, completion)` pair | 0 |
| teacher lift ≤ 0 | 513 |
| blank thought or action | 397 |
| invalid shell syntax (`bash -n`) | 35 |
| hallucinated environment turn in the thought | 6 |
The 80-char floor mirrors the live contract's `min_thought_chars` and is
measured on the **bare thought**, before the cue is appended, so boilerplate
cannot lift a thin thought over the gate. The token cap keeps every row
inside a 32k context (max observed total: 31,314 tokens). The `bash -n` pass
parses each command without executing it and drops the ones that are not
valid shell.
## Format repairs
Teacher rollouts leak their own reasoning scaffolding — the corpus system
prompt literally instructs the format with a `<format_example>` block
containing `THOUGHT:`, and the teacher echoes it back. Every completion was
normalized:
| repair | rows |
|---|---|
| `<think>` reopened right after the `THOUGHT:` label | 17,010 |
| >1 ```bash block — kept the first, dropped the rest | 803 |
| second `THOUGHT:` label mid-thought | 613 |
| corrupt prefix before a restarted label, dropped | 505 |
| truncated label debris (`THO`, `UGHT`, `THOTHOUGHT:`) | 434 |
| substantive pre-label reasoning merged into the thought | 108 |
| stray `<thinking>` / `<thought>` / `<format_example>` | 91 |
| orphan token glued to a colon | 7 |
`clean_flags` records which repairs applied to each row.
## Columns
`prompt`, `completion` — the training pair.
`thought`, `action` — the parts, with `thought` **excluding** the cue (use it
for length filtering; the cue lives only in `completion`).
`teacher_lift`, `n_pool_refs` — reference quality signals.
`turn_id`, `traj_id`, `stratum`, `source`, `language`, `phase`,
`n_prefix_chars`, `n_prefix_tokens`, `duel_epoch` — provenance.
### Three notions of teacher agreement
The pool for a turn holds several teacher samples. How much they agree depends
entirely on how strictly you compare their commands, so all three are shipped:
| column | compares | mean | median | unanimous |
|---|---|---|---|---|
| `modal_action_share` | byte-identical command | 0.417 | 0.333 | 12.8% |
| `modal_norm_share` | command after representation normalization | 0.428 | 0.333 | 14.0% |
| `modal_share` | first token of the command only | 0.786 | 0.833 | 35.3% |
`n_distinct_actions` is the number of distinct commands in the pool.
The normalization behind `modal_norm_share` erases quoting and whitespace
differences, strips a leading `cd DIR &&`, drops `./` prefixes and the common
`/testbed`, `/app/task_file`, `/workspace` cwd prefixes, and folds
`python3`→`python`. It merges cases like `node /app/task_file/solution.js`
with `cd /app/task_file && node solution.js`. It is deliberately conservative:
a command containing a heredoc is compared by its raw body, never tokenized,
because tokenizing mixes the document text into the argument list and can
collide two scripts that merely look alike.
The important number is the gap. Normalization buys only **+1.1 points** over
byte-exact matching — most teacher disagreement is *genuine* (different
commands entirely), not cosmetic. `modal_share`'s 0.786 is a far weaker claim
than it looks: agreeing that the next command starts with `cat` is not
agreeing on what to do. Filter on `modal_action_share` if you want turns where
the teacher actually converged.
## Mix
`source`: swe 20,529 · terminal_lego 15,461 · scaleswe 2,208 ·
terminal_bench_2 1,055 · nl2repobench 781 · r2e_gym 527 · swerebench_v2 522 ·
multiswe 332
`language`: python 24,337 · shell 16,516 · js 203 · go 185 · ts 174
`phase`: early 15,454 · mid 13,024 · late 10,157 · empty 2,780
(`phase` is blank for a subset of `swe` turns in the corpus itself.)
Prompt tokens: median 6,381, p95 23,537, max 29,992.
Thought chars: median 186, p95 507. Action chars: median 85, p95 2,007.
## Caveats
- **The repo mix is skewed by construction.** Duel turn selection
round-robins over `repo|phase` buckets, so a repo's weight tracks its PR
count, not its data volume. `stratum` and `source` are per row — reweight
if that is not what you want.
- **`modal_share` is vacuous when `n_pool_refs == 1`** (it is trivially 1.0).
Median pool size here is 10, versus 4 in `tessera-77d11909`, because this
build pools 3× as many duels.
- **Deduplication is on the `(prompt, completion)` pair only**, and there are
**zero** such duplicates: every row is a distinct turn with a distinct
prompt. 763 rows share a completion with some other row under a *different*
prompt — the same command is a different lesson in a different context, so
those are kept. The most repeated completion is a turn-0 opener paired with
`ls -la`, appearing 621 times; if that concentration is not what you want,
filter it yourself rather than assuming it was filtered for you.
- Use the **standard (non-conversational) prompt-completion** dataset type in
TRL's `SFTTrainer` — these are plain strings, so no chat template should be
applied on top. Set `max_length` to at least 32,768; the 1,024 default
silently drops every example.
- Downloads last month
- 102