automation
Technical notes on web development, DevOps, and AI integration.
52 articles
- 16:55backend
A Format-Aware Intake Converter for XLSX, DOCX, and PDF
A practical design for converting spreadsheets, Word documents, and PDFs into structured and readable intake digests.
TL;DR: This converter processes XLSX, DOCX, and PDF batches with format-specific readers under one shared workflow, leaving originals untouched. Spreadsheets get formula recalculation via headless LibreOffice, typed JSON, and Markdown output; Word and PDF convert to Markdown with layout limits and no OCR. Failures are logged per file while the batch continues, but a failing exit status flags results for review.
#python#data-import#automation - 23:07testing
Five Field Dashboards Captured with the Superadmin Face
Screenshot manuals recorded five field dashboards as the superadmin view; per-test identity moved to session cookies inside one context.
TL;DR: The screenshot manual showed one dashboard for all five field roles, but four dashboards actually differ structurally. Fix: keep one superadmin storageState as seed, then each capture test logs in via API and overwrites cookies on the same context. New roles now need just one capture test plus a roleItemHtml mapping entry.
#playwright#testing#automation - 02:27testing
Green recording, a dialog that never appeared
A passing QA test does not guarantee the filled dialog appears in the feature-tour recording. Measured pauses and element screenshots make the moment real.
TL;DR: A test passed, yet the recording never showed the dialogs being filled. Assertions verify final state and can succeed in a window shorter than one frame, while the recorder blindly captures whatever's on screen. The fix: deliberate pauses and named screenshots before each action, plus keeping the test tab in the foreground.
#playwright#qa#e2e - 22:40testing
An Automatic PDF Manual from Playwright Captures
One manifest from the Playwright capture tours generates the user manual: an HTML page per tour group, an index, and an A4 PDF with an automatic size guard.
TL;DR: Playwright test videos only save after the context closes, so ffmpeg conversion must move to afterAll. A single manifest then drives three HTML outputs and an A4 PDF via Chromium. Cleanup needs trash before permanent delete, and a node:assert size guard flags empty manuals.
#playwright#documentation#automation - 04:56devops
The Slice Gate That Read Another Program's Artifacts
One program directory baked into cmd_slice let a validation gate pass on someone else's evidence; a one-line env-override fixed it.
TL;DR: A slice gate silently validated the wrong program's evidence because the program directory was hardcoded in cmd_slice. The fix was one line: read an env var first, fall back to the default, matching the existing REPO_ROOT pattern. Run tools in two contexts and compare file references to catch baked-in constants early.
#bash#coding-agent#validasi-input - 04:56devops
A Commit Gate Needs a Sanctioned Path, Not Just a Refuser
A hook that refuses direct commits is half a gate; a wrapper promised since Task 1 but never implemented turns security into a total lock.
TL;DR: The commit wrapper subcommand was promised since Task 1 but never implemented, so the gate blocked both unsafe and sanctioned paths. The fix: a 40-line cmd_commit that validates messages via the same check path before committing, with no silent rewriting. Fail-closed testing exposed the bug; write red tests for missing sanctioned paths up front.
#git-hooks#coding-agent#bash - 04:55devops
Blocking Direct Git Commits with a PreToolUse Hook
A PreToolUse hook makes bare git commit from coding-agent sessions technically impossible, not merely forbidden in a document.
TL;DR: This commit turned the review gate from a documented convention into actual enforcement, registering a PreToolUse hook that blocks bare git commit across settings and nine agent definition files. The first real test returned exit 2 because the sanctioned wrapper didn't exist yet. That rejection proved fail-closed works: a missing part never quietly permits.
#git-hooks#coding-agent#keamanan-proses - 03:00devops
Review Status Tokens: Making Review Debt Grepable
Four review:* tokens plus a board validator make agent review debt visible, countable, and batchable, while security surfaces never wait in a queue.
TL;DR: Reviewing every tiny slice cost 50-60k subagent tokens per round regardless of diff size, making review the largest session expense. The fix: every done row must carry a review token, enforced by a board validator, with non-security work batched until the queue hits three or the session closes. Security surfaces skip the queue, and tokens make review debt greppable.
#code-review#ai-agents#workflow - 22:45tooling
One Door, One ID: An Audit Tool That Cannot Be Fooled
A review flagged read() following symlinks into .git and a lint matching IDs across file boundaries. What an evidence verifier owes its own integrity.
TL;DR: An audit tool review found two bugs. Its read() helper followed symlinks anywhere, so it now rejects all symlinks outright, dodging the race between resolving and opening. Also, joining lint corpus files with an empty string fused IDs across file boundaries, causing false matches; a newline separator fixed that.
#python#symlink#qa