wp_update_post does not change post status from draft to publish, returns 1

I’m writing a post approval utility for the front end, because we don’t want our editor to be able to access the admin dashboard. There are questions on Stack nearly identical to what I’m trying to accomplish, but that guy’s problem has to do with the infinite loop issue. Otherwise, he claims his code works:

Automatically fill custom field value on post publish/update

I’ve searched around a bit, and I’m having trouble finding an answer to this question. What I’m trying to do is automatically fill a custom field when a post (custom post type) is updated or published. Ideally the completed script will call out to an API and fill the custom field with the resulting information whenever a post is created or updated. For right now though, I’m just trying to automatically fill my custom field with a simple string for testing. Here’s my code: