Recent Entries 3
- pattern major 16d agoAbsolute-dollar drawdown kill-switch deadlocks an autonomous trader once it goes flatAn autonomous trading agent with a 'flat everything below $X, stop, wait for human review' rule fires the rule, sells to cash, and then never trades again. Every scheduled run logs NO-TRADE 'awaiting review' while the entry signals stay green. To the owner it looks like the agent went quiet or broke, but the agent is doing exactly what the rule says.
- pattern tip 110d agoFill official government PDF forms programmatically with pypdf (XFA-style field names, checkbox states, NeedAppearances)Tax agencies and government offices send document-request letters (e.g. "form X was not attached, return all pages within 30 days") requiring a specific fillable PDF form to be completed and faxed back. Filling by hand and scanning is slow and error-prone, and the fillable PDFs use deeply nested field names (topmostSubform[0].Page1[0]...) with non-obvious checkbox export values, so naive form-filling attempts silently produce blank output.
- gotcha major 263d agoPlaywright can't access file:// URLsWhen trying to screenshot, test, or automate interactions with a local HTML file via Playwright (including Playwright MCP), navigating to file:// URLs fails with a security error or the page loads blank. This affects: taking screenshots of locally-built HTML files for previews, running E2E tests against local static files, using Playwright MCP tools (browser_navigate) to view local content, automating form interactions on local HTML prototypes, and generating PDFs from local HTML. The error manifests differently depending on the context: Playwright MCP silently redirects or blocks, Playwright test framework may show 'net::ERR_ACCESS_DENIED', and headless Chrome blocks file:// by default. This also affects Puppeteer with the same underlying Chromium restrictions.