-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.toml
More file actions
131 lines (113 loc) · 4.35 KB
/
Makefile.toml
File metadata and controls
131 lines (113 loc) · 4.35 KB
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Boon project tasks
# Run with: makers <task-name>
[config]
# Don't run tasks in workspace members
skip_core_tasks = true
[tasks.build-tools]
description = "Build boon-tools"
workspace = false
script = '''
cd tools && cargo build --release --target-dir ../target
'''
[tasks.verify-integrity]
description = "Verify example files haven't been modified (fast, no browser)"
workspace = false
dependencies = ["build-tools"]
script = '''
./target/release/boon-tools exec verify-integrity
'''
[tasks.verify-playground]
description = "Run playground example tests. Use: makers verify-playground --filter todo_mvc"
workspace = false
dependencies = ["build-tools"]
script_runner = "@shell"
script = '''
./target/release/boon-tools exec test-examples "$@"
'''
[tasks.verify-playground-interactive]
description = "Run tests with interactive debugging on failure"
workspace = false
dependencies = ["build-tools"]
script = '''
./target/release/boon-tools exec test-examples --interactive
'''
[tasks.verify-dd-no-cheats]
description = "Verify DD engine has no sync/mutable cheats (runs before tests)"
workspace = false
script = '''
echo "=== DD Engine Anti-Cheat Verification ==="
echo "Checking for forbidden patterns in engine_dd/..."
CHEAT_FOUND=0
# Helper: filter out comment lines and ALLOWED markers
filter_comments() {
grep -v "// ALLOWED:" | grep -v "//!" | grep -v "^\s*//"
}
# Forbidden: Mutable<T> (Zoon's mutable signal) - actual usage
MATCHES=$(grep -r "Mutable<" crates/boon-engine-dd/src/ --include="*.rs" 2>/dev/null | grep -v "// ALLOWED:" | grep -v "//!" | grep -v ":.*//.*Mutable" || true)
if [ -n "$MATCHES" ]; then
echo "$MATCHES"
echo "❌ ERROR: Found Mutable<T> in boon-engine-dd/src - this is cheating!"
CHEAT_FOUND=1
fi
# Forbidden: RefCell<T> - actual usage
MATCHES=$(grep -r "RefCell<" crates/boon-engine-dd/src/ --include="*.rs" 2>/dev/null | grep -v "// ALLOWED:" | grep -v "//!" | grep -v ":.*//.*RefCell" || true)
if [ -n "$MATCHES" ]; then
echo "$MATCHES"
echo "❌ ERROR: Found RefCell<T> in boon-engine-dd/src - this is cheating!"
CHEAT_FOUND=1
fi
# Forbidden: .borrow() / .borrow_mut() - actual usage
MATCHES=$(grep -rE "\.borrow(_mut)?\(\)" crates/boon-engine-dd/src/ --include="*.rs" 2>/dev/null | grep -v "// ALLOWED:" | grep -v "//!" | grep -v ":.*//.*borrow" || true)
if [ -n "$MATCHES" ]; then
echo "$MATCHES"
echo "❌ ERROR: Found .borrow() in boon-engine-dd/src - this is cheating!"
CHEAT_FOUND=1
fi
# Forbidden: trigger_render() function call
MATCHES=$(grep -r "trigger_render\s*(" crates/boon-engine-dd/src/ --include="*.rs" 2>/dev/null | grep -v "// ALLOWED:" | grep -v "//!" | grep -v ":.*//.*trigger_render" || true)
if [ -n "$MATCHES" ]; then
echo "$MATCHES"
echo "❌ ERROR: Found trigger_render() in boon-engine-dd/src - this is cheating!"
CHEAT_FOUND=1
fi
# Forbidden: handle_link_fire() function call
MATCHES=$(grep -r "handle_link_fire\s*(" crates/boon-engine-dd/src/ --include="*.rs" 2>/dev/null | grep -v "// ALLOWED:" || true)
if [ -n "$MATCHES" ]; then
echo "$MATCHES"
echo "❌ ERROR: Found handle_link_fire() in boon-engine-dd/src - this is cheating!"
CHEAT_FOUND=1
fi
# Forbidden: handle_timer_fire() function call
MATCHES=$(grep -r "handle_timer_fire\s*(" crates/boon-engine-dd/src/ --include="*.rs" 2>/dev/null | grep -v "// ALLOWED:" || true)
if [ -n "$MATCHES" ]; then
echo "$MATCHES"
echo "❌ ERROR: Found handle_timer_fire() in boon-engine-dd/src - this is cheating!"
CHEAT_FOUND=1
fi
if [ $CHEAT_FOUND -eq 1 ]; then
echo ""
echo "=== ANTI-CHEAT VERIFICATION FAILED ==="
echo "Fix the above issues before running tests."
exit 1
fi
echo "✅ No cheating patterns detected in boon-engine-dd/src"
echo "=== Anti-cheat verification passed ==="
'''
[tasks.verify-playground-dd]
description = "Run playground tests with DD engine (includes anti-cheat checks)"
workspace = false
dependencies = ["build-tools", "verify-dd-no-cheats"]
script_runner = "@shell"
script = '''
./target/release/boon-tools exec set-engine DD
./target/release/boon-tools exec test-examples "$@"
'''
[tasks.verify-playground-dd-smoke]
description = "Smoke-run all built-in playground examples with DD engine"
workspace = false
dependencies = ["build-tools", "verify-dd-no-cheats"]
script_runner = "@shell"
script = '''
./target/release/boon-tools exec set-engine DD
./target/release/boon-tools exec smoke-examples "$@"
'''