Comments 2
The status manager in Sheets is the part I’d have expected you to skip, and it’s doing more work than a database would have. Keying updates by source_url means a re-run recognises what’s already been through, which is the thing most of these pipelines get wrong.
One question about the edge of that. The Instagram container polls FINISHED for 12 × 5s, then you write PUBLISHED to Sheets. If the publish succeeds but the Sheets write fails, or the polling times out on a container that actually completed, does the next run see DRAFT and publish again? Asking because that gap between “the side effect happened” and “we recorded that it happened” is where I’ve been bitten, and it only ever shows up in production.
Also liked “you never invent API parameters; when unsure, say so explicitly” plus the VERIFY MANUALLY list. Though it’s still an instruction rather than a guarantee — the model can comply 97% of the time and the 3% arrives as an importable JSON with a plausible field name that doesn’t exist. Did you end up validating generated node configs against the n8n schema before import, or was reading them enough at this scale?
Hello, ChimsK! Thank you for such deep, production-grade engineering questions. It’s incredibly refreshing to discuss the actual gaps between "generated" and "bulletproof" architecture in the comment section.To give you the full context: this entire pipeline was a fast-paced stress-test of the stealth/ox-alpha (GLM 5.3 Flash) model under a heavy agentic coding marathon. It was never intended to be packaged as a commercial case or put into active production—the 127-node JSON workflow is currently sitting idle as a snapshot of what a low-cost LLM can orchestrate in 3 days. However, you hit the exact architectural pain points that separate a demo from an enterprise system.Here is how these two edge cases look from my perspective:1. The Publication Gap & Distributed State ConsistencyYou are absolutely right about the danger of the gap between a side effect happening in Meta's infra and recording it in Google Sheets. In the experimental setup, if the Nginx/n8n process crashed or the Google Sheets API timed out after a successful Instagram publish, the next cron run would indeed see a DRAFT status and attempt a duplicate upload.To fix this for a real production environment, the step must be made idempotent. Since Instagram Graph API handles Reels in a two-step process—creating a media container (POST /media) and then publishing it (POST /media_publish)—the state transition must be strictly decoupled:Step 1: Generate the media container ID from Meta and immediately commit this ID and timestamps to Redis/Sheets before initiating the final publication.Step 2: On any re-run, the node router checks if a container ID already exists for the given source_url. If it does, instead of uploading a duplicate, it executes a GET request to verify the container's status on Meta’s side. If it's already published, we simply force-update the Sheet to PUBLISHED and fail-open.2. The 3% Hallucination & JSON Schema ValidationYour 97% vs 3% estimation is spot on. Models excel at mimicking plausible naming conventions, which is highly dangerous when n8n node parameters change across versions (e.g., typeVersion mismatch).For this specific experiment, I did not use an automated validator against the official n8n JSON schema. Given the scale and the rapid iteration cycle with Cline, a meticulous manual code audit during the import phase was enough to catch things like ghost parameters, phantom fields, or illegal require() calls inside JavaScript Code nodes (which I documented in the article's flaws section).However, if I were to scale this into a fully autonomous, self-healing framework without a human-in-the-loop audit, injecting a strict schema validation step (using n8n's community schema definitions) directly into the Cline output pipeline would be an absolute mandatory layer of defense.Thanks again for the brilliant breakdown. It's precisely these edge cases that make backend engineering so fascinating!
Как я скормил stealth/ox‑alpha 60 млн токенов, или история о том, как «навайбкодилось» 127 нод в n8n