---
title: "#aicode articles | Hashnode"
description: "Explore 1 articles tagged #aicode on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/aicode"
---

Tag

# #aicode

1 posts · 0 followers

[Powerduck](https://hashnode.com/@powerduck) · [Oct 26](https://hashnode.com/posts/agent-appended-duplicate-config-key-last-one-silently-wins/6adfc5e6d383bb6df01e6a84)

### [The agent appended a duplicate config key, and the last one silently won](https://blogs.powerduck.com/agent-appended-duplicate-config-key-last-one-silently-wins?utm_source=hashnode&utm_medium=feed)

The agent needed to raise the request timeout, so it appended a second timeout block to the config instead of editing the existing one. The lenient parser silently kept the last occurrence, and the first tuned value vanished without an error.

3 min read · [blogs.powerduck.com](https://blogs.powerduck.com/agent-appended-duplicate-config-key-last-one-silently-wins?utm_source=hashnode&utm_medium=feed)

[Powerduck](https://hashnode.com/@powerduck) · [Oct 26](https://hashnode.com/posts/agent-added-validation-after-the-write-not-before/6adfb732dbf3d4dd5f445535)

### [The agent added validation after the write instead of before it](https://blogs.powerduck.com/agent-added-validation-after-the-write-not-before?utm_source=hashnode&utm_medium=feed)

The agent added a guard to reject negative quantity, but placed it after the order was already saved. The standalone guard test went green while invalid rows kept landing in the table. A check that runs after the side effect protects nobody.

3 min read · [blogs.powerduck.com](https://blogs.powerduck.com/agent-added-validation-after-the-write-not-before?utm_source=hashnode&utm_medium=feed)

[Powerduck](https://hashnode.com/@powerduck) · [Oct 26](https://hashnode.com/posts/agent-extracted-helper-merged-two-error-paths/6adfa9b106c3f0509df1add3)

### [The agent extracted a shared helper and merged two callers' error paths](https://blogs.powerduck.com/agent-extracted-helper-merged-two-error-paths?utm_source=hashnode&utm_medium=feed)

Two routes shared an upstream call, so the agent lifted the block into one helper. The callers differed only on fault: one rethrew for a 500, the other served a cached fallback. The helper picked one exit, the harder caller silently degraded, and green tests missed it.

4 min read · [blogs.powerduck.com](https://blogs.powerduck.com/agent-extracted-helper-merged-two-error-paths?utm_source=hashnode&utm_medium=feed)

[Powerduck](https://hashnode.com/@powerduck) · [Oct 26](https://hashnode.com/posts/agent-normalized-lowercase-key-broke-case-sensitive-lookups/6adf9bdca895bdc638d39e05)

### [The agent lowercased the lookup key and broke every case-sensitive record](https://blogs.powerduck.com/agent-normalized-lowercase-key-broke-case-sensitive-lookups?utm_source=hashnode&utm_medium=feed)

The agent lowercased an opaque external id to fix inconsistent lookups, normalizing on write and read. New rows matched, existing mixed-case rows went missing and fell back to a default nobody noticed. Covers when normalization corrupts stored data and how to keep the canonical token intact.

3 min read · [blogs.powerduck.com](https://blogs.powerduck.com/agent-normalized-lowercase-key-broke-case-sensitive-lookups?utm_source=hashnode&utm_medium=feed)

[Powerduck](https://hashnode.com/@powerduck) · [Oct 26](https://hashnode.com/posts/agent-wired-success-path-left-failure-branch-silent/6adf8e7265110ba5528e3f97)

### [The agent wired the success path and left the failure branch silent](https://blogs.powerduck.com/agent-wired-success-path-left-failure-branch-silent?utm_source=hashnode&utm_medium=feed)

The agent implemented the happy path, returned 200, and declared done. The failure branch emitted nothing: no log, no trace, no surfaced error, so when it fired in production on-call had nothing to grep for. Covers a structured breadcrumb on every exit branch and verifying it under fault.

3 min read · [blogs.powerduck.com](https://blogs.powerduck.com/agent-wired-success-path-left-failure-branch-silent?utm_source=hashnode&utm_medium=feed)

[1](https://hashnode.com/posts/agent-wired-success-path-left-failure-branch-silent/6adf8e7265110ba5528e3f97)

[Powerduck](https://hashnode.com/@powerduck) · [Oct 26](https://hashnode.com/posts/tool-partial-json-agent-fills-missing-fields/6adf7f914f58eab0397db423)

### [The tool cut off mid-JSON, and the agent filled the missing fields itself instead of stopping](https://blogs.powerduck.com/tool-partial-json-agent-fills-missing-fields?utm_source=hashnode&utm_medium=feed)

A tool call returned truncated JSON on timeout. The agent treated the partial chunk as live data and completed the missing fields by guess, so invented values blended into the plan. Covers why a model should never finish a partial record, and the raw-output checkpoint that stops it.

3 min read · [blogs.powerduck.com](https://blogs.powerduck.com/tool-partial-json-agent-fills-missing-fields?utm_source=hashnode&utm_medium=feed)

[Powerduck](https://hashnode.com/@powerduck) · [Oct 26](https://hashnode.com/posts/agent-left-debug-print-in-shipped-handler/6ade9e7e432bb9b5e3f91025)

### [The agent left the debug print in the shipped handler, and the green suite could not see it](https://blogs.powerduck.com/agent-left-debug-print-in-shipped-handler?utm_source=hashnode&utm_medium=feed)

The agent fixed the real bug, tests went green, and merged — but the scratch console.log stayed behind. A logging call has no assertion target, so green proves control flow, not that diagnostics were removed. Covers noise versus the secret-leak tier and the checks that catch leftover prints.

3 min read · [blogs.powerduck.com](https://blogs.powerduck.com/agent-left-debug-print-in-shipped-handler?utm_source=hashnode&utm_medium=feed)

[Powerduck](https://hashnode.com/@powerduck) · [Oct 25](https://hashnode.com/posts/agent-pasted-outdated-qna-answer-for-old-major/6ade91921d5fbd32599604f6)

### [The agent pasted the top-voted answer, but it was written for v1](https://blogs.powerduck.com/agent-pasted-outdated-qna-answer-for-old-major?utm_source=hashnode&utm_medium=feed)

The agent pasted the top-voted Q&A answer to silence a deprecation, tests passed, and the call silently no-op'd on the installed major. Votes reward past usefulness, not a match to your pinned version today. Compare its era to the lockfile, grep for the symbol, assert the observable result.

3 min read · [blogs.powerduck.com](https://blogs.powerduck.com/agent-pasted-outdated-qna-answer-for-old-major?utm_source=hashnode&utm_medium=feed)

[Powerduck](https://hashnode.com/@powerduck) · [Oct 25](https://hashnode.com/posts/agent-sorted-json-keys-broke-request-signature/6ade82bde7a2fa2e5a44e31f)

### [The agent sorted the JSON body keys to tidy it up, and the request signature stopped matching](https://blogs.powerduck.com/agent-sorted-json-keys-broke-request-signature?utm_source=hashnode&utm_medium=feed)

The agent sorted the webhook body's JSON keys alphabetically after signing. Shape-only tests passed, CI went green, but production returned 401 signature\_invalid: the receiver rehashed the reordered bytes and got a different digest. Order is cosmetic to a parser; bytes are everything to a signature.

3 min read · [blogs.powerduck.com](https://blogs.powerduck.com/agent-sorted-json-keys-broke-request-signature?utm_source=hashnode&utm_medium=feed)

[Powerduck](https://hashnode.com/@powerduck) · [Oct 25](https://hashnode.com/posts/agent-cached-access-token-forever-no-refresh/6ade782ec8673eff918f1aaf)

### [The agent fetched the access token once at boot and cached it forever, so rotation broke the app hours later](https://blogs.powerduck.com/agent-cached-access-token-forever-no-refresh?utm_source=hashnode&utm_medium=feed)

The agent fetched a client-credentials token once at startup, cached it for the process lifetime, and never modeled expiry. Stubbed tests passed, the deploy was clean, and an hour later calls returned 401 until a restart. A short-lived token was treated as a static key.

3 min read · [blogs.powerduck.com](https://blogs.powerduck.com/agent-cached-access-token-forever-no-refresh?utm_source=hashnode&utm_medium=feed)
