# oil-oil/oil-motion — AlpLab Radar Static Code Audit

- Ring: `trial`
- Category: `skills`
- Overall score: `3.8/5`
- Implementation check: `verified`
- Maturity: `early`
- Audited commit: `ac8e5a945ea7` (read-only; nothing from the repository was executed)
- Reviewed at: 2026-12-01T20:26:55Z
- Repository: https://github.com/oil-oil/oil-motion
- Radar entry: https://radar.alplab.co/#repo/oil-oil/oil-motion
- License: `MIT`
- CI workflows: `.github/workflows`
- Tags: `agent-skill`, `interactive-animation`, `ai-video`, `chroma-key`, `webgl`, `frontend-runtime`

## Summary

An agent skill that turns AI-generated or existing video/frame sequences into deterministic, input-driven web animation assets (baked MP4, WebGL chroma-key video, alpha atlases), with budget-based delivery selection, SHA-256/SSIM production gates, ZenMux-backed image/video generation, and a keyring-secured credential UI.

## Implementation Check

Every advertised workflow step in SKILL.md maps to working code — motion_budget.py select_delivery, production_gate.py verify_frame_chain/verify_output_chain, motion_pipeline.py remove_key/create_atlas, assets/interactive-motion.ts createFrameAnimator/createSegmentPlayer — and tests/test_docs_consistency.py plus evals/evals.json actively enforce doc-code alignment.

## When to Use

Use when an agent must convert AI video, green-screen footage, or frame sequences into scroll/pointer/drag/touch-driven web animations with reproducible QA gates and automatic asset-format selection. Not for plain CSS/Lottie transitions, standalone clip editing, or teams unwilling to depend on the paid, proprietary ZenMux generation API.

## Sub-scores

| Dimension | Score |
|---|---|
| quality | 4.5/5 |
| usability | 4.0/5 |
| reliability | 3.0/5 |
| security | 4.0/5 |
| integration | 3.5/5 |

## Code Evidence

scripts/motion_pipeline.py implements the deterministic core: extract_frames shells out to ffmpeg with list-arg subprocess.run (no shell), remove_key/despill/dominance_alpha do real chroma keying, analyze_directory flags blank/near-duplicate/brightness/scale/center jumps, create_atlas enforces --max-texture. scripts/motion_budget.py select_delivery routes background_owner=video to baked-video, 2d/discrete parameter spaces to alpha-atlas, long linear sequences to chroma-video, and --strict returns exit 2 on failures. scripts/video_job.py calls https://zenmux.ai/api/v1 (minimax/minimax-h3-max) and its validate_production_gate blocks production segments without a pilot approval whose artifact SHA-256 hashes match (production_gate.py validate_pilot_approval, verify_frame_chain); redacted_metadata strips local image data-URIs and remote URLs from job metadata. scripts/image_job.py alpha_problem() rejects transparent keyframes lacking real alpha (saved as *.rejected.png) and redact() strips sk-... keys from HTTP error bodies. Credential handling is deliberately hardened: scripts/secure_credentials.py backend() selects only macOS/Windows/SecretService keyrings and raises instead of falling back to plaintext, scripts/oil_motion_config.py write_config uses 0600/0700 modes and stores a credential_ref, scripts/credential-ui/src/server.ts binds to 127.0.0.1 with a random bootstrap token in the URL fragment, timingSafeEqual cookie checks, strict CSP, host/origin validation, and scripts/credential-ui/src/run.ts blocks injecting reserved env names like PATH/LD_PRELOAD. Runtime assets match build gates: assets/chroma-video-renderer.ts implements the 'dominance-v2' WebGL shader whose parameters scripts/compile_scroll_video.py re-simulates per-frame via analyze_encoded_frames with POST_ENCODE_LIMITS before delivery, and assets/interactive-motion.ts provides smoothDamp-based createFrameAnimator and hold-exact createSegmentPlayer with reverse playback via currentTime stepping. Test suite is substantive: 9 unittest files covering budget routing, production gates, alpha gates, key redaction (tests/test_image_job.py test_http_error_does_not_echo_key), ffmpeg-dependent tail extraction, and doc consistency; CI in .github/workflows/tests.yml installs ffmpeg and runs the suite, .github/workflows/credential-ui.yml pins checkout/setup-node by commit SHA, runs npm ci --ignore-scripts, tsc, npm test, and verifies the committed public/app.js build via git diff --exit-code.

## Issues Found

scripts/production_gate.py never imports sys, so the --force paths in validate_artifact and verify_frame_chain (print(..., file=sys.stderr)) raise NameError instead of the intended warning. Legacy plaintext api_key remains readable in scripts/oil_motion_config.py configured_api_key() (documented, never migrated or deleted). .github/workflows/tests.yml uses tag-pinned actions (actions/checkout@v7, actions/setup-python@v7) unlike the SHA-pinned credential-ui.yml. motion_pipeline.py prepare_output_directory with --force rmtree's any given output directory without the root/home-directory guard that compile_scroll_video.py safe_prepare_output has.

## Key Risks

Static review only — nothing was executed, so 'tests exist' does not mean 'tests pass'. Generation depends on the paid, proprietary ZenMux API with hardcoded endpoints and specific models (openai/gpt-image-2.5-flare, minimax/minimax-h3-max) whose behavior could not be verified. Running requires Python 3.10+, ffmpeg/ffprobe, and Node 22.18+ for the credential UI; keyring flows are real-machine-verified on macOS only per references/api-key-setup.md, and Windows/Linux adapters remain unverified on hardware. No releases yet, no Python lockfile (requirements.txt uses >= floors), and the repo is dominated by a single author (top_author_share_90d 1.0). ZenMux prompt/reference/first-last-frame content is sent to a third party, an inherent privacy consideration for proprietary product footage.

## Reviewed Files

- `SKILL.md`
- `README.md`
- `agents/openai.yaml`
- `evals/evals.json`
- `references/api-key-setup.md`
- `assets/interactive-motion.ts`
- `assets/chroma-video-renderer.ts`
- `scripts/motion_pipeline.py`
- `scripts/motion_budget.py`
- `scripts/image_job.py`
- `scripts/video_job.py`
- `scripts/production_gate.py`
- `scripts/optimize_motion.py`
- `scripts/compile_scroll_video.py`
- `scripts/oil_motion_config.py`
- `scripts/secure_credentials.py`
- `scripts/requirements.txt`
- `scripts/requirements-credentials.txt`
- `scripts/credential-ui/README.md`
- `scripts/credential-ui/package.json`
- `scripts/credential-ui/src/profile.ts`
- `scripts/credential-ui/src/run.ts`
- `scripts/credential-ui/src/server.ts`
- `tests/test_motion_budget.py`
- `tests/test_production_gate.py`
- `tests/test_image_job.py`
- `tests/test_skill_regression.py`
- `tests/test_docs_consistency.py`
- `tests/test_config_credentials.py`
- `tests/test_secure_credentials.py`
- `.github/workflows/tests.yml`
- `.github/workflows/credential-ui.yml`
