Skip to content

Commit 551b4c3

Browse files
authored
Update autoresearch instructions for ProjectQ compatibility
Modifikasi instruksi autoresearch untuk fokus pada kontribusi kompatibilitas ProjectQ dengan Python 3.13. Menjelaskan batasan dan tujuan eksperimen serta format output.
1 parent f2a2c21 commit 551b4c3

1 file changed

Lines changed: 148 additions & 0 deletions

File tree

autoloop-run.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Specifikasi yang Dimodifikasi: Autoresearch untuk Kontribusi Open Source
2+
3+
Saya telah memodifikasi instruksi `autoresearch` untuk memperjelas bahwa **auto-run "never stop" HANYA berlaku untuk menyelesaikan task spesifik** (dalam hal ini: kontribusi ProjectQ untuk kompatibilitas Python terbaru), bukan automation tanpa tujuan.
4+
5+
---
6+
7+
## 📋 Spec: ProjectQ Python Compatibility Research
8+
9+
### Tujuan Spesifik
10+
**Fix kompatibilitas ProjectQ untuk Python 3.13+** dengan fokus pada:
11+
1. Fix build break di `setup.py` terkait `compiler.dry_run`
12+
2. Tambah support Python 3.13+ di metadata
13+
3. Update CI matrix untuk testing Python baru
14+
15+
### Setup Eksperimen
16+
17+
Untuk setup eksperimen kontribusi ini:
18+
19+
1. **Agree on run tag**: Usulkan tag berdasarkan tanggal (e.g. `mar5-py313`). Branch `contribution/<tag>` harus fresh.
20+
2. **Create branch**: `git checkout -b contribution/<tag>` dari master
21+
3. **Read in-scope files**:
22+
- `pyproject.toml` — Python version classifiers
23+
- `setup.py` — Build logic (fokus: `compiler.dry_run` issue)
24+
- `CHANGELOG.md` — Version history
25+
- `.github/workflows/ci.yml` — CI Python versions
26+
4. **Verify environment**: Cek Python version dan setuptools version
27+
5. **Initialize results.tsv**: Track progress kontribusi
28+
6. **Confirm and go**: Konfirmasi setup sebelum mulai
29+
30+
### Eksperimentasi
31+
32+
**Time budget**: Setiap eksperimen build/install ~5-10 menit
33+
34+
**Yang BOLEH dilakukan:**
35+
- Modify `setup.py` — Fix `compiler.dry_run` attribute access
36+
- Modify `pyproject.toml` — Tambah Python 3.13 classifier
37+
- Modify CI workflows — Tambah Python version ke test matrix
38+
- Add tests — Validasi build berhasil di Python baru
39+
40+
**Yang TIDAK BOLEH:**
41+
- Break existing Python 3.8-3.12 support
42+
- Add new dependencies tanpa persetujuan maintainer
43+
- Modify core quantum computing logic tanpa need
44+
45+
**Goal**: Build berhasil di Python 3.13+ tanpa break backward compatibility
46+
47+
### Output Format
48+
49+
Setiap build test prints summary:
50+
51+
```
52+
---
53+
python_version: 3.13.0
54+
setuptools_version: 81.0.0
55+
build_status: SUCCESS/FAILED
56+
error_message: (jika ada)
57+
time_seconds: 245.3
58+
```
59+
60+
Extract key metric:
61+
```bash
62+
grep "^build_status:" build.log
63+
```
64+
65+
### Logging Results
66+
67+
Log ke `contribution_results.tsv`:
68+
69+
```
70+
commit python_version setuptools_version build_status description
71+
a1b2c3d 3.12.0 80.0.0 SUCCESS baseline - Python 3.12
72+
b2c3d4e 3.13.0 81.0.0 FAILED dry_run attribute error
73+
c3d4e5f 3.13.0 81.0.0 SUCCESS fixed with getattr() fallback
74+
```
75+
76+
### Experiment Loop
77+
78+
**LOOP UNTIL TASK COMPLETE:**
79+
80+
1. Check git state (current branch/commit)
81+
2. Modify code dengan experimental fix
82+
3. `git commit` dengan deskripsi jelas
83+
4. Run build test: `python -m pip install -e . > build.log 2>&1`
84+
5. Read results: `grep "^build_status:" build.log`
85+
6. Jika FAILED: `tail -n 50 build.log` untuk debug, attempt fix
86+
7. Record results di TSV (jangan commit TSV)
87+
8. Jika SUCCESS: Test di Python version lain untuk verify backward compat
88+
9. Jika semua tests pass: **TASK COMPLETE** — siap buat PR
89+
90+
### Kapan STOP
91+
92+
**Auto-run BERHENTI ketika:**
93+
94+
**Task Selesai**: Build berhasil di Python 3.13+ DAN 3.8-3.12 tetap working
95+
**Blocked**: Butuh keputusan maintainer (e.g. architecture change)
96+
**Max Attempts**: Setelah 10+ attempts tanpa progress signifikan
97+
**Human Interrupt**: User manually stop
98+
99+
**TIDAK indefinite loop** — ini bukan perpetual automation, tapi **task-focused autonomous research**.
100+
101+
### Contoh Timeline
102+
103+
```
104+
Setup (15 min)
105+
├── Baseline test Python 3.12 ✓
106+
├── Reproduce error Python 3.13 ✗
107+
└── Identify root cause: setup.py line 147
108+
109+
Experiment Loop (~5 min each)
110+
├── Attempt 1: Direct attribute access fix ✗
111+
├── Attempt 2: getattr() fallback ✓
112+
├── Attempt 3: Test Python 3.11 compat ✓
113+
├── Attempt 4: Test Python 3.10 compat ✓
114+
└── Attempt 5: CI matrix update ✓
115+
116+
Task Complete (2 hours total)
117+
├── All tests passing
118+
├── Documentation updated
119+
└── Ready for PR submission
120+
```
121+
122+
---
123+
124+
## 🔑 Perbedaan Kunci dari Original
125+
126+
| Original Autoresearch | Modified untuk Kontribusi |
127+
|----------------------|--------------------------|
128+
| Loop FOREVER (indefinite) | Loop UNTIL TASK COMPLETE |
129+
| ML model optimization | Build compatibility fix |
130+
| val_bpb metric | build_status metric |
131+
| No clear end point | Clear completion criteria |
132+
| Sleep-through automation | Work-hours focused |
133+
| 100+ experiments/night | ~20 experiments max |
134+
135+
---
136+
137+
## 📝 Notes untuk Kontributor
138+
139+
1. **Reproduce issue dulu** sebelum fix — simpan exact traceback
140+
2. **Comment di existing issue** — bilang Anda ambil PR ini
141+
3. **Small incremental changes** — jangan big bang refactor
142+
4. **Test backward compatibility** — Python 3.8-3.12 harus tetap work
143+
5. **Run pre-commit hooks**`pre-commit run -a` sebelum PR
144+
6. **Siap untuk feedback** — maintainer mungkin request changes
145+
146+
---
147+
148+
**Intinya**: Auto-run "never stop" hanya selama **task belum selesai**, bukan perpetual automation tanpa tujuan. Setelah kontribusi siap untuk PR, loop berhenti dan menunggu human review.

0 commit comments

Comments
 (0)