So yeah, I vibe-coded a log colorizer—and I be ok with it

-


…and, value repeating, all of it looks exactly how I would like it to look and behaves exactly how I would like it to behave. Here’s one other motion shot!


Image of the log colorizer working

The ultimate product. She may not seem like much, but she’s got it where it counts, kid.

Credit:
Lee Hutchinson

The ultimate product. She may not seem like much, but she’s got it where it counts, kid.


Credit:

Lee Hutchinson

Problem spotted

Armed with my handy-dandy log colorizer, I patiently waited for the wrong-comment-area problem behavior to re-rear its still-ugly head. I didn’t need to wait long, and inside a few days, I had my root cause. It had been there all along, if I’d only decided to spend a while on the lookout for it. Here it’s:


Screenshot showing a race condition between apple news and wordpress's cache clearing efforts

Problem spotted. Note the AppleNewsBots hitting the newly published post before Discourse can do its thing and the ultimate version of the page with comments is prepared.

Credit:
Lee Hutchinson

Problem spotted. Note the AppleNewsBots hitting the newly published post before Discourse can do its thing and the ultimate version of the page with comments is prepared.


Credit:

Lee Hutchinson

Briefly: The issue is Apple’s fault. (Well, not likely. But kinda.)

Less briefly: I’ve blurred out Eric’s IP address, however it’s dark green, so anyplace within the above image where you see a blurry, dark green smudge, that’s Eric. Within the roughly 12-ish seconds presented here, you’re seeing Eric press the “publish” button on his day by day forecast—that’s the “POST” event on the very top of the window. The following events from Eric’s IP address are his browser having the usual post-publication conversation with WordPress so it may possibly display the “post published successfully” notification after which redraw the WP block editor.

Below Eric’s post, you may see the Discourse server (with orange IP address) notifying WordPress that it has created a brand new Discourse comment thread for Eric’s post, then grabbing the things it must mirror Eric’s post because the opener for that thread. You possibly can see it does GETs for the actual post and likewise for the post’s embedded images. About one second after Eric hits “publish,” the brand new post’s Discourse thread is prepared, and it gets attached to Eric’s post.

Ah, but notice what else happens during that one second.

To assist expand Space City Weather’s reach, we cross-publish all of the location’s posts to Apple News, using a preferred Apple News plug-in (the identical one Ars uses, in reality). And right there, with those two GET requests immediately after Eric’s POST request, lay the issue: You’re seeing the vanguard of Apple News’ hungry army of story-retrieval bots, summoned by the identical “publish” event, charging in and demanding a replica of the brand recent post before Discourse has a probability to do its thing.



Source link

ASK ANA

What are your thoughts on this topic?
Let us know in the comments below.

0 0 votes
Article Rating
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Share this article

Recent posts

0
Would love your thoughts, please comment.x
()
x