@feigi/fleet-ctl 3.30.13 → 3.30.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feigi/fleet-ctl",
3
- "version": "3.30.13",
3
+ "version": "3.30.14",
4
4
  "description": "Agent fleet: run-team controller, merge bot, PR reviewer, and the ticket pipeline they share",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -23,31 +23,47 @@ import { makeDie, defineFlags } from "./arg.mjs";
23
23
  const NAME = "diff-stats";
24
24
 
25
25
  // Classification is by path — the cheapest signal that separates "prose" from
26
- // "code" — and priority-ordered because a test file is also a .ts file: test
27
- // wins over src, docs and config are named explicitly, src is the residue.
28
- export const isTest = (p) => /(\.|_)(test|spec)\.[cm]?[jt]sx?$/i.test(p) || /(^|\/)(__tests__|tests?|e2e|__mocks__)\//i.test(p);
29
- export const isDocs = (p) => /\.(md|mdx|markdown|txt|rst|adoc)$/i.test(p) || /(^|\/)docs?\//i.test(p) || /(^|\/)(README|CHANGELOG|LICENSE|CONTRIBUTING)(\.|$)/i.test(p);
26
+ // "code" — and subtractive: test, docs and config are named by language-neutral
27
+ // patterns, and whatever none of them claims is `src`. There is no list of
28
+ // runnable-code extensions, so a .java, .go or .py file is `src` exactly as a .ts
29
+ // one is.
30
+ //
31
+ // A test directory segment outranks everything, so a fixture under `tests/` is a
32
+ // test whatever its extension. A test NAME is checked only after docs and config,
33
+ // so a test-shaped name never moves a docs or config file: `docker-compose.test.yml`
34
+ // stays config and `docs/test_plan.md` stays docs, and the review keeps the
35
+ // dimensions it had.
36
+ export const isTestDir = (p) => /(^|\/)(__tests__|tests?|e2e|__mocks__)\//i.test(p);
37
+
38
+ // A test name is a `_test`/`.test`/`_spec`/`.spec` suffix or `test_` prefix on the
39
+ // basename, or a CamelCase `Test`/`Tests` suffix — case-sensitive and after a
40
+ // letter or digit, so `latest.go` and `Contest.java` stay source. The CamelCase
41
+ // suffix is a naming heuristic: it also claims a production component named like
42
+ // `ABTest.tsx`, which is the accepted cost of recognising `FooTest.java` without
43
+ // naming a language.
44
+ export const isTestName = (p) =>
45
+ /[._](test|spec)\.[^/.]+$/i.test(p) ||
46
+ /(^|\/)test_[^/]*$/i.test(p) ||
47
+ /[A-Za-z0-9]Tests?\.[^/.]+$/.test(p);
48
+
49
+ // Only a prose or config extension, or a conventional name, makes a file docs or
50
+ // config — which those already do anywhere, so neither `docs/` nor `.github/` has
51
+ // a rule of its own. A docs-site generator or a composite-action script under them
52
+ // stays `src`, and the src-gated dimensions (types, silent-failure, simplify) still
53
+ // run on it. `*.config.*` is config by naming convention, whatever the extension:
54
+ // that keeps `vite.config.ts` config without a list of JS extensions, and it also
55
+ // claims a non-JS module named like `app.config.py`.
56
+ export const isDocs = (p) => /\.(md|mdx|markdown|txt|rst|adoc)$/i.test(p) || /(^|\/)(README|CHANGELOG|LICENSE|CONTRIBUTING)(\.|$)/i.test(p);
30
57
  export const isConfig = (p) =>
31
58
  /\.(ya?ml|toml|ini|cfg|conf|json|json5|lock|env)$/i.test(p) ||
32
- /(^|\/)\.github\//i.test(p) ||
33
- /\.config\.[cm]?[jt]s$/i.test(p) ||
34
- /(^|\/)(package-lock\.json|pnpm-lock\.yaml|yarn\.lock|\.[a-z]+rc)$/i.test(p);
35
-
36
- // A runnable-code extension (.js/.cjs/.mjs/.ts/.tsx/.jsx/…), and the naming
37
- // convention that marks a code file as config regardless of where it sits.
38
- const isCodeExt = (p) => /\.[cm]?[jt]sx?$/i.test(p);
39
- const isConfigName = (p) => /\.config\.[cm]?[jt]sx?$/i.test(p);
59
+ /\.config\.[^/.]+$/i.test(p) ||
60
+ /(^|\/)\.[a-z]+rc$/i.test(p);
40
61
 
41
62
  export function classify(p) {
42
- if (isTest(p)) return "test";
43
- // A code file is `src` even under docs/ or .github/. Path-based docs/config
44
- // rules must not swallow executable code — a docs-site generator or a
45
- // composite-action script — or the src-gated dimensions (types, silent-failure,
46
- // simplify) silently never run on real code. Exception: `*.config.{js,ts,…}` is
47
- // config by naming convention.
48
- if (isCodeExt(p) && !isConfigName(p)) return "src";
63
+ if (isTestDir(p)) return "test";
49
64
  if (isDocs(p)) return "docs";
50
65
  if (isConfig(p)) return "config";
66
+ if (isTestName(p)) return "test";
51
67
  return "src";
52
68
  }
53
69
 
@@ -2014,7 +2014,7 @@ correctness+comments; and any `single-file` or `small` profile trims to
2014
2014
  correctness+silent-failure+comments, keeping tests only when a test file is in
2015
2015
  the diff. `comments` is on that floor
2016
2016
  unconditionally — it used to need a docs FILE, and `classify()` scores
2017
- any code extension `src` before it checks docs, so five production PRs whose whole
2017
+ only a prose extension or a README/CHANGELOG-style name docs, so five production PRs whose whole
2018
2018
  substance was prose inside a `.js`/`.mjs`/`.sh` comment scored `docs: 0` and ran
2019
2019
  without the one specialist that fit them, `dimensionsUnrun` empty every time.
2020
2020
  That floor holds **regardless of `hasSrc`** — a one-file `.yml` or