You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Guardrails TB1: one type-aware lint rule through agent hook, editor, pre-commit and CI with a shrink-only baseline #4297
Part of #4296. The smallest slice that proves the whole lint pipeline end to end, before adding rules in bulk.
Behaviour
An agent (or a person) who writes void-less, un-awaited promise code in packages/**/src sees the error at edit time, again at commit, and CI fails the same way, while the existing occurrences are tolerated by a baseline that can only shrink.
Scope
Add oxlint-tsgolint and enable typescript/no-floating-promises in .oxlintrc.json (oxlint --type-aware).
scripts/lint-ratchet.mjs: runs oxlint with JSON output, compares counts per file × rule with scripts/lint-baseline.json. Fails on any new finding; fails when a baselined count dropped but the baseline was not lowered (--update lowers it, never raises). Each error prints the rule, the guardrail id, the doc anchor and the fix (await, void, or .catch with a Developer diagnostics log).
scripts/guardrails.json: registry with this first entry (id, source, layer, check, baseline). pnpm lint validates the registry.
pnpm lint calls the ratchet instead of bare oxlint; pnpm lint:fix keeps oxlint --fix.
.lintstagedrc.json: staged *.{ts,tsx,mjs} → ratchet in staged-file mode.
.claude/settings.jsonPostToolUse hook (Edit/Write/MultiEdit): ratchet on the touched file; findings go back to the agent. .vscode/extensions.json recommends the oxc extension with type-aware on.
scripts/ci-plan.mjs RULES updated for the new files.
Done when
A test fixture with a floating promise fails the ratchet with the fix message; the same file with await passes.
A baseline entry that went down without --update fails with "lower the baseline".
Measured: type-aware lint time for the full repo and for one file (hook budget ≤ 2 s per file), reported in the PR.
Activity
feat(lint): type-aware floating-promise rule through a shrink-only li…
DoodleBears commentedon Nov 16, 2026
Agent work outcome
harness:claude-code,model:claude-opus-5-5).vscode/is gitignored.Generated by Claude Code
fix(mobile): settle every floating promise in apps/mobile (#4307)
test(client): fix 53 floating promises in client tests (#4305)
test(client): fix 53 floating promises in client tests (BotHarness#4305)