File size: 4,097 Bytes
f50dbbb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---
license: apache-2.0
language:
  - en
size_categories:
  - n<1K
tags:
  - reinforcement-learning
  - code
  - llm
  - swe-rl
  - harbor
  - pr_diff
---

[![View tasks in Harbor Visualiser](https://img.shields.io/badge/🤗%20Harbor%20Visualiser-View%20tasks-FFD21F?style=for-the-badge)](https://huggingface.co/spaces/HuggingFaceH4/harbor-visualiser?dataset=Ktanmay21/aws-cli-diff)

# aws-cli-diff

Generated by [**Repo2RLEnv**](https://github.com/huggingface/Repo2RLEnv) — turning real GitHub repositories into verifiable RL environments.

> 💡 **Browse this dataset in your browser** — click the badge above or open
> [`HuggingFaceH4/harbor-visualiser`](https://huggingface.co/spaces/HuggingFaceH4/harbor-visualiser?dataset=Ktanmay21/aws-cli-diff)
> to inspect every task's spec, instruction, oracle patch, test script, and Dockerfile.

- **Source repo**: [`aws/aws-cli`](https://github.com/aws/aws-cli)
- **Pipeline**: [`pr_diff`](https://github.com/huggingface/Repo2RLEnv/blob/main/docs/pipelines/pr_diff.md)
- **Tasks**: 15
- **Visibility**: public
- **Spec**: Harbor task format with the `[metadata.repo2env]` extension

## How it was generated

Each task in this dataset was produced by the [`pr_diff` pipeline](https://github.com/huggingface/Repo2RLEnv/blob/main/docs/pipelines/pr_diff.md). The pipeline mines real merged pull requests / commits from the source repo(s), applies quality filters, strips information-leakage from the instruction text, and emits a [Harbor](https://github.com/harbor-framework/harbor)-shaped task directory with the gold patch as the oracle.

Reproduce locally:

```bash
pip install repo2rlenv
repo2rlenv generate \
  --repo <owner>/<repo> \
  --pipeline pr_diff \
  --pipeline-opt limit=10 \
  --out ./datasets/my-pr_diff
```

See the [pipeline docs](https://github.com/huggingface/Repo2RLEnv/blob/main/docs/pipelines/pr_diff.md) for the full option list + reward design.

## Run with Harbor

Each task ships a `environment/Dockerfile` and `tests/test.sh`, so you can
score patches end-to-end:

```bash
# Pull the dataset locally
repo2rlenv pull Ktanmay21/aws-cli-diff /tmp/aws-cli-diff

# Confirm structural soundness — oracle adapter applies the gold patch
# and must score reward = 1.000
harbor run -p /tmp/aws-cli-diff -a oracle --env docker

# Score an agent (claude-code + Sonnet 4.6)
harbor run \
  -p /tmp/aws-cli-diff \
  -a claude-code -m anthropic/claude-sonnet-4-6 \
  --ak max_budget_usd=2.00 \
  --ae ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
  --env docker
```
The reward is a **6-component diff-similarity** score (format / size / file-targeting / region-overlap / changes-only similarity / LLM-judge). The `--ve ANTHROPIC_API_KEY=...` verifier-env pass enables the LLM-judge component; without it the verifier still produces a valid score with `llm_judge: null` and the deterministic weights renormalized. Full breakdown in `/logs/verifier/reward.json`.

## Reward signal

The reward function is part of the task itself (`tests/test.sh` + the
verifier code baked into the image). The full per-task breakdown is
written to `/logs/verifier/reward.json` at run time — useful for slicing
training data by component.

See the [pipeline doc](https://github.com/huggingface/Repo2RLEnv/blob/main/docs/pipelines/pr_diff.md#multi-component-reward) for the component-by-component design.

## Layout

```
tasks/
└── <task-id>/
    ├── task.toml          # Harbor task with [metadata.repo2env]
    ├── instruction.md     # natural-language prompt
    ├── solution/
    │   ├── patch.diff     # oracle (gold) diff
    │   └── solve.sh       # oracle adapter applies patch.diff
    ├── environment/
    │   └── Dockerfile     # builds the task's container
    └── tests/
        └── test.sh        # verifier — writes /logs/verifier/reward.txt
```

## License

Apache-2.0 — same as Repo2RLEnv itself. The original PR contents remain
under their respective source-repo licenses; this dataset redistributes
public commits under fair-use for ML research / training-data purposes.