validasi-input
Technical notes on web development, DevOps, and AI integration.
2 articles
- 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