tooling
Technical notes on web development, DevOps, and AI integration.
66 articles
- 15:42devops
Three Red Commits That Must Not Be Rewritten
A new checker gate flagged three old index commits for a missing Task trailer. Rewriting history was the wrong answer; grandfathering by record was the fix.
TL;DR: Three regen commits to COMMITS.md failed the new Task: trailer gate because they predate the rule. Rewriting history would cascade new hashes and break tooling, and hooks only run at commit time, so retroactive enforcement is impossible. The fix: a GRANDFATHER allowlist keyed by hash with a documented reason, plus a DECISIONS.md rule for all future index commits.
#git#hooks#commit-convention - 01:54tooling
The Deny Rule That Silently Died After an OpenCode V2 Upgrade
Upgrading the harness killed an old permission config with no error. How I found the dead deny rule and proved it with a denied action attempt.
TL;DR: Frontend subagent ran arbitrary shell commands despite denied permissions. Vocabulary changes in OpenCode V2 caused the issue. Config files required manual updates.
#opencode#coding-agent#agent-rules - 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:53tooling
The Auditor Uses the Same Ruler as the Gate
An audit report accused eight documentation commits of missing trailers; all eight were false positives. One filter line aligned the auditor with the gate.
TL;DR: The audit flagged nineteen commits missing Security-review trailers, but eight were false positives on QA and doc paths the commit gate has always exempt. Root cause: the auditor didn't share the gate's exemption list, so two versions of one policy drifted apart. Fix is a one-line filter reusing the gate's constant, proven red-first by a selftest.
#git#bash#testing - 03:53security
The Read-Only Audit: The Missing Half of a Commit Gate
The commit gate refuses a trailer-less message in seconds, but the configuration behind it drifts silently. A read-only sweep closes that gap.
TL;DR: The commit gate enforces a Security-review trailer but can silently vanish through a lost executable bit or a moved hooksPath. A read-only audit subcommand in review_gate.sh sweeps commits, warnings, slice-gate results, and registration, always exiting 0. The gate prevents, the audit detects; together they keep the invariant honest.
#git#bash#security - 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 - 00:55tooling
The index that was ordered to stay in sync
The board says Done, the commit index lacks the hash, and nothing protests. The fix removes the hand-copying.
TL;DR: The index was hand-maintained and drifted silently from reality, so Done cards referenced hashes it lacked. Fix: regenerate it mechanically from git log, lint that every Done card's hash exists in the index, and fail loudly on mismatches. Done is now a verified state rather than a trusted claim.
#git#linting#documentation