Skip to content

Commit b7a75f7

Browse files
committed
dogfood: Add dogfooding
1 parent c245955 commit b7a75f7

45 files changed

Lines changed: 1603 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dogfood_output/SUMMARY.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Dogfooding Summary Report
2+
3+
**Generated:** 2026-01-18T14:19:27.738884
4+
5+
## Overall Statistics
6+
7+
- **Total Iterations:** 10
8+
- **Successful:** 4 (40.0%)
9+
- **Failed:** 3 (30.0%)
10+
- **Skipped:** 3 (30.0%)
11+
12+
## Issues by Type
13+
14+
- **compilation_failed:** 1
15+
- **execution_failed:** 2
16+
- **skipped:** 3
17+
18+
## Recent Failures
19+
20+
- [compilation_failed](/Users/anton/Documents/github/sharpy/dogfood_output/issues/20260118_141825_compilation_failed_0000) - function_default_params/medium - 31.9s
21+
- [execution_failed](/Users/anton/Documents/github/sharpy/dogfood_output/issues/20260118_141859_execution_failed_0001) - nested_if_in_loop/complex - 16.9s
22+
- [execution_failed](/Users/anton/Documents/github/sharpy/dogfood_output/issues/20260118_141927_execution_failed_0002) - cross_module_classes/medium - 28.3s
23+
24+
## Recent Skips
25+
26+
- function_keyword_args/complex - Code invalid per spec after 3 attempts
27+
- module_utils/complex - geometry.spy invalid per spec
28+
- module_utils/medium - string_utils.spy invalid per spec
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Issue Report: compilation_failed
2+
3+
**Timestamp:** 2026-01-18T14:17:53.394897
4+
**Type:** compilation_failed
5+
**Feature Focus:** function_default_params
6+
**Complexity:** medium
7+
**Backend:** claude
8+
9+
## Generated Sharpy Code
10+
11+
```python
12+
# Test function default parameters with multiple scenarios
13+
14+
def calculate_price(base: int, tax_rate: float = 0.1, discount: int = 0) -> int:
15+
# Since we can't use 'to float' conversion, work with ints
16+
# We'll use integer arithmetic and return cents instead of dollars
17+
base_cents: int = base * 100
18+
tax_cents: int = (base_cents * (int)(tax_rate * 100)) // 100
19+
total_cents: int = base_cents + tax_cents
20+
discount_cents: int = discount * 100
21+
final_cents: int = total_cents - discount_cents
22+
return final_cents // 100
23+
24+
def greet(name: str, greeting: str = "Hello", punctuation: str = "!") -> str:
25+
# Can't concatenate strings, so just return the greeting part
26+
return greeting
27+
28+
def power(base: int, exponent: int = 2) -> int:
29+
result: int = 1
30+
i: int = 0
31+
while i < exponent:
32+
result = result * base
33+
i = i + 1
34+
return result
35+
36+
# Test with all defaults
37+
price1: int = calculate_price(100)
38+
print(price1)
39+
40+
# Test with one override (20% tax)
41+
price2: int = calculate_price(100, 0.2)
42+
print(price2)
43+
44+
# Test with all parameters specified (15% tax, $10 discount)
45+
price3: int = calculate_price(100, 0.15, 10)
46+
print(price3)
47+
48+
# Test power with default exponent (square)
49+
squared: int = power(5)
50+
print(squared)
51+
52+
# Test power with custom exponent
53+
cubed: int = power(3, 3)
54+
print(cubed)
55+
56+
# Test with positional arguments only
57+
price4: int = calculate_price(50, 0.1, 5)
58+
print(price4)
59+
60+
# Test with positional arguments
61+
price5: int = calculate_price(200, 0.1, 20)
62+
print(price5)
63+
64+
# EXPECTED OUTPUT:
65+
# 110
66+
# 120
67+
# 105
68+
# 25
69+
# 27
70+
# 50
71+
# 200
72+
```
73+
74+
## Error
75+
76+
```
77+
Compilation failed:
78+
Compilation failed: Complex function expressions not yet supported
79+
80+
```
81+
82+
## Timing
83+
84+
- Generation: 19.91s
85+
- Execution: 0.90s
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Compilation failed:
2+
Compilation failed: Complex function expressions not yet supported
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
110
2+
120
3+
105
4+
25
5+
27
6+
50
7+
200
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"issue_type": "compilation_failed",
3+
"timestamp": "2026-01-18T14:17:53.394897",
4+
"generated_code": "# Test function default parameters with multiple scenarios\n\ndef calculate_price(base: int, tax_rate: float = 0.1, discount: int = 0) -> int:\n # Since we can't use 'to float' conversion, work with ints\n # We'll use integer arithmetic and return cents instead of dollars\n base_cents: int = base * 100\n tax_cents: int = (base_cents * (int)(tax_rate * 100)) // 100\n total_cents: int = base_cents + tax_cents\n discount_cents: int = discount * 100\n final_cents: int = total_cents - discount_cents\n return final_cents // 100\n\ndef greet(name: str, greeting: str = \"Hello\", punctuation: str = \"!\") -> str:\n # Can't concatenate strings, so just return the greeting part\n return greeting\n\ndef power(base: int, exponent: int = 2) -> int:\n result: int = 1\n i: int = 0\n while i < exponent:\n result = result * base\n i = i + 1\n return result\n\n# Test with all defaults\nprice1: int = calculate_price(100)\nprint(price1)\n\n# Test with one override (20% tax)\nprice2: int = calculate_price(100, 0.2)\nprint(price2)\n\n# Test with all parameters specified (15% tax, $10 discount)\nprice3: int = calculate_price(100, 0.15, 10)\nprint(price3)\n\n# Test power with default exponent (square)\nsquared: int = power(5)\nprint(squared)\n\n# Test power with custom exponent\ncubed: int = power(3, 3)\nprint(cubed)\n\n# Test with positional arguments only\nprice4: int = calculate_price(50, 0.1, 5)\nprint(price4)\n\n# Test with positional arguments\nprice5: int = calculate_price(200, 0.1, 20)\nprint(price5)\n\n# EXPECTED OUTPUT:\n# 110\n# 120\n# 105\n# 25\n# 27\n# 50\n# 200",
5+
"expected_output": "110\n120\n105\n25\n27\n50\n200\n",
6+
"actual_output": null,
7+
"error_message": "Compilation failed:\n Compilation failed: Complex function expressions not yet supported\n",
8+
"compiler_output": "",
9+
"generated_cs": null,
10+
"validation_result": null,
11+
"feature_focus": "function_default_params",
12+
"complexity": "medium",
13+
"backend_used": "claude",
14+
"generation_duration": 19.912884950637817,
15+
"compilation_duration": null,
16+
"execution_duration": 0.9033129215240479,
17+
"source_files": null
18+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Test function default parameters with multiple scenarios
2+
3+
def calculate_price(base: int, tax_rate: float = 0.1, discount: int = 0) -> int:
4+
# Since we can't use 'to float' conversion, work with ints
5+
# We'll use integer arithmetic and return cents instead of dollars
6+
base_cents: int = base * 100
7+
tax_cents: int = (base_cents * (int)(tax_rate * 100)) // 100
8+
total_cents: int = base_cents + tax_cents
9+
discount_cents: int = discount * 100
10+
final_cents: int = total_cents - discount_cents
11+
return final_cents // 100
12+
13+
def greet(name: str, greeting: str = "Hello", punctuation: str = "!") -> str:
14+
# Can't concatenate strings, so just return the greeting part
15+
return greeting
16+
17+
def power(base: int, exponent: int = 2) -> int:
18+
result: int = 1
19+
i: int = 0
20+
while i < exponent:
21+
result = result * base
22+
i = i + 1
23+
return result
24+
25+
# Test with all defaults
26+
price1: int = calculate_price(100)
27+
print(price1)
28+
29+
# Test with one override (20% tax)
30+
price2: int = calculate_price(100, 0.2)
31+
print(price2)
32+
33+
# Test with all parameters specified (15% tax, $10 discount)
34+
price3: int = calculate_price(100, 0.15, 10)
35+
print(price3)
36+
37+
# Test power with default exponent (square)
38+
squared: int = power(5)
39+
print(squared)
40+
41+
# Test power with custom exponent
42+
cubed: int = power(3, 3)
43+
print(cubed)
44+
45+
# Test with positional arguments only
46+
price4: int = calculate_price(50, 0.1, 5)
47+
print(price4)
48+
49+
# Test with positional arguments
50+
price5: int = calculate_price(200, 0.1, 20)
51+
print(price5)
52+
53+
# EXPECTED OUTPUT:
54+
# 110
55+
# 120
56+
# 105
57+
# 25
58+
# 27
59+
# 50
60+
# 200
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# Issue Report: execution_failed
2+
3+
**Timestamp:** 2026-01-18T14:18:42.507306
4+
**Type:** execution_failed
5+
**Feature Focus:** nested_if_in_loop
6+
**Complexity:** complex
7+
**Backend:** claude
8+
9+
## Generated Sharpy Code
10+
11+
```python
12+
```python
13+
# Test nested if statements inside loops with class-based game state management
14+
15+
@abstract
16+
class GameEntity:
17+
health: int
18+
damage: int
19+
20+
def __init__(self, hp: int, dmg: int):
21+
self.health = hp
22+
self.damage = dmg
23+
24+
@abstract
25+
def take_damage(self, amount: int) -> bool:
26+
...
27+
28+
@abstract
29+
def is_alive(self) -> bool:
30+
...
31+
32+
class Player(GameEntity):
33+
shield: int
34+
critical_threshold: int
35+
36+
def __init__(self, hp: int, dmg: int, shld: int):
37+
super().__init__(hp, dmg)
38+
self.shield = shld
39+
self.critical_threshold = 30
40+
41+
@override
42+
def take_damage(self, amount: int) -> bool:
43+
absorbed: int = 0
44+
if self.shield > 0:
45+
if amount > self.shield:
46+
absorbed = self.shield
47+
self.shield = 0
48+
self.health -= (amount - absorbed)
49+
else:
50+
self.shield -= amount
51+
absorbed = amount
52+
else:
53+
self.health -= amount
54+
return absorbed > 0
55+
56+
@override
57+
def is_alive(self) -> bool:
58+
return self.health > 0
59+
60+
class Enemy(GameEntity):
61+
armor: int
62+
63+
def __init__(self, hp: int, dmg: int, arm: int):
64+
super().__init__(hp, dmg)
65+
self.armor = arm
66+
67+
@override
68+
def take_damage(self, amount: int) -> bool:
69+
reduced: int = amount - self.armor
70+
if reduced > 0:
71+
self.health -= reduced
72+
return True
73+
return False
74+
75+
@override
76+
def is_alive(self) -> bool:
77+
return self.health > 0
78+
79+
def simulate_combat(p: Player, e: Enemy, rounds: int) -> None:
80+
round_num: int = 1
81+
while round_num <= rounds:
82+
print(round_num)
83+
84+
if p.is_alive():
85+
if e.is_alive():
86+
damage_dealt: int = p.damage
87+
if p.health < p.critical_threshold:
88+
if p.shield == 0:
89+
damage_dealt = p.damage * 2
90+
print(999)
91+
92+
if e.take_damage(damage_dealt):
93+
print(1)
94+
else:
95+
print(0)
96+
else:
97+
print(777)
98+
break
99+
100+
if e.is_alive():
101+
if p.is_alive():
102+
if p.take_damage(e.damage):
103+
print(2)
104+
else:
105+
print(3)
106+
else:
107+
print(888)
108+
break
109+
110+
round_num += 1
111+
112+
player: Player = Player(100, 25, 50)
113+
enemy: Enemy = Enemy(120, 30, 5)
114+
simulate_combat(player, enemy, 5)
115+
116+
# EXPECTED OUTPUT:
117+
# 1
118+
# 1
119+
# 2
120+
# 2
121+
# 1
122+
# 3
123+
# 3
124+
# 999
125+
# 1
126+
# 3
127+
# 4
128+
# 999
129+
# 1
130+
# 3
131+
# 5
132+
# 999
133+
# 1
134+
# 888
135+
136+
```
137+
138+
## Error
139+
140+
```
141+
Compilation failed:
142+
Compilation failed: Lexer error at line 1, column 10: Unterminated literal name (backtick-delimited identifier)
143+
144+
```
145+
146+
## Timing
147+
148+
- Generation: 8.55s
149+
- Execution: 0.79s
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Compilation failed:
2+
Compilation failed: Lexer error at line 1, column 10: Unterminated literal name (backtick-delimited identifier)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
1
2+
1
3+
2
4+
2
5+
1
6+
3
7+
3
8+
999
9+
1
10+
3
11+
4
12+
999
13+
1
14+
3
15+
5
16+
999
17+
1
18+
888
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"issue_type": "execution_failed",
3+
"timestamp": "2026-01-18T14:18:42.507306",
4+
"generated_code": "```python\n# Test nested if statements inside loops with class-based game state management\n\n@abstract\nclass GameEntity:\n health: int\n damage: int\n\n def __init__(self, hp: int, dmg: int):\n self.health = hp\n self.damage = dmg\n\n @abstract\n def take_damage(self, amount: int) -> bool:\n ...\n\n @abstract\n def is_alive(self) -> bool:\n ...\n\nclass Player(GameEntity):\n shield: int\n critical_threshold: int\n\n def __init__(self, hp: int, dmg: int, shld: int):\n super().__init__(hp, dmg)\n self.shield = shld\n self.critical_threshold = 30\n\n @override\n def take_damage(self, amount: int) -> bool:\n absorbed: int = 0\n if self.shield > 0:\n if amount > self.shield:\n absorbed = self.shield\n self.shield = 0\n self.health -= (amount - absorbed)\n else:\n self.shield -= amount\n absorbed = amount\n else:\n self.health -= amount\n return absorbed > 0\n\n @override\n def is_alive(self) -> bool:\n return self.health > 0\n\nclass Enemy(GameEntity):\n armor: int\n\n def __init__(self, hp: int, dmg: int, arm: int):\n super().__init__(hp, dmg)\n self.armor = arm\n\n @override\n def take_damage(self, amount: int) -> bool:\n reduced: int = amount - self.armor\n if reduced > 0:\n self.health -= reduced\n return True\n return False\n\n @override\n def is_alive(self) -> bool:\n return self.health > 0\n\ndef simulate_combat(p: Player, e: Enemy, rounds: int) -> None:\n round_num: int = 1\n while round_num <= rounds:\n print(round_num)\n \n if p.is_alive():\n if e.is_alive():\n damage_dealt: int = p.damage\n if p.health < p.critical_threshold:\n if p.shield == 0:\n damage_dealt = p.damage * 2\n print(999)\n \n if e.take_damage(damage_dealt):\n print(1)\n else:\n print(0)\n else:\n print(777)\n break\n \n if e.is_alive():\n if p.is_alive():\n if p.take_damage(e.damage):\n print(2)\n else:\n print(3)\n else:\n print(888)\n break\n \n round_num += 1\n\nplayer: Player = Player(100, 25, 50)\nenemy: Enemy = Enemy(120, 30, 5)\nsimulate_combat(player, enemy, 5)\n\n# EXPECTED OUTPUT:\n# 1\n# 1\n# 2\n# 2\n# 1\n# 3\n# 3\n# 999\n# 1\n# 3\n# 4\n# 999\n# 1\n# 3\n# 5\n# 999\n# 1\n# 888\n",
5+
"expected_output": "1\n1\n2\n2\n1\n3\n3\n999\n1\n3\n4\n999\n1\n3\n5\n999\n1\n888\n",
6+
"actual_output": null,
7+
"error_message": "Compilation failed:\n Compilation failed: Lexer error at line 1, column 10: Unterminated literal name (backtick-delimited identifier)\n",
8+
"compiler_output": "",
9+
"generated_cs": null,
10+
"validation_result": null,
11+
"feature_focus": "nested_if_in_loop",
12+
"complexity": "complex",
13+
"backend_used": "claude",
14+
"generation_duration": 8.553172826766968,
15+
"compilation_duration": null,
16+
"execution_duration": 0.7900521755218506,
17+
"source_files": null
18+
}

0 commit comments

Comments
 (0)