def test_validation_with_array_access(editor: ArtifactEditorToolSpec):
    """Test validation works correctly with array access patterns."""
    editor.create_artifact(name="John", age=30, tags=["python", "developer"])

    # Valid array operations should work
    patch = JsonPatch(
        operations=[
            PatchOperation(op="replace", path="/tags/0", value="rust"),
            PatchOperation(op="add", path="/tags/-", value="expert"),
        ]
    )

    result = editor.apply_patch(patch)
    assert result["tags"] == ["rust", "developer", "expert"]
Test validation works correctly with array access patterns.
llama-index-integrations/tools/llama-index-tools-artifact-editor/tests/test_artifact_editor.py