#4871·servers

Agentic software factory Part 11: local:gate, per-file coverage in CI, pre-push-gate skill

Author: cliffhallCreated Sep 27, 2026Updated Sep 28, 2026
Labelsenhancementv2

Part of the agentic software factory tracker #4858, Wave 4. Proposed as S10 in docs/agent-guidance-inception.md (PR #4861) §9, from #4859.

Depends on

After Part 3 (skills infrastructure, for verify:skills:cli), Part 4 (TS gate), Part 5 (Python gate), #4854 and #4855.

Scope

  • A root npm run local:gate, run under the Inspector's gate-lease.mjs so concurrent sessions queue. It chains:
    • verify:install-fresh first, adapted from the Inspector for the root workspace install only. local:gate never runs npm ci, so without it a stale local node_modules would be tested against dependencies CI doesn't use
    • the TS validate and the Python validate
    • verify:skills:cli
    • per-file coverage for both languages, from #4854 and #4855
    • a thin boot smoke for each server over each transport it implements: stdio for all seven, plus SSE and Streamable HTTP for everything
    • #4860's interface diff. #4860 is independent, so whichever of this issue and #4860 lands second adds it to local:gate, keeping "every check CI runs" true
  • CI runs coverage as a parallel job, as the Inspector now does (inspector#2159). Maintainers decided this on PR #4861, and #4854 and #4855 are amended to match.
  • timeout-minutes on every CI job; none declare one today.
  • Assert that no tests retry.
  • Remove Part 3's temporary verify:skills:cli wiring allowance (local:gate now runs it).
  • Port scripts/lib/workflow-gate.mjs and its tests, dropping its lib/headless-browser.mjs import along with the browser-engine rules. (gate-lease.mjs imports lib/win-shell-args.mjs, which Part 3 already ports.) The port ensures no workflow can invoke a local:* script and local:gate stays exactly the lease wrapper.
  • Add docs/quality-gate.md and the pre-push-gate skill.
  • Add the AGENTS.md rules: the mandatory pre-push gate, and the per-file ≥ 90 coverage rule, with a reason on every ignore or pragma. For TypeScript that is all four Vitest dimensions (lines, statements, functions, branches). For Python it is per-file lines and branches, the dimensions coverage.py measures; it has no native function dimension. The coverage rule is the carry-over task from #4854 and #4855.

Acceptance criteria

  • npm run local:gate runs every check CI runs.
  • A PR that drops any file below 90 fails CI.
  • Concurrent gates queue.
  • The skill carries eval cases that pass the threshold.
  • If this is the first skill-adding PR to merge, remove Part 3's empty-skills bootstrap allowance from verify:skills.

Branch

Targets v2/main. Closes #N won't auto-close an issue on a non-default branch, so close this one by hand on merge and move the card to Done.

Source: modelcontextprotocol/servers