@opendesignai/harness 0.3.0-alpha.0 → 0.5.0-alpha.0

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.
@@ -24,7 +24,18 @@ Build URLs with a helper in the API client (add one if missing) and call the hel
24
24
 
25
25
  ## Exemptions
26
26
 
27
- The API client layer, and server code that defines the routes, are exempted with an `overrides` entry in the lint config (owner review). Inline disable comments are rejected; existing debt stays in `oxlint-suppressions.json` and may only shrink.
27
+ String literals and templates without substitutions are allowed in these routing forms:
28
+
29
+ - Registration with `get`, `post`, `put`, `patch`, `delete`, `head`, `options`, `connect`, `trace`, `all` or `use` takes the path first. A later argument must be an inline function. Recognized routers also accept a handler reference, factory call, array or spread.
30
+ - On a recognized router, `route` takes the path first and needs a second argument (`route(path, subApp)`) or a chained route method call (`route(path).get(handler)`).
31
+ - Registration with `on` takes a path or an array of paths second, after a literal HTTP method or an array of literal HTTP methods. The same handler check applies.
32
+ - Path dispatch covers equality and inequality in either operand order, the first argument to `startsWith`, and a `switch` case when the value being checked is named `pathname` or is a property with that name.
33
+
34
+ The rule follows chained route method calls to the original receiver. It recognizes receivers named `app`, `router`, `routes`, `server`, `hono` and `fastify`, constructors named `Hono`, `Router` and `KoaRouter`, and factories named `express`, `Router` and `fastify`. For member expressions such as `service.router` and `express.Router`, it uses the final property name. Receivers named `axios`, `ky` and `client` are always checked, including through route method chains.
35
+
36
+ A differently named HTTP client with an inline callback can match the registration pattern. A custom router with only a named handler, a route configured through an object and dispatch on a different property such as `req.path` can still report. Calls such as `fetch("/api/x")` and `axios.get("/api/x")`, URL construction and exported path constants continue to report.
37
+
38
+ Use an owner-reviewed `overrides` entry in the lint config for the API client layer and routing forms outside these patterns. Inline disable comments are rejected. Existing debt stays in `oxlint-suppressions.json` and may only shrink.
28
39
 
29
40
  ## Options
30
41
 
package/docs/verify.md CHANGED
@@ -24,7 +24,15 @@ Quick and default mode compare the working tree with the merge base of `HEAD` an
24
24
 
25
25
  The `lint-scope` check guards alternate lint configs and ignored tracked files in every mode. To omit it for a run, pass `--skip lint-scope`.
26
26
 
27
- The local base ref comes from `--base <ref>`, then a nonblank `OD_HARNESS_BASE`, then `verify.base`, then `origin/main`. For example, the pilot branch can commit `"verify": {"base": "origin/pilot/mfe"}` in `.harness/config.json`. An unavailable ref or history without a merge base exits 2 with a fetch hint. CI requires `--base <ref>` and compares directly with that commit, which must be available in the checkout.
27
+ The local base ref comes from `--base <ref>`, then a nonblank `OD_HARNESS_BASE`, then `verify.base`, then `origin/main`. For example, the pilot branch can commit `"verify": {"base": "origin/pilot/mfe"}` in `.harness/config.json`. Verify resolves this base before running any checks, including ratchet. An unavailable ref or history without a merge base exits 2 with a fetch hint. For a remote-free task sandbox, set `OD_HARNESS_BASE` to the initial snapshot SHA before starting the agent. The fixed SHA also covers changes the agent later commits. CI requires `--base <ref>` and compares directly with that commit, which must be available in the checkout.
28
+
29
+ ## Local concurrency
30
+
31
+ Default and `--ci` runs on a developer machine share host-level slots across repositories and worktrees. The slot count defaults to the number of available logical CPUs divided by four, rounded down with a minimum of two. Set `OD_HARNESS_VERIFY_SLOTS` to a positive integer to override it. Runs wait for a slot when all slots are occupied. The default slot directory in the OS temporary directory is `od-harness-verify-slots-<uid>` on POSIX and `od-harness-verify-slots` elsewhere. Set `OD_HARNESS_SLOT_DIR` to a nonblank path to override it.
32
+
33
+ When multiple slots are occupied, verify sets thread and worker defaults for new subprocesses using the available CPU count and current slot occupancy. Explicit environment settings take precedence. When only one slot is occupied, verify leaves the tool defaults in effect. `--quick`, `--no-slot`, `OD_HARNESS_NO_SLOT=1`, and a truthy `CI` or `GITHUB_ACTIONS` environment variable bypass slots and their thread defaults.
34
+
35
+ On macOS, `od-harness doctor` suggests a `.metadata_never_index` marker in the parent directory when neither a linked worktree nor its parent has the marker. This advisory helps reduce Spotlight indexing during parallel runs.
28
36
 
29
37
  ## Repository configuration
30
38
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendesignai/harness",
3
- "version": "0.3.0-alpha.0",
3
+ "version": "0.5.0-alpha.0",
4
4
  "description": "OpenDesign harness: od/* lint rules for Oxlint (ESLint plugin format), presets, file size budget, baseline ratchet and incremental duplication and unused-code gates",
5
5
  "keywords": [
6
6
  "eslint-plugin",
@@ -54,6 +54,7 @@
54
54
  "jscpd": "5.4.3",
55
55
  "knip": "6.50.0",
56
56
  "oxc-parser": "0.160.0",
57
+ "semver": "7.8.6",
57
58
  "yaml": "2.9.1"
58
59
  },
59
60
  "devDependencies": {
@@ -61,6 +62,7 @@
61
62
  "@eslint-community/eslint-plugin-eslint-comments": "4.8.1",
62
63
  "@od-harness/ts-eslint-parser": "0.0.0",
63
64
  "@types/node": "26.6.11",
65
+ "@types/semver": "7.8.0",
64
66
  "@typescript-eslint/types": "8.74.0",
65
67
  "eslint": "10.16.0",
66
68
  "oxfmt": "0.81.0",
@@ -16,6 +16,8 @@
16
16
  "od/no-cjk-literal": "error",
17
17
  "od/no-constant-flag": "error",
18
18
  "od/no-commented-out-code": "error",
19
+ "eslint/no-control-regex": "off",
20
+ "typescript/ban-ts-comment": "error",
19
21
  "react/rules-of-hooks": "error",
20
22
  "react/exhaustive-deps": "error",
21
23
  "react/refs": "off",
@@ -0,0 +1,5 @@
1
+ {
2
+ "rules": {
3
+ "typescript/no-explicit-any": "error"
4
+ }
5
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "plugins": ["vitest"],
3
+ "rules": {
4
+ "vitest/expect-expect": "off",
5
+ "vitest/hoisted-apis-on-top": "off",
6
+ "vitest/no-conditional-expect": "off",
7
+ "vitest/no-conditional-tests": "off",
8
+ "vitest/no-disabled-tests": "error",
9
+ "vitest/no-focused-tests": "error",
10
+ "vitest/no-standalone-expect": "off",
11
+ "vitest/prefer-snapshot-hint": "off",
12
+ "vitest/require-awaited-expect-poll": "off",
13
+ "vitest/require-local-test-context-for-concurrent-snapshots": "off",
14
+ "vitest/require-mock-type-parameters": "off",
15
+ "vitest/require-to-throw-message": "off",
16
+ "vitest/valid-describe-callback": "off",
17
+ "vitest/valid-expect": "off",
18
+ "vitest/valid-expect-in-promise": "off",
19
+ "vitest/valid-title": "off",
20
+ "vitest/warn-todo": "off"
21
+ }
22
+ }