Skip to content

Commit 89df0fa

Browse files
committed
dogfooding
1 parent 22c9b27 commit 89df0fa

File tree

47 files changed

+1738
-0
lines changed

Some content is hidden

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

47 files changed

+1738
-0
lines changed

dogfood_output/SUMMARY.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Dogfooding Summary Report
2+
3+
**Generated:** 2026-01-18T18:37:49.193253
4+
5+
## Overall Statistics
6+
7+
- **Total Iterations:** 10
8+
- **Successful:** 6 (60.0%)
9+
- **Failed:** 3 (30.0%)
10+
- **Skipped:** 1 (10.0%)
11+
12+
## Issues by Type
13+
14+
- **compilation_failed:** 2
15+
- **output_mismatch:** 1
16+
- **skipped:** 1
17+
18+
## Recent Failures
19+
20+
- [compilation_failed](/Users/anton/Documents/github/sharpy/dogfood_output/issues/20260118_183610_compilation_failed_0000) - type_alias/medium - 26.0s
21+
- [output_mismatch](/Users/anton/Documents/github/sharpy/dogfood_output/issues/20260118_183709_output_mismatch_0001) - access_modifiers/complex - 37.2s
22+
- [compilation_failed](/Users/anton/Documents/github/sharpy/dogfood_output/issues/20260118_183726_compilation_failed_0002) - class_with_init/complex - 17.3s
23+
24+
## Recent Skips
25+
26+
- module_imports/complex - calculator.spy invalid per spec
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Issue Report: compilation_failed
2+
3+
**Timestamp:** 2026-01-18T18:35:44.558122
4+
**Type:** compilation_failed
5+
**Feature Focus:** type_alias
6+
**Complexity:** medium
7+
**Backend:** claude
8+
9+
## Generated Sharpy Code
10+
11+
```python
12+
# Test type aliases with different scenarios
13+
# Using type aliases for primitive types and classes
14+
15+
type UserId = int
16+
type Temperature = float
17+
type Message = str
18+
19+
class User:
20+
id: UserId
21+
name: str
22+
23+
def __init__(self, user_id: UserId, user_name: str):
24+
self.id = user_id
25+
self.name = user_name
26+
27+
def get_id(self) -> UserId:
28+
return self.id
29+
30+
class WeatherStation:
31+
current_temp: Temperature
32+
33+
def __init__(self, temp: Temperature):
34+
self.current_temp = temp
35+
36+
def update_temperature(self, new_temp: Temperature) -> None:
37+
self.current_temp = new_temp
38+
39+
def get_temperature(self) -> Temperature:
40+
return self.current_temp
41+
42+
def process_user_id(uid: UserId) -> UserId:
43+
return uid + 1000
44+
45+
def format_message(msg: Message, code: UserId) -> Message:
46+
return msg
47+
48+
def float_to_int(val: float) -> int:
49+
if val >= 0.0:
50+
return int(val)
51+
return int(val)
52+
53+
# Test with User class
54+
user: User = User(42, "Alice")
55+
print(user.get_id())
56+
57+
new_id: UserId = process_user_id(user.id)
58+
print(new_id)
59+
60+
# Test with WeatherStation class
61+
station: WeatherStation = WeatherStation(23.5)
62+
temp1: int = float_to_int(station.get_temperature())
63+
print(temp1)
64+
65+
station.update_temperature(25.8)
66+
temp2: int = float_to_int(station.get_temperature())
67+
print(temp2)
68+
69+
# Test with simple variables
70+
temp_reading: Temperature = 18.3
71+
temp3: int = float_to_int(temp_reading)
72+
print(temp3)
73+
74+
# EXPECTED OUTPUT:
75+
# 42
76+
# 1042
77+
# 23
78+
# 25
79+
# 18
80+
```
81+
82+
## Error
83+
84+
```
85+
Assembly compilation failed:
86+
dogfood_test.cs(67,28): error CS0102: The type 'Program' already contains a definition for 'User'
87+
dogfood_test.cs(68,49): error CS0229: Ambiguity between 'Program.User' and 'Program.User'
88+
dogfood_test.cs(76,47): error CS0229: Ambiguity between 'Program.User' and 'Program.User'
89+
90+
```
91+
92+
## Timing
93+
94+
- Generation: 12.19s
95+
- Execution: 1.49s
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Assembly compilation failed:
2+
dogfood_test.cs(67,28): error CS0102: The type 'Program' already contains a definition for 'User'
3+
dogfood_test.cs(68,49): error CS0229: Ambiguity between 'Program.User' and 'Program.User'
4+
dogfood_test.cs(76,47): error CS0229: Ambiguity between 'Program.User' and 'Program.User'
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
42
2+
1042
3+
23
4+
25
5+
18
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-18T18:35:44.558122",
4+
"generated_code": "# Test type aliases with different scenarios\n# Using type aliases for primitive types and classes\n\ntype UserId = int\ntype Temperature = float\ntype Message = str\n\nclass User:\n id: UserId\n name: str\n \n def __init__(self, user_id: UserId, user_name: str):\n self.id = user_id\n self.name = user_name\n \n def get_id(self) -> UserId:\n return self.id\n\nclass WeatherStation:\n current_temp: Temperature\n \n def __init__(self, temp: Temperature):\n self.current_temp = temp\n \n def update_temperature(self, new_temp: Temperature) -> None:\n self.current_temp = new_temp\n \n def get_temperature(self) -> Temperature:\n return self.current_temp\n\ndef process_user_id(uid: UserId) -> UserId:\n return uid + 1000\n\ndef format_message(msg: Message, code: UserId) -> Message:\n return msg\n\ndef float_to_int(val: float) -> int:\n if val >= 0.0:\n return int(val)\n return int(val)\n\n# Test with User class\nuser: User = User(42, \"Alice\")\nprint(user.get_id())\n\nnew_id: UserId = process_user_id(user.id)\nprint(new_id)\n\n# Test with WeatherStation class\nstation: WeatherStation = WeatherStation(23.5)\ntemp1: int = float_to_int(station.get_temperature())\nprint(temp1)\n\nstation.update_temperature(25.8)\ntemp2: int = float_to_int(station.get_temperature())\nprint(temp2)\n\n# Test with simple variables\ntemp_reading: Temperature = 18.3\ntemp3: int = float_to_int(temp_reading)\nprint(temp3)\n\n# EXPECTED OUTPUT:\n# 42\n# 1042\n# 23\n# 25\n# 18",
5+
"expected_output": "42\n1042\n23\n25\n18\n",
6+
"actual_output": null,
7+
"error_message": "Assembly compilation failed:\n dogfood_test.cs(67,28): error CS0102: The type 'Program' already contains a definition for 'User'\n dogfood_test.cs(68,49): error CS0229: Ambiguity between 'Program.User' and 'Program.User'\n dogfood_test.cs(76,47): error CS0229: Ambiguity between 'Program.User' and 'Program.User'\n",
8+
"compiler_output": "",
9+
"generated_cs": null,
10+
"validation_result": null,
11+
"feature_focus": "type_alias",
12+
"complexity": "medium",
13+
"backend_used": "claude",
14+
"generation_duration": 12.188236951828003,
15+
"compilation_duration": null,
16+
"execution_duration": 1.4870212078094482,
17+
"source_files": null
18+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Test type aliases with different scenarios
2+
# Using type aliases for primitive types and classes
3+
4+
type UserId = int
5+
type Temperature = float
6+
type Message = str
7+
8+
class User:
9+
id: UserId
10+
name: str
11+
12+
def __init__(self, user_id: UserId, user_name: str):
13+
self.id = user_id
14+
self.name = user_name
15+
16+
def get_id(self) -> UserId:
17+
return self.id
18+
19+
class WeatherStation:
20+
current_temp: Temperature
21+
22+
def __init__(self, temp: Temperature):
23+
self.current_temp = temp
24+
25+
def update_temperature(self, new_temp: Temperature) -> None:
26+
self.current_temp = new_temp
27+
28+
def get_temperature(self) -> Temperature:
29+
return self.current_temp
30+
31+
def process_user_id(uid: UserId) -> UserId:
32+
return uid + 1000
33+
34+
def format_message(msg: Message, code: UserId) -> Message:
35+
return msg
36+
37+
def float_to_int(val: float) -> int:
38+
if val >= 0.0:
39+
return int(val)
40+
return int(val)
41+
42+
# Test with User class
43+
user: User = User(42, "Alice")
44+
print(user.get_id())
45+
46+
new_id: UserId = process_user_id(user.id)
47+
print(new_id)
48+
49+
# Test with WeatherStation class
50+
station: WeatherStation = WeatherStation(23.5)
51+
temp1: int = float_to_int(station.get_temperature())
52+
print(temp1)
53+
54+
station.update_temperature(25.8)
55+
temp2: int = float_to_int(station.get_temperature())
56+
print(temp2)
57+
58+
# Test with simple variables
59+
temp_reading: Temperature = 18.3
60+
temp3: int = float_to_int(temp_reading)
61+
print(temp3)
62+
63+
# EXPECTED OUTPUT:
64+
# 42
65+
# 1042
66+
# 23
67+
# 25
68+
# 18
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# Issue Report: output_mismatch
2+
3+
**Timestamp:** 2026-01-18T18:36:32.361584
4+
**Type:** output_mismatch
5+
**Feature Focus:** access_modifiers
6+
**Complexity:** complex
7+
**Backend:** claude
8+
9+
## Generated Sharpy Code
10+
11+
```python
12+
# Test access modifiers with banking system hierarchy
13+
# Tests: @private, @protected, @internal, public (default), static methods, inheritance
14+
15+
@abstract
16+
class Account:
17+
balance: float
18+
account_id: int
19+
20+
def __init__(self, id: int, initial_balance: float):
21+
self.account_id = id
22+
self.balance = initial_balance
23+
24+
@private
25+
def log_transaction(self, amount: float) -> None:
26+
# Private method - only accessible within this class
27+
print(1000)
28+
29+
@protected
30+
def validate_amount(self, amount: float) -> bool:
31+
# Protected - accessible in subclasses
32+
if amount > 0.0:
33+
return True
34+
return False
35+
36+
@internal
37+
def get_internal_id(self) -> int:
38+
# Internal - accessible within assembly
39+
return self.account_id
40+
41+
@virtual
42+
def deposit(self, amount: float) -> None:
43+
if self.validate_amount(amount):
44+
self.balance += amount
45+
self.log_transaction(amount)
46+
47+
@abstract
48+
def withdraw(self, amount: float) -> bool:
49+
...
50+
51+
class SavingsAccount(Account):
52+
withdrawal_limit: float
53+
withdrawal_count: int
54+
55+
def __init__(self, id: int, balance: float, limit: float):
56+
super().__init__(id, balance)
57+
self.withdrawal_limit = limit
58+
self.withdrawal_count = 0
59+
60+
@override
61+
def withdraw(self, amount: float) -> bool:
62+
# Uses protected validate_amount from parent
63+
if self.validate_amount(amount):
64+
if amount <= self.withdrawal_limit:
65+
if self.balance >= amount:
66+
self.balance -= amount
67+
self.withdrawal_count += 1
68+
return True
69+
return False
70+
71+
@private
72+
@static
73+
def calculate_interest_rate(balance: float) -> float:
74+
# Private static - only within SavingsAccount
75+
if balance > 10000.0:
76+
return 2.5
77+
return 1.5
78+
79+
class CheckingAccount(Account):
80+
overdraft_limit: float
81+
82+
def __init__(self, id: int, balance: float, overdraft: float):
83+
super().__init__(id, balance)
84+
self.overdraft_limit = overdraft
85+
86+
@override
87+
def withdraw(self, amount: float) -> bool:
88+
if self.validate_amount(amount):
89+
available = self.balance + self.overdraft_limit
90+
if amount <= available:
91+
self.balance -= amount
92+
return True
93+
return False
94+
95+
@override
96+
def deposit(self, amount: float) -> None:
97+
# Override parent's virtual method
98+
super().deposit(amount)
99+
print(2000)
100+
101+
# Test public access (default)
102+
savings = SavingsAccount(101, 5000.0, 1000.0)
103+
print(savings.account_id)
104+
print(savings.get_internal_id())
105+
106+
savings.deposit(500.0)
107+
print(savings.balance)
108+
109+
success = savings.withdraw(800.0)
110+
if success:
111+
print(4200)
112+
113+
print(savings.withdrawal_count)
114+
115+
# Test checking account with overdraft
116+
checking = CheckingAccount(102, 1000.0, 500.0)
117+
checking.deposit(250.0)
118+
print(checking.balance)
119+
120+
withdraw_success = checking.withdraw(1100.0)
121+
if withdraw_success:
122+
print(150)
123+
124+
# EXPECTED OUTPUT:
125+
# 101
126+
# 101
127+
# 1000
128+
# 5500.0
129+
# 1000
130+
# 4200
131+
# 1
132+
# 2000
133+
# 1250.0
134+
# 150
135+
```
136+
137+
## Output Comparison
138+
139+
### Expected
140+
```
141+
101
142+
101
143+
1000
144+
5500.0
145+
1000
146+
4200
147+
1
148+
2000
149+
1250.0
150+
150
151+
152+
```
153+
154+
### Actual
155+
```
156+
101
157+
101
158+
1000
159+
5500
160+
4200
161+
1
162+
1000
163+
2000
164+
1250
165+
150
166+
```
167+
168+
## Timing
169+
170+
- Generation: 19.47s
171+
- Execution: 1.55s

0 commit comments

Comments
 (0)