Repository navigation
Enforce Play level challenge initial-state contract with a parameterized test suite #61
Description
What happened
In PR #42 (Play Level 2), the coding agent initialized slider controls such that Challenge Goal 2 pre-satisfied on mount (decode time dominated at 74%), and the component test asserted only final badge text (Dominates ✓) without establishing an unfulfilled baseline. Review agent iterations caught this defect, incurring $2.18 and 24 minutes of rework. The retro agent filed issue #57 proposing to document initial-state and transition-test rules in AGENTS.md. Code agent run 43540775501 implemented Issue #57 by adding 13 lines to AGENTS.md under ## Rules in PR #60, which merged into main at commit 901f794. However, inspection of existing levels shows that advisory prose does not guarantee contract compliance: in Level 4 (src/play/levels/level-4.tsx), Challenge Goal 1 (reach ≥ 2,000 tokens/s with p95 ≤ 2.0s) mounts in Passed ✓ state on initial render under default continuous mode at batch size 24 (acknowledged at src/play/levels/level-4.test.tsx:140). Furthermore, upcoming levels (Level 1 in #21 and Level 3 in #23) lack mechanical checks in npm test to block pre-satisfied defaults before review.
What could go better
Under Agent Scaffolding Principle #1 (Verification > documentation) and Principle #2 (Deterministic enforcement > advisory instructions), advisory instructions in context files are prone to omission or inconsistent implementation unless verified mechanically. Appending prose rules to AGENTS.md provides zero feedback to coding agents during local test runs (npm test); defects are only surfaced during subsequent review cycles. Furthermore, AGENTS.md has expanded to 156 lines, exceeding the 150-line target for minimal root context. Nearly 40% of the repository's closed issues since inception (#32, #38, #43, #49, #50, #53, #54, #57) have appended prose rules into AGENTS.md. We have high confidence that replacing advisory prose with an automated contract test will deterministically prevent pre-satisfied challenge goals across all current and future levels.
Proposed change
- Create a suite-level contract test
src/play/levels/challenge-contract.test.tsxthat importsLEVELSfromsrc/play/levels/index.tsand iterates over all registered levels. For each level, render the Challenge section on mount and assert: (a) no goal badge renders in fulfilled status (e.g.Passed ✓orGoal Met ✓), and (b) the challenge complete button is disabled or not present on initial render. - Update
src/play/levels/level-4.tsxinitial control defaults (e.g., set defaultbatchSizeto 8 or defaultmodeto static) so that Goal 1 mounts in an unfulfilled state, and updatelevel-4.test.tsxto assert the unfulfilled baseline before simulating interaction. - Condense the challenge prose rules in
AGENTS.mdinto a concise reference pointing tosrc/play/levels/challenge-contract.test.tsx, returningAGENTS.mdbelow the 150-line context cap.
Validation criteria
src/play/levels/challenge-contract.test.tsxruns undernpm testand passes across all registered Play levels in under 500 ms.- If any level's initial state defaults are modified to satisfy a challenge goal on mount,
npm testfails immediately with a descriptive assertion failure. - The next two Play level implementations (Level 1 in Play Level 1: Sampling (temperature, top-k, top-p) #21 and Level 3 in Play Level 3: KV cache memory #23) achieve first-pass review compliance regarding challenge initial states with zero review findings regarding auto-satisfied goals.
Related issues checked
Searched: challenge contract test repo:ADLC-Day-Of-Learning/pixelsoccupied-inference-lab is:issue; challenge initial state repo:ADLC-Day-Of-Learning/pixelsoccupied-inference-lab is:issue; challenge goal initial state repo:fullsend-ai/fullsend repo:fullsend-ai/agents repo:ADLC-Day-Of-Learning/pixelsoccupied-inference-lab is:issue; challenge unfulfilled repo:fullsend-ai/fullsend repo:fullsend-ai/agents repo:ADLC-Day-Of-Learning/pixelsoccupied-inference-lab is:issue; tautological test repo:fullsend-ai/fullsend repo:fullsend-ai/agents repo:ADLC-Day-Of-Learning/pixelsoccupied-inference-lab is:issue
Considered: #57, fullsend-ai/agents#341, #21, #23, #24
#57: Documented challenge initial-state and transition rules in AGENTS.md as advisory prose; this proposal refines #57 by implementing deterministic mechanical enforcement via a centralized test in npm test and fixing Level 4's pre-satisfied default.
fullsend-ai/agents#341: Addresses code agent regex testing with production logic; does not cover React challenge state contracts or repo test suites.
#21: Open feature specification for Play Level 1 (Sampling); does not provide suite-wide contract tests.
#23: Open feature specification for Play Level 3 (KV cache memory); does not provide suite-wide contract tests.
#24: Closed feature issue that implemented Play Level 4 (Batching), where Goal 1 was inadvertently left pre-satisfied on initial mount.
Generated by retro agent from #60
Activity
fullsend-ai-triage commentedon Nov 14, 2026
🤖 Finished Triage · ✅ Success · Started 1:53 AM UTC · Completed 1:57 AM UTC
Commit:
901f794· View workflow run →Runtime: pi · Model: google-vertex/gemini-3.8-flash → gemini-3.8-flash · Effort: high · Cost: $0.31
fullsend-ai-triage commentedon Nov 14, 2026
Triage Assessment
The reported issue is verified and actionable. Independent inspection of the repository confirms:
src/play/levels/level-4.tsx,batchSizeinitializes to24in default continuous mode, which causesgoal1Passedto evaluate totrueon initial render and display thePassed ✓badge prior to user interaction.src/play/levels/level-4.test.tsx(line 140) acknowledges that Goal 1 is already satisfied on mount.src/play/levels/index.ts(level0,level2, andlevel5) initialize their challenge goals in unfulfilled states (IncompleteorIn Progress), making Level 4 the only existing level requiring an initial-state fix.In-Flight Context & Scope
npm test).src/play/levels/andAGENTS.md. No workflow configuration changes are required (requires_workflow_changes: false).Proposed Test Implementation
You can implement
src/play/levels/challenge-contract.test.tsxby iterating overLEVELSfromsrc/play/levels/index.ts:Next steps:
/fs-code— agent creates a PR to implement this issue/fs-code <your instruction>— agent implements with your specific guidancefullsend-ai-coder commentedon Nov 14, 2026
🤖 Finished Code · ❌ Failure (validation failed after 2 iteration(s)) · Started 1:58 AM UTC · Completed 2:00 AM UTC
Commit:
901f794· View workflow run →Runtime: pi · Model: google-vertex/gemini-3.8-flash → gemini-3.8-flash · Effort: high