feat: add human-approved Jungle Grid execution demo#433
Conversation
|
@dejaguarkyng is attempting to deploy a commit to the Raphael's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Overall this is a positive review: the demo's API integration, human-approval gate, secret redaction, concurrency control, and test coverage all look solid. That said, I see one high-probability blocking issue around agent group authorization. The project template restricts execution to With the README's current startup command, I don't see how the executor agent joins the This is based on a source read rather than an end-to-end run, so please correct me if there's an authorization path I missed. References for checking:
Suggested fixes, following demo 08:
Any of these would resolve my concern. If the static allowlist does get converted into real membership, the fastest way to clear this up would be to attach an end-to-end run showing: human starts a project → executor receives the estimate. Once this is resolved, the rest are mostly minor nits: env var naming consistency ( |
902f9d2 to
7d6c00d
Compare
Thanks — this was a good catch. Fixed in Focused Jungle Grid and agent-group tests are passing: 62 tests total. Ruff format/lint and targeted MyPy checks also pass. The remaining project-mod failures appear unrelated and come from a missing Please take another look when you get a chance. |
|
Thanks for the thorough fix and follow-up. I re-reviewed the runtime group-auth path and the new end-to-end test, and the original blocker is resolved. The executor now joins the executors group through the password_hash registration path, so project.notification.started can reach it as expected. The unrelated project_mode.yaml failure appears to be a pre-existing repo-layout issue, not caused by this PR. Only two non-blocking notes remain: please have a maintainer confirm the intended external Jungle Grid REST contract, and consider adding a short “demo-only credential” note for the committed password_hash. From my side, the blocking concern is cleared. Nice work. |
|
Thanks again for reviewing this contribution. I updated the existing branch against the latest OpenAgents The update now covers the current submission shape, pre-uploaded input and script references, lifecycle events, phase-aware status, paginated logs, runtime details, managed artifact metadata, restart-safe duplicate-submission protection, and expanded safety tests while preserving the exact human approval and cancellation requirements. I re-ran the focused formatting, linting, typing, configuration, project-group, and mocked execution checks. The exact results and the unrelated missing-fixture failures are included in the PR description. The PR is ready for another review. |
Summary
This demo provides human-approved asynchronous Jungle Grid execution from an
OpenAgents project using a deterministic Python
WorkerAgent.It estimates before submission, records durable project state, requires an exact
human approval before billable compute can start, and reports lifecycle events,
status, polled workload logs, runtime details, and managed artifact metadata.
Current workflow
The demo calls Jungle Grid REST directly so the OpenAgents human-approval and
project-state transitions remain explicit and testable.
Safety
APPROVE <estimate-id>from a verifiedhuman:project identity.
CANCEL <job-id>from a verifiedhuman:project identity.
estimate requests and durable project state.
and signed URLs are redacted.
work.
input_idreferences; goalscannot read arbitrary executor host paths.
project state.
Changes
developbranch and preserved runtimeexecutorsgroup authentication throughpassword_hash./v1/mcp/jobsroutes, lifecycle-eventsendpoint, runtime endpoint, log pagination, cancellation, and managed artifact
routes.
JUNGLEGRID_API_BASE, retainJUNGLE_GRID_API_URLandJUNGLE_GRID_APIcompatibility fallbacks, and normalize trailing slashes.inference,training,fine_tuning, andbatch; normalizefine_tuningto the RESTfine-tuningvalue.commandplusargscompatibility.
input_files,script_files, expected artifacts, callbackconfiguration, environment references, GPU/routing constraints, timeout,
template, metadata, and optimization fields that are accepted by the current
API.
project artifacts for restart-safe duplicate-submission protection.
non-idempotent submissions.
startup logs as failure.
completion.
Testing
Passed:
PYTHONDONTWRITEBYTECODE=1 .venv/bin/pytest tests/agents/test_jungle_grid_executor.py -qPYTHONDONTWRITEBYTECODE=1 .venv/bin/pytest tests/network/test_agent_groups.py -q.venv/bin/ruff check sdk/demos/09_jungle_grid_gpu_execution tests/agents/test_jungle_grid_executor.py.venv/bin/ruff format --check sdk/demos/09_jungle_grid_gpu_execution tests/agents/test_jungle_grid_executor.pyMYPYPATH=sdk/src .venv/bin/mypy --follow-untyped-imports sdk/demos/09_jungle_grid_gpu_execution/agents/jungle_grid_executor.pyload_network_config("sdk/demos/09_jungle_grid_gpu_execution/network.yaml")JungleGridGPUExecutiongit diff --check origin/develop...HEADUnrelated repository fixture failures:
.venv/bin/pytest tests/network/test_agent_groups.py tests/network/test_authentication.py -qexamples/workspace_test.yamlis absent.venv/bin/pytest tests/mods/test_project_mode.py -qexamples/test_configs/project_mode.yamlis absentNo live paid Jungle Grid job was submitted.
Compatibility
The preferred command form is:
{"command": ["python", "-c", "print('hello')"]}The original form remains supported and is converted in order:
{"command": "python", "args": ["-c", "print('hello')"]}The old
JUNGLE_GRID_API_URLandJUNGLE_GRID_APIbase variables remainfallbacks behind the current
JUNGLEGRID_API_BASEvariable.Known limitations
not upload arbitrary local files or copy OpenAgents artifact bytes into
Jungle Grid.
downloaded artifact bytes are intentionally not placed in project state.
restarts and duplicate messages within that executor workflow.
exposed because they are not current public MCP submission fields.
Screenshots or evidence
The mocked integration tests exercise and assert the project-visible estimate
message, exact approval command, lifecycle updates, terminal completion/failure,
runtime-unavailable handling, and sanitized artifact metadata. No screenshots
or paid workload were created solely for this update.
Closes #432