Skip to content

feat(task-engine): add TaskSpec and semantic task-graph contracts - #533

Draft
skywhite1024 wants to merge 2 commits into
ljd/gen-sim-refactor-01-scene-enginefrom
ljd/gen-sim-refactor-02-seedgraph-contracts
Draft

feat(task-engine): add TaskSpec and semantic task-graph contracts#533
skywhite1024 wants to merge 2 commits into
ljd/gen-sim-refactor-01-scene-enginefrom
ljd/gen-sim-refactor-02-seedgraph-contracts

Conversation

@skywhite1024

@skywhite1024skywhite1024 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Description

Stack

Replace the direct-AtomicAction SeedGraph foundation with immutable Task Engine contracts built around the canonical Semantic Skill call format.

Architecture boundary

  • Adds immutable, JSON-safe TaskSpec, SuccessSpec, and SemanticTaskGraph values.
  • Freezes semantic_task_graph/v1; each node contains exactly one call decoded and re-encoded by the public Expert Program semantic-call codec.
  • Carries the canonical 64-character semantic integration fingerprint instead of a GenSim capability-catalog hash.
  • Validates node and TaskGroup DAGs, complete TaskGroup membership, semantic success predicates, planner provenance, and bounded TaskGroup failure policies.
  • Rejects grounded, atomic, controller, robot-route, motion-policy, physical-state, and resource-claim fields recursively, including nested metadata and registered-call arguments.
  • Keeps the E1-E9 ontology scene-independent and removes hard-coded arm fields.
  • Removes GenSim-owned capability registries, AtomicAction recipes, runtime policy defaults, motion policies, and the parallel Action Engine contract surface.

Unsupported task semantics remain expressible in TaskSpec; #535 planning will return a structured unsupported_semantic_capability result when the canonical catalog cannot execute them.

Refs #531

Type of change

  • New feature (non-breaking change which adds functionality)

Validation

  • pytest -q tests/gen_sim/task_engine tests/gym/envs/expert_program/test_decoder.py - 79 passed
  • pytest -q tests/docs/test_check_api_docs.py - 8 passed
  • Black 26.3.1 - 787 Python files unchanged
  • Public API docs - 1830/1830 exports documented
  • git diff --check - passed
  • Full Sphinx build not run locally because sphinx-build is unavailable in the validation environment

Checklist

  • Code passes Black 26.3.1.
  • Tests cover immutable round-trips, canonical codec compatibility, deterministic hashes, topology, and recursive forbidden fields.
  • Public API documentation is aligned.
  • No new third-party dependency is required.

@skywhite1024skywhite1024 added agent Features related to agentic system atomic action atomic action related functionality enhancement New feature or request labels Aug 20, 2026
@greptile-apps

Copy link
Copy Markdown

Greptile Summary

This PR introduces the Action Engine's SeedGraph contracts, semantic and atomic capability registries, runtime policy configuration, motion/orientation contracts, and task ontology.

  • Adds strict validation and hashing for task specifications, SeedGraphs, execution programs, and action contracts.
  • Adds deterministic semantic-operator expansion and atomic capability metadata.
  • Adds versioned runtime-policy defaults, migration paths, and typed motion modifiers.
  • Adds focused tests for runtime policy, task contracts, and motion policy.

Confidence Score: 4/5

The profile normalization defect should be fixed before merging because supported snapshot-less and legacy agent configurations can fail during policy loading.

Agent runtime-policy loading bypasses the singular-to-dual profile aliases used elsewhere, so the package's own ur10 default is rejected by fallback and legacy migration paths.

Files Needing Attention: embodichain/gen_sim/action_engine/config/runtime_policy.py

Important Files Changed

FilenameOverview
embodichain/gen_sim/action_engine/config/runtime_policy.pyAdds strict runtime-policy loading and migrations, but agent loading fails for supported singular robot profile names on fallback and legacy paths.
embodichain/gen_sim/action_engine/domain/v2.pyAdds comprehensive SeedGraph v3 validation for topology, contracts, ownership transitions, cleanup barriers, and resource conflicts.
embodichain/gen_sim/action_engine/capabilities/atomic.pyDefines atomic capability metadata and serializable state/resource contracts; no independently publishable defect was established on a current caller path.
embodichain/gen_sim/action_engine/capabilities/builtins.pyAdds semantic operator expansion and phase templates for placement, arrangement, orientation, and coordinated transport.
embodichain/gen_sim/action_engine/domain/programs.pyAdds strict coordinate-free TaskAgent and ExecutionProgram validation and hashing.
embodichain/gen_sim/task_engine/ontology.pyAdds the canonical task ontology consumed by the new Action Engine task contracts.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
TS[Task specification] --> OP[Semantic operator expansion]
OP --> SG[SeedGraph with action contracts]
SG --> VP[SeedGraph validation]
VP --> EP[Execution program]
RP[Runtime policy snapshot] --> MR[Motion policy resolution]
EP --> MR
MR --> AA[Atomic action execution]
Loading

Fix all with GreploopFix All in CodexFix All in Claude Code

Prompt To Fix All With AI
### Issue 1
embodichain/gen_sim/action_engine/config/runtime_policy.py:623-625
**Profile aliases bypassed during loading**
When a snapshot-less or legacy agent uses a supported singular profile such as `ur10`, `ur5`, `ur3`, or `franka`, `resolve_agent_runtime_policy` forwards it without the alias normalization used by motion-policy resolution, causing `default_runtime_policy` to raise `ValueError` instead of loading the corresponding `dual_*` defaults.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat(action-engine): add SeedGraph contr..." | Re-trigger Greptile

Comment on lines +623 to +625
return default_runtime_policy(
str(agent_config.get("robot_profile", "dual_ur10"))
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1Profile aliases bypassed during loading

When a snapshot-less or legacy agent uses a supported singular profile such as ur10, ur5, ur3, or franka, resolve_agent_runtime_policy forwards it without the alias normalization used by motion-policy resolution, causing default_runtime_policy to raise ValueError instead of loading the corresponding dual_* defaults.

Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/gen_sim/action_engine/config/runtime_policy.py
Line: 623-625
Comment:
**Profile aliases bypassed during loading**
When a snapshot-less or legacy agent uses a supported singular profile such as `ur10`, `ur5`, `ur3`, or `franka`, `resolve_agent_runtime_policy` forwards it without the alias normalization used by motion-policy resolution, causing `default_runtime_policy` to raise `ValueError` instead of loading the corresponding `dual_*` defaults.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in CodexFix in Claude Code

@skywhite1024
skywhite1024 marked this pull request as draft August 21, 2026 07:30
@skywhite1024
skywhite1024force-pushed the ljd/gen-sim-refactor-02-seedgraph-contracts branch from 30992ce to 7c9fc2dCompareAugust 21, 2026 09:56
@skywhite1024
skywhite1024force-pushed the ljd/gen-sim-refactor-02-seedgraph-contracts branch from 7c9fc2d to 06b6301CompareAugust 21, 2026 10:11
@skywhite1024skywhite1024 changed the title feat(action-engine): add SeedGraph contracts and capabilitiesfeat(task-engine): add TaskSpec and semantic task-graph contractsAug 21, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentFeatures related to agentic systematomic actionatomic action related functionalityenhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@skywhite1024@yuecideng