# Robot task execution acceptance

Verified locally on 2026-09-14. The requested workflow is natural-language task authoring, physical execution, episode termination, and synchronized video/data export. The original screenshot specifically requested randomized three-cube stacking; the additional example was humanoid pick-and-place.

## Try it

Run `npm run local` and open `http://localhost:3100/`. In **AI assistant**, ask either:

- “Make a Panda stack three colored cubes in random order on a table, then terminate the episode. I want to record this task.”
- “Make a humanoid pick-and-place task with TALOS: pick up a small block from the table, place it nearby, and finish the episode so I can record the data and video.”

The assistant creates an editable scene and JavaScript behavior. Choose an **Episode seed** and press **Record scene**. This resets and runs the scene, captures actual physics state and camera frames, and finalizes the episode on success or failure. Download the dataset ZIP and MP4 before reloading. Recording again starts a fresh episode; change the seed to vary the stacking order. The assistant authors the task; it does not independently run or validate its response.

## Requirement-to-evidence audit

| Requirement | Current evidence |
| --- | --- |
| Real AI request creates executable, editable behavior | Both prompts above were submitted to the signed-in local Codex bridge in Chromium. Saved conversations and authored scenes are in `.cache/tasks/ai-stack-conversation.txt`, `ai-stack-scene.json`, `ai-humanoid-conversation.txt`, and `ai-humanoid-scene.json`. Those exact scenes produced the browser recordings below. |
| Three physical cubes stack in seeded random order | `tests/manipulation-smoke.ts` verifies all six orders, measured lifts for every cube, final horizontal alignment and vertical order, plus reproducible seeded task initialization. The real AI-authored browser task completed blue → red → green with seed 1. |
| Scripts have useful robotics/task APIs | `ctx.robot.pose`, `solveIK`, `ctx.scene.contacts`, `ctx.task.stack`, `pickPlace`, `status`, and `ctx.episode.finish/seed` are documented in `docs/SCRIPTING.md` and the editor API reference. `tests/tasks-smoke.ts` proves scratch IK preserves live state, actual actuators reach the target, invalid/unreachable requests are rejected, and seeded scripts reset. |
| Humanoid physically picks up and places an object | Menagerie TALOS uses a free floating base, its source position actuators, and real finger contacts. `tests/humanoid-smoke.ts` verifies a free payload, zero external applied forces, upright standing, measured lift, release, final position, a second target, and payload-removal failure injection. Browser evidence independently measures a 15.4 cm lift and 5.74 mm final placement error. |
| Completion stops the episode and recording | Script termination test stops at tick 53; recording holds controls only until the next sensor boundary at tick 67. Both browser tasks stopped and finalized automatically. Their traces retain the actual termination tick separately from the final sensor tick. |
| Repeatable episodes and outcome metadata | Reset clears physics, scripts and task state. Repeating the same seed recreates the same order; other seeds vary it. Two TALOS Node reset episodes match exactly. The final browser repeat has byte-identical Parquet and MP4 to its first run. Archives include seed, task state, order, success/failure reason and termination tick. |
| Real synchronized video and robot data | Actual browser downloads pass `scripts/verify-recording.py --lerobot`: PyArrow schema/statistics, continuous frame/tick timestamps, hashes, full FFmpeg decoding, MP4 frame count/timing/faststart, source-image comparison, and official LeRobot state/action/task/RGB loading. |
| Test current implementation, including failures | Typecheck, lint, AI tests, task tests, the existing physics/editor/recording/encoder suite, and production build pass. Browser console has no errors/warnings. Contact-vector lifetime checks cover 27,000 script queries and six full stacking episodes. Invalid controllers, unreachable targets, lost grasp and recording timeout do not report success. |

## Downloaded browser recordings

All paths below are relative to the project root. `.cache` artifacts are local evidence and are not committed source fixtures.

| | Panda randomized stack | TALOS pick-and-place |
| --- | --- | --- |
| Dataset | `.cache/tasks/ai-stack-seed1.zip` | `.cache/tasks/ai-humanoid-seed1-final.zip` |
| Video | `.cache/tasks/ai-stack-seed1.mp4` | `.cache/tasks/ai-humanoid-seed1-final.mp4` |
| Rows / decoded frames | 1,135 / 1,135 | 717 / 717 |
| Duration | 37.833333 s | 23.9 s |
| Encoding | 256×256, 30 fps, H.264/yuv420p | 256×256, 30 fps, H.264/yuv420p |
| Termination / final sample tick | 18,890 / 18,900 | 11,933 / 11,934 |
| Source-frame PSNR | 43.4 / 43.9 / 43.99 dB | 41.44 / 41.88 / 41.98 dB |

TALOS exports 32 named raw actuator channels and 51 qpos state channels, including its floating base and passive fingers. The archive includes the original robot ZIP, authored script and saved Grasping solver. `.cache/tasks/talos-pick-place.lucky.zip` is its extracted portable project and can be opened in the editor. `.cache/tasks/final-artifact-audit.json` records independent placement, lift, standing and browser-repeat comparisons. Verification logs are retained alongside the artifacts; `VALIDATION.md` records the wider regression evidence.

## Scope and limitations

- Built-in manipulation controllers support Panda stacking/pick-and-place, apple/container picking via `pickInto`, and stationary TALOS right-gripper pick-and-place within the documented box geometry and reachable workspace. Other imported robots can use pose/IK and actuator APIs but need their own controller. There is no generic walking, balancing, collision-free planner or dexterous-hand policy.
- TALOS uses the unmodified pinned Menagerie model and its default home state. Its base is unanchored; the source leg/torso position controls maintain standing. The saved Grasping solver uses pyramidal contacts, `impratio=10`, and ten NoSlip iterations, with additional simulation cost. A farther placement with inadequate tracking correctly failed rather than claiming success.
- Payloads remain dynamic free bodies. Production task code uses actuator targets, measured contacts and positions; it does not teleport, attach or externally force the objects. Loss of opposing grip for more than 0.2 seconds fails transport. Final placement must remain within 14 mm through the stability check.
- Exact cross-runtime TALOS replay is not established. Node versus Chromium first exceeds the existing 1e-8 comparison tolerance at frame 89, then small numerical differences shift controller transitions (termination 24.158 s versus 23.866 s). Both physically succeed; the largest control difference is .95 at the shifted gripper transition. The strict replay check remains failing evidence, not a relaxed or passing test. Per-recording video/data alignment and the same-browser repeat are independently verified.
- Recording uses the existing single RGB camera and LeRobot v3 export contract. Generic robot state selection is not identical to every native LuckyEngine recording configuration. Multi-camera/depth capture and arbitrary-model task policies remain planned.
- The local optimized build was tested in desktop Chromium. Automated browser rendering used SwiftShader, so its FPS is not a hardware performance benchmark. The hosted preview and native LuckyEngine source were not changed.

Fruit picking is covered by `tests/fruit-smoke.ts`: full kitchen, both picking orders, actual finger-supported lift, release into a hollow bowl, stable support, synchronized recording samples, saved servo tuning, and failure with a disabled finger. Example: `public/examples/kitchen-fruit.lucky.json`.
