@mrciphersmith/keryx 0.4.29 → 0.4.31
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/dist/cli.js +2446 -1391
- package/dist/core.js +90 -27
- package/dist/keryx-general-worker-entry.js +82 -25
- package/package.json +1 -1
- package/src/gdskills/bundled/install-manifest.json +2 -0
- package/src/gdskills/bundled/rules/core/api-contracts.mdc +21 -136
- package/src/gdskills/bundled/rules/core/async-patterns.mdc +18 -171
- package/src/gdskills/bundled/rules/core/clean-architecture.mdc +21 -3
- package/src/gdskills/bundled/rules/core/cli-interface-design.mdc +63 -194
- package/src/gdskills/bundled/rules/core/code-style-patterns.mdc +36 -49
- package/src/gdskills/bundled/rules/core/concurrency-patterns.mdc +32 -0
- package/src/gdskills/bundled/rules/core/database-patterns.mdc +26 -148
- package/src/gdskills/bundled/rules/core/error-handling.mdc +7 -8
- package/src/gdskills/bundled/rules/core/frontend-assistant.mdc +14 -29
- package/src/gdskills/bundled/rules/core/layout-rendering.mdc +51 -0
- package/src/gdskills/bundled/rules/core/mobx-store-template.mdc +69 -511
- package/src/gdskills/bundled/rules/core/nestjs-dto.mdc +18 -36
- package/src/gdskills/bundled/rules/core/playwright-testing.mdc +35 -308
- package/src/gdskills/bundled/rules/core/security-baseline.mdc +18 -140
- package/src/gdskills/bundled/rules/core/solid-principles.mdc +31 -7
- package/src/gdskills/bundled/rules/core/storybook-guidelines.mdc +20 -22
- package/src/gdskills/bundled/rules/core/tdd-workflow.mdc +37 -74
- package/src/gdskills/bundled/rules/core/ui-anti-slop.mdc +48 -37
- package/src/gdskills/bundled/skills/quality/deprecation-path/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +24 -60
- package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +13 -65
- package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +22 -35
- package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +16 -309
- package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +7 -21
- package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +83 -227
- package/src/gdskills/bundled/skills/review/review-layout/SKILL.md +22 -28
- package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +8 -8
- package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +15 -37
- package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +7 -7
- package/src/gdskills/bundled/skills/review/review-style/SKILL.md +31 -66
- package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +21 -39
- package/src/gdskills/bundled/skills/review/review-ui-ux/SKILL.md +42 -82
- package/src/gdskills/bundled/stacks/angular/rules/coding-style.mdc +15 -57
- package/src/gdskills/bundled/stacks/angular/rules/patterns.mdc +16 -60
- package/src/gdskills/bundled/stacks/angular/rules/security.mdc +11 -49
- package/src/gdskills/bundled/stacks/angular/rules/testing.mdc +13 -52
- package/src/gdskills/bundled/stacks/c-cpp/rules/coding-style.mdc +33 -57
- package/src/gdskills/bundled/stacks/c-cpp/rules/patterns.mdc +35 -62
- package/src/gdskills/bundled/stacks/c-cpp/rules/security.mdc +35 -62
- package/src/gdskills/bundled/stacks/c-cpp/rules/testing.mdc +34 -54
- package/src/gdskills/bundled/stacks/ci-github-gitlab/rules/patterns.mdc +27 -56
- package/src/gdskills/bundled/stacks/ci-github-gitlab/rules/security.mdc +51 -119
- package/src/gdskills/bundled/stacks/csharp-dotnet/rules/coding-style.mdc +42 -74
- package/src/gdskills/bundled/stacks/csharp-dotnet/rules/patterns.mdc +45 -84
- package/src/gdskills/bundled/stacks/csharp-dotnet/rules/security.mdc +34 -59
- package/src/gdskills/bundled/stacks/csharp-dotnet/rules/testing.mdc +33 -62
- package/src/gdskills/bundled/stacks/django/rules/coding-style.mdc +15 -56
- package/src/gdskills/bundled/stacks/django/rules/patterns.mdc +16 -68
- package/src/gdskills/bundled/stacks/django/rules/security.mdc +13 -71
- package/src/gdskills/bundled/stacks/django/rules/testing.mdc +16 -62
- package/src/gdskills/bundled/stacks/docker-k8s-terraform/rules/coding-style.mdc +30 -53
- package/src/gdskills/bundled/stacks/docker-k8s-terraform/rules/patterns.mdc +20 -56
- package/src/gdskills/bundled/stacks/docker-k8s-terraform/rules/security.mdc +52 -122
- package/src/gdskills/bundled/stacks/docker-k8s-terraform/rules/testing.mdc +23 -42
- package/src/gdskills/bundled/stacks/fastapi/rules/coding-style.mdc +13 -47
- package/src/gdskills/bundled/stacks/fastapi/rules/patterns.mdc +18 -81
- package/src/gdskills/bundled/stacks/fastapi/rules/security.mdc +13 -75
- package/src/gdskills/bundled/stacks/fastapi/rules/testing.mdc +14 -58
- package/src/gdskills/bundled/stacks/flutter-dart/rules/coding-style.mdc +36 -74
- package/src/gdskills/bundled/stacks/flutter-dart/rules/patterns.mdc +30 -66
- package/src/gdskills/bundled/stacks/flutter-dart/rules/security.mdc +33 -67
- package/src/gdskills/bundled/stacks/flutter-dart/rules/testing.mdc +41 -73
- package/src/gdskills/bundled/stacks/go/rules/coding-style.mdc +36 -57
- package/src/gdskills/bundled/stacks/go/rules/patterns.mdc +27 -42
- package/src/gdskills/bundled/stacks/go/rules/security.mdc +26 -43
- package/src/gdskills/bundled/stacks/go/rules/testing.mdc +23 -41
- package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/coding-style.mdc +18 -37
- package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/patterns.mdc +26 -43
- package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/security.mdc +25 -37
- package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/testing.mdc +34 -50
- package/src/gdskills/bundled/stacks/kotlin-android/rules/coding-style.mdc +28 -65
- package/src/gdskills/bundled/stacks/kotlin-android/rules/patterns.mdc +34 -78
- package/src/gdskills/bundled/stacks/kotlin-android/rules/security.mdc +35 -68
- package/src/gdskills/bundled/stacks/kotlin-android/rules/testing.mdc +34 -68
- package/src/gdskills/bundled/stacks/mobx/rules/coding-style.mdc +18 -64
- package/src/gdskills/bundled/stacks/mobx/rules/patterns.mdc +13 -66
- package/src/gdskills/bundled/stacks/mobx/rules/security.mdc +8 -35
- package/src/gdskills/bundled/stacks/mobx/rules/testing.mdc +10 -39
- package/src/gdskills/bundled/stacks/nestjs/rules/coding-style.mdc +32 -45
- package/src/gdskills/bundled/stacks/nestjs/rules/patterns.mdc +40 -60
- package/src/gdskills/bundled/stacks/nestjs/rules/security.mdc +30 -50
- package/src/gdskills/bundled/stacks/nestjs/rules/testing.mdc +27 -47
- package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/coding-style.mdc +14 -48
- package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/patterns.mdc +15 -67
- package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/security.mdc +12 -50
- package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/testing.mdc +11 -43
- package/src/gdskills/bundled/stacks/php-laravel/rules/coding-style.mdc +17 -58
- package/src/gdskills/bundled/stacks/php-laravel/rules/patterns.mdc +15 -56
- package/src/gdskills/bundled/stacks/php-laravel/rules/security.mdc +13 -50
- package/src/gdskills/bundled/stacks/php-laravel/rules/testing.mdc +14 -55
- package/src/gdskills/bundled/stacks/python/rules/coding-style.mdc +13 -41
- package/src/gdskills/bundled/stacks/python/rules/patterns.mdc +20 -61
- package/src/gdskills/bundled/stacks/python/rules/security.mdc +15 -57
- package/src/gdskills/bundled/stacks/python/rules/testing.mdc +16 -50
- package/src/gdskills/bundled/stacks/react/rules/coding-style.mdc +14 -40
- package/src/gdskills/bundled/stacks/react/rules/patterns.mdc +15 -55
- package/src/gdskills/bundled/stacks/react/rules/security.mdc +13 -49
- package/src/gdskills/bundled/stacks/react/rules/testing.mdc +10 -37
- package/src/gdskills/bundled/stacks/ruby-rails/rules/coding-style.mdc +12 -45
- package/src/gdskills/bundled/stacks/ruby-rails/rules/patterns.mdc +18 -67
- package/src/gdskills/bundled/stacks/ruby-rails/rules/security.mdc +11 -60
- package/src/gdskills/bundled/stacks/ruby-rails/rules/testing.mdc +14 -65
- package/src/gdskills/bundled/stacks/rust/rules/coding-style.mdc +39 -65
- package/src/gdskills/bundled/stacks/rust/rules/patterns.mdc +33 -60
- package/src/gdskills/bundled/stacks/rust/rules/security.mdc +35 -57
- package/src/gdskills/bundled/stacks/rust/rules/testing.mdc +29 -52
- package/src/gdskills/bundled/stacks/sql-db/rules/coding-style.mdc +12 -48
- package/src/gdskills/bundled/stacks/sql-db/rules/patterns.mdc +22 -113
- package/src/gdskills/bundled/stacks/sql-db/rules/security.mdc +11 -56
- package/src/gdskills/bundled/stacks/sql-db/rules/testing.mdc +14 -59
- package/src/gdskills/bundled/stacks/swift-ios/rules/coding-style.mdc +29 -65
- package/src/gdskills/bundled/stacks/swift-ios/rules/patterns.mdc +41 -88
- package/src/gdskills/bundled/stacks/swift-ios/rules/security.mdc +28 -53
- package/src/gdskills/bundled/stacks/swift-ios/rules/testing.mdc +32 -65
- package/src/gdskills/bundled/stacks/vue/rules/coding-style.mdc +17 -52
- package/src/gdskills/bundled/stacks/vue/rules/patterns.mdc +17 -63
- package/src/gdskills/bundled/stacks/vue/rules/security.mdc +11 -41
- package/src/gdskills/bundled/stacks/vue/rules/testing.mdc +16 -48
|
@@ -58,28 +58,15 @@ project-specific guide was found.
|
|
|
58
58
|
|
|
59
59
|
### TypeScript
|
|
60
60
|
|
|
61
|
-
- Avoid
|
|
61
|
+
- Avoid broad `as` casts. Prefer type guards, discriminated unions, and precise types. `any`, `!` and the `I` prefix are `.metaproject/rules/core/code-style-patterns.mdc` Rule 8.
|
|
62
62
|
- Keep tests and stories typed unless intentionally exercising invalid edge cases.
|
|
63
63
|
- Follow local React type import conventions consistently.
|
|
64
64
|
- Write new code in the direction of stricter compiler settings.
|
|
65
65
|
|
|
66
|
-
### React Components
|
|
66
|
+
### React Components and State Stores
|
|
67
67
|
|
|
68
|
-
-
|
|
69
|
-
- Business logic, IO, validation, and data transformation belong in stores/services.
|
|
70
|
-
- Avoid React local state/memo/callback hooks where the local architecture expects observable or
|
|
71
|
-
computed state.
|
|
72
|
-
- Use effects only for lifecycle, subscriptions, and third-party integration; always clean up.
|
|
73
|
-
- Components reading observable state are wrapped in the repository's reactive wrapper.
|
|
74
|
-
- Props shape and file naming follow local conventions.
|
|
68
|
+
Components follow `.metaproject/rules/core/code-style-patterns.mdc` (reactive wrapper, thin components, where state lives, effects and cleanup, props naming) and stores follow `.metaproject/rules/core/mobx-store-template.mdc` (naming and file casing, reactivity in the constructor, member order, `@action.bound` on public UI-called methods only, actions around async mutations). Each takes its severity from that rule's **Review severities** table, and a local guide that is stricter wins. Local `useState` for UI-only state and a memo over non-store values are correct. Beyond the rules:
|
|
75
69
|
|
|
76
|
-
### State Stores
|
|
77
|
-
|
|
78
|
-
- Store classes follow local naming, file casing, context, and hook conventions.
|
|
79
|
-
- Observable classes initialize their reactivity in constructors.
|
|
80
|
-
- Member ordering follows local lint/member-ordering rules.
|
|
81
|
-
- UI-called actions preserve `this` binding.
|
|
82
|
-
- Async callbacks that mutate observable state re-enter an action boundary.
|
|
83
70
|
- Derived serializable state has a single source of truth such as `currentState` when that is the
|
|
84
71
|
local pattern.
|
|
85
72
|
|
|
@@ -90,13 +77,12 @@ project-specific guide was found.
|
|
|
90
77
|
entries.
|
|
91
78
|
- Browser storage goes through shared wrappers/adapters; direct `localStorage`/`sessionStorage`
|
|
92
79
|
access is a review finding when wrappers exist.
|
|
93
|
-
- Catch blocks
|
|
94
|
-
|
|
80
|
+
- Catch blocks notify through the established UI notification channel and normalize user-facing
|
|
81
|
+
messages; keeping the cause and logging once are `.metaproject/rules/core/error-handling.mdc` Rules 3 and 5.
|
|
95
82
|
|
|
96
83
|
### Stories and Tooling
|
|
97
84
|
|
|
98
|
-
- New reusable UI surfaces have stories or examples matching local standards.
|
|
99
|
-
- Stories include representative default, empty/minimal, and stress/large states where useful.
|
|
85
|
+
- New reusable UI surfaces have stories or examples matching local standards; which states they cover is `.metaproject/rules/core/storybook-guidelines.mdc` Rule 2.
|
|
100
86
|
- Wrapper components expose plain props for controls when the primary component is store-only.
|
|
101
87
|
- Treat unused-code tools as signals: preserve intentional public APIs with narrow ignores rather
|
|
102
88
|
than deleting documented runtime/story/test entrypoints.
|
|
@@ -169,7 +155,7 @@ conditions land under that rubric.
|
|
|
169
155
|
| Condition | Severity | Why, under the canonical rubric |
|
|
170
156
|
|---|---|---|
|
|
171
157
|
| Unguarded direct storage writes that can throw on quota | `blocker` | Crash on a reachable input |
|
|
172
|
-
| Lost reactivity; masked translation
|
|
158
|
+
| Lost reactivity (`code-style-patterns.mdc` Rule 1 row); a masked translation | `major` | Named trigger and named outcome. Identical to `review-frontend`'s rating for lost reactivity, deliberately. An error path is rated by `error-handling.mdc`, not here |
|
|
173
159
|
| A convention violation the linter or CI already fails on | `minor` | The machine catches it; a reviewer restating it is not a merge gate |
|
|
174
160
|
| Naming, story coverage, file placement | `minor` | Correct today; the cost is to the next editor |
|
|
175
161
|
| A convention preference with no named consequence | `info` | Shared laws 1 and 2 |
|
|
@@ -3,14 +3,14 @@ name: review-highload
|
|
|
3
3
|
model_tier: deep
|
|
4
4
|
description: |
|
|
5
5
|
Use when: reviewing code that will run under high concurrency or high traffic —
|
|
6
|
-
race conditions, connection pool exhaustion, cache invalidation,
|
|
6
|
+
race conditions, connection pool exhaustion, cache invalidation,
|
|
7
7
|
unbounded queues, missing backpressure, retry storms, idempotency gaps,
|
|
8
|
-
|
|
8
|
+
concurrent sessions sharing state files, lock files,
|
|
9
9
|
process fan-out, and distributed systems anti-patterns.
|
|
10
10
|
Dispatched by review-orchestrator.
|
|
11
|
-
NOT for: frontend re-render performance (review-performance),
|
|
12
|
-
(review-performance), clean code style
|
|
13
|
-
(review-architecture).
|
|
11
|
+
NOT for: frontend re-render performance (review-performance), database under load
|
|
12
|
+
such as N+1 queries and missing indexes (review-performance), clean code style
|
|
13
|
+
(review-clean-code), or NestJS module structure (review-architecture).
|
|
14
14
|
triggers:
|
|
15
15
|
- "highload review"
|
|
16
16
|
- "concurrency review"
|
|
@@ -19,7 +19,7 @@ triggers:
|
|
|
19
19
|
- "review distributed"
|
|
20
20
|
metadata:
|
|
21
21
|
author: "MrCipherSmith"
|
|
22
|
-
version: "1.
|
|
22
|
+
version: "1.5.0"
|
|
23
23
|
category: "review"
|
|
24
24
|
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
25
25
|
license: "MIT"
|
|
@@ -40,16 +40,15 @@ Reviews only changes introduced in the current branch (merge-base to HEAD).
|
|
|
40
40
|
```
|
|
41
41
|
High-Load Review Progress:
|
|
42
42
|
- [ ] Step 1: Read Job Context (if provided) — load profile, or the concrete triggers
|
|
43
|
-
- [ ] Step 2: Determine git scope (merge-base)
|
|
44
|
-
- [ ] Step 3:
|
|
45
|
-
- [ ] Step 4:
|
|
46
|
-
- [ ] Step 5:
|
|
47
|
-
- [ ] Step 6:
|
|
48
|
-
- [ ] Step 7:
|
|
49
|
-
- [ ] Step 8:
|
|
50
|
-
- [ ] Step 9:
|
|
51
|
-
- [ ] Step 10:
|
|
52
|
-
- [ ] Step 11: Emit findings in unified format
|
|
43
|
+
- [ ] Step 2: Determine git scope (merge-base), collect diff and changed file list
|
|
44
|
+
- [ ] Step 3: CLI, TUI and multi-session concurrency (Part 0)
|
|
45
|
+
- [ ] Step 4: Concurrency, race conditions and resource management (Part A, B)
|
|
46
|
+
- [ ] Step 5: Caching (Part C)
|
|
47
|
+
- [ ] Step 6: Lock contention and transaction hygiene (Part D)
|
|
48
|
+
- [ ] Step 7: Async processing and queues (Part E)
|
|
49
|
+
- [ ] Step 8: Retry, timeout and circuit breaker (Part F)
|
|
50
|
+
- [ ] Step 9: Idempotency and distributed invariants (Part G)
|
|
51
|
+
- [ ] Step 10: Emit findings in unified format
|
|
53
52
|
```
|
|
54
53
|
|
|
55
54
|
---
|
|
@@ -60,7 +59,7 @@ High-Load Review Progress:
|
|
|
60
59
|
|-------|------|----------|-------------|
|
|
61
60
|
| `branch` | string | no | Branch to review. Defaults to current branch. |
|
|
62
61
|
| `commit_range` | string | no | Explicit hash or range. Overrides merge-base detection. |
|
|
63
|
-
| `context_doc` | string | no |
|
|
62
|
+
| `context_doc` | string | no | Job context document: expected RPS, SLA, load profile. |
|
|
64
63
|
| `load_profile` | string | no | Expected RPS, concurrent users or sessions, or traffic pattern, when a job context states it. Nothing fills it by default; without it see **No stated load** below. |
|
|
65
64
|
|
|
66
65
|
---
|
|
@@ -101,15 +100,28 @@ boundary is the trigger-and-outcome test.
|
|
|
101
100
|
"duplicate charge on the first retry". The trigger is a stated load level or a
|
|
102
101
|
concrete one the evidence shows — never an assumed traffic level.
|
|
103
102
|
2. **A race condition on shared mutable state is never dismissed as unlikely.**
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
in-memory collections, child processes: the finding names the input that grows
|
|
109
|
-
it (requests, sessions, files, flows, children); the table below sets the level.
|
|
103
|
+
Races manifest unpredictably under load. Its *severity* still comes from its
|
|
104
|
+
outcome (conditions table below), but it is never dropped for improbability.
|
|
105
|
+
3. **An unbounded resource names what grows it** (requests, sessions, files, flows,
|
|
106
|
+
children); the table below sets the level.
|
|
110
107
|
4. **Architecture opinions without a named pattern violation and a load-related
|
|
111
|
-
failure mode are `info` only.**
|
|
112
|
-
|
|
108
|
+
failure mode are `info` only.**
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Rules This Lens Reads
|
|
113
|
+
|
|
114
|
+
Conditions a project rule already rates are rated by that rule's **Review severities** table, in `.metaproject/rules/core/`. This lens states none of them again and keeps only the calibration below.
|
|
115
|
+
|
|
116
|
+
| Condition | Rule |
|
|
117
|
+
|---|---|
|
|
118
|
+
| Lock file, state-file write, JSONL record, child fan-out, child output cap (Part 0) | `concurrency-patterns.mdc` |
|
|
119
|
+
| Creating endpoint with no idempotency key; unbounded list with no pagination | `api-contracts.mdc` |
|
|
120
|
+
| Swallowed rejection, `.catch(() => {})`, fallback that hides a failure, unhandled rejection | `error-handling.mdc` |
|
|
121
|
+
| Unbounded `Promise.all` / fan-out, missing timeout, `setTimeout` as a timeout, event-loop blocking, large synchronous read | `async-patterns.mdc` |
|
|
122
|
+
| Migration that locks a live table (Part D) | `database-patterns.mdc` |
|
|
123
|
+
|
|
124
|
+
Database under load (N+1, query in a loop, missing index, `SELECT *`, full-entity fetch) is `review-performance`'s: report none of it here.
|
|
113
125
|
|
|
114
126
|
---
|
|
115
127
|
|
|
@@ -120,176 +132,82 @@ boundary is the trigger-and-outcome test.
|
|
|
120
132
|
For a CLI, a full-screen TUI, agent sessions and their child processes, where the
|
|
121
133
|
load is the number of sessions, files, flows or children rather than RPS. A
|
|
122
134
|
finding here cites that trigger; it needs no request handler and no load profile.
|
|
135
|
+
Lock files, state-file writes, JSONL appends, child fan-out and child output are
|
|
136
|
+
`concurrency-patterns.mdc` and rated by its table. This lens adds:
|
|
123
137
|
|
|
124
138
|
- [ ] Several sessions or processes sharing one checkout run the same command over the same state directory (e.g. `.metaproject/`) and nothing serialises them
|
|
125
|
-
- [ ] Read-modify-write of a shared JSON/JSONL state file with no lock and no write-to-temp-then-rename: the last writer drops the other's update, or a reader parses a half-written file
|
|
126
|
-
- [ ] JSONL appended from several processes in more than one write per record, so lines interleave
|
|
127
|
-
- [ ] Lock file created by check-then-create instead of an exclusive create (`wx`); released outside `finally`; no stale-lock recovery (holder PID or age), so a crashed holder blocks every later session; or recovery that can take a live holder's lock
|
|
128
|
-
- [ ] One child process, subagent or task spawned per file, flow, finding or input item with no concurrency bound
|
|
129
139
|
- [ ] Retry loop (spawn, lock acquire, a remote or network call) with no cap and no backoff
|
|
130
|
-
- [ ] Child stdout/stderr or a log accumulated whole in memory (string concatenation, array push) with no cap or ring buffer
|
|
131
140
|
- [ ] AbortController or timeout leaks: timer not cleared on success, a listener added to a long-lived signal per call, a child not killed when the signal aborts, a background task outliving its session
|
|
132
141
|
- [ ] Long-running server: per-connection state with no bound, or a broadcast to every socket with no backpressure
|
|
133
142
|
|
|
134
143
|
### Part A: Concurrency and Race Conditions
|
|
135
144
|
|
|
136
|
-
#### A1. Shared Mutable State
|
|
137
|
-
|
|
138
145
|
- [ ] Shared in-memory state (module-level variables, singleton fields, static properties) mutated from concurrent requests without a lock, mutex, or atomic operation
|
|
139
|
-
- [ ] Read-modify-write
|
|
140
|
-
- [ ] `Map` / `Set` / plain objects used as in-process caches mutated from concurrent async operations
|
|
146
|
+
- [ ] Read-modify-write on shared counters, maps, or lists not wrapped in an atomic or transaction; `Map` / `Set` / plain objects used as in-process caches mutated from concurrent async operations
|
|
141
147
|
- [ ] NestJS `DEFAULT`-scoped (singleton) service holding per-request state (e.g., `this.currentUser = ...`)
|
|
142
|
-
|
|
143
|
-
#### A2. Double-Check and TOCTOU
|
|
144
|
-
|
|
145
|
-
- [ ] Check-then-act patterns where the condition can change between check and action: `if (!exists) insert` without a unique constraint or lock
|
|
148
|
+
- [ ] Check-then-act where the condition can change between check and action: `if (!exists) insert` without a unique constraint or lock
|
|
146
149
|
- [ ] Optimistic upsert without conflict handling (`INSERT ... ON CONFLICT DO NOTHING` with no retry)
|
|
147
150
|
- [ ] Token or resource validity checked before use but not at the moment of use (TOCTOU)
|
|
148
151
|
|
|
149
|
-
#### A3. Async/Await and Concurrency Primitives
|
|
150
|
-
|
|
151
|
-
- [ ] `Promise.all` used with an unbounded array of promises (can spawn thousands of concurrent operations)
|
|
152
|
-
- [ ] `for...of` with `await` inside where `Promise.all` would allow safe parallelism (sequential when parallel is intended)
|
|
153
|
-
- [ ] Missing concurrency limit: N parallel jobs where N = input size (use a concurrency limiter / semaphore for unbounded inputs)
|
|
154
|
-
- [ ] `async` function swallowing rejection via unhandled `.catch(() => {})` on a fire-and-forget, or a fire-and-forget call with no error handling and no queue backing
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
152
|
### Part B: Resource Management
|
|
159
153
|
|
|
160
|
-
#### B1. Connection Pools
|
|
161
|
-
|
|
162
154
|
- [ ] Database / Redis / HTTP connection created per request instead of using a shared pool
|
|
163
|
-
- [ ] Connection pool size not configured —
|
|
164
|
-
- [ ] Pool exhaustion handling: no timeout on `pool.connect()`, no error boundary — requests will hang silently
|
|
155
|
+
- [ ] Connection pool size not configured — default (often 5–10) queues at scale; no timeout on `pool.connect()`, so requests hang silently
|
|
165
156
|
- [ ] Connection opened in a function that may throw before `.release()` or `.end()` without a `finally` block
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
- [ ] File opened with `fs.open` / `fs.createReadStream` without explicit close / destroy on error
|
|
170
|
-
- [ ] Readable stream not consumed (memory grows indefinitely until GC or crash)
|
|
171
|
-
- [ ] Large file read into memory at once (`fs.readFileSync` / `Buffer.concat` on unknown-size input) — use streams
|
|
172
|
-
|
|
173
|
-
#### B3. Memory and Object Allocation
|
|
174
|
-
|
|
175
|
-
- [ ] Large objects allocated per-request that are not freed between requests, or allocated in a hot path where they could be pooled or reused
|
|
157
|
+
- [ ] File opened with `fs.open` / `fs.createReadStream` without close / destroy on error; readable stream not consumed
|
|
158
|
+
- [ ] Large objects allocated per request and not freed, or allocated in a hot path where they could be pooled
|
|
176
159
|
- [ ] In-process cache (plain `Map`) with no eviction policy — grows unboundedly
|
|
177
|
-
- [ ] Closure capturing a large object (e.g., full DB result set) in a long-lived data structure
|
|
178
|
-
|
|
179
|
-
---
|
|
160
|
+
- [ ] Closure capturing a large object (e.g., a full DB result set) in a long-lived data structure
|
|
180
161
|
|
|
181
162
|
### Part C: Caching
|
|
182
163
|
|
|
183
|
-
#### C1. Cache Invalidation
|
|
184
|
-
|
|
185
164
|
- [ ] Cache entry updated after a write but not invalidated for related keys (stale reads after update)
|
|
186
|
-
- [ ] Cache TTL set to 0
|
|
165
|
+
- [ ] Cache TTL set to 0 or missing on a frequently-read, rarely-written entity
|
|
187
166
|
- [ ] Cache key not namespaced — collision between tenants / environments
|
|
188
167
|
- [ ] Caching a response that contains per-user data without scoping the key to the user
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
- [ ] Hot key (the evidence shows many concurrent readers) expires simultaneously for many callers — no lock-based or probabilistic early expiry to prevent stampede
|
|
193
|
-
- [ ] Thundering herd: cache miss triggers N concurrent DB reads for the same key with no deduplication (e.g., no mutex/semaphore on the first fetch)
|
|
194
|
-
|
|
195
|
-
#### C3. Cache Correctness
|
|
196
|
-
|
|
197
|
-
- [ ] Mutable value stored in cache by reference (not a deep copy) — mutation after storage corrupts the cache
|
|
168
|
+
- [ ] Hot key (the evidence shows many concurrent readers) expires simultaneously for many callers — no lock-based or probabilistic early expiry
|
|
169
|
+
- [ ] Thundering herd: a cache miss triggers N concurrent DB reads for the same key with no deduplication (no mutex/semaphore on the first fetch)
|
|
170
|
+
- [ ] Mutable value stored in cache by reference — mutation after storage corrupts the cache
|
|
198
171
|
- [ ] Cache key includes non-deterministic components (timestamp, random value, process ID)
|
|
199
172
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
### Part D: Database Access Under Load
|
|
173
|
+
### Part D: Lock Contention and Transaction Hygiene
|
|
203
174
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
- [ ] Query filtering or ordering by a column not in an index on a large table
|
|
207
|
-
- [ ] JOIN on a column that lacks an index on at least one side
|
|
208
|
-
- [ ] Unique constraint missing on a column used in uniqueness checks
|
|
209
|
-
|
|
210
|
-
#### D2. Lock Contention
|
|
175
|
+
Migrations and indexes are `database-patterns.mdc`; query shape is `review-performance`.
|
|
211
176
|
|
|
212
177
|
- [ ] `SELECT ... FOR UPDATE` on a wide row range — locks more rows than needed
|
|
213
178
|
- [ ] Transaction holding a lock while performing external I/O (HTTP call, file read) — lock held far too long
|
|
214
179
|
- [ ] Nested transactions with locks — can deadlock under concurrent writers
|
|
215
|
-
- [ ] Long-running migration with a full-table lock on a live table, or adding a NOT NULL column without a default
|
|
216
|
-
|
|
217
|
-
#### D3. N+1 and Unbounded Queries
|
|
218
|
-
|
|
219
|
-
- [ ] Query inside a loop where one batch query would suffice
|
|
220
|
-
- [ ] `findAll()` / `SELECT *` on a large table with no LIMIT/pagination
|
|
221
|
-
- [ ] Fetching full entity to check a single field
|
|
222
|
-
|
|
223
|
-
#### D4. Connection and Transaction Hygiene
|
|
224
|
-
|
|
225
180
|
- [ ] Transaction started but no explicit commit / rollback on all code paths (leak on exception)
|
|
226
181
|
- [ ] Long-lived transaction (spans multiple user interactions or HTTP calls)
|
|
227
|
-
- [ ] Mixing read replicas and write primary within
|
|
228
|
-
|
|
229
|
-
---
|
|
182
|
+
- [ ] Mixing read replicas and write primary within one business operation without awareness of replication lag
|
|
230
183
|
|
|
231
184
|
### Part E: Async Processing and Queues
|
|
232
185
|
|
|
233
|
-
#### E1. Queue Backpressure
|
|
234
|
-
|
|
235
186
|
- [ ] Producer adding to an in-memory queue with no max depth — under load the queue grows until OOM
|
|
236
187
|
- [ ] Consumer not acknowledging/nacking messages — messages redeliver indefinitely on crash
|
|
237
|
-
- [ ] Batch consumer with no upper bound on batch size —
|
|
238
|
-
|
|
239
|
-
#### E2. Dead Letter and Poison Pills
|
|
240
|
-
|
|
188
|
+
- [ ] Batch consumer with no upper bound on batch size — one batch can take arbitrarily long
|
|
241
189
|
- [ ] No dead-letter queue for failed messages — poison pills block the consumer indefinitely
|
|
242
|
-
- [ ] Retry loop with no maximum retry count — failed message retried forever
|
|
243
|
-
- [ ] Consumer crashing on a single malformed message
|
|
244
|
-
|
|
245
|
-
#### E3. Ordering Guarantees
|
|
246
|
-
|
|
247
|
-
- [ ] Code assumes FIFO delivery on a queue that does not guarantee ordering (e.g., SQS standard)
|
|
248
|
-
- [ ] Parallel consumers writing to shared state where order matters
|
|
249
|
-
|
|
250
|
-
---
|
|
190
|
+
- [ ] Retry loop with no maximum retry count — a failed message retried forever
|
|
191
|
+
- [ ] Consumer crashing on a single malformed message (no error handling around deserialization)
|
|
192
|
+
- [ ] Code assumes FIFO delivery on a queue that does not guarantee ordering (e.g., SQS standard), or parallel consumers write shared state where order matters
|
|
251
193
|
|
|
252
194
|
### Part F: Retry, Timeout, and Circuit Breaker
|
|
253
195
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
- [ ] Non-idempotent operation retried without idempotency key (charge, send email, create record)
|
|
257
|
-
- [ ] Retry with fixed delay instead of exponential backoff — causes retry storms
|
|
258
|
-
- [ ] No maximum retry count — code retries indefinitely
|
|
259
|
-
- [ ] Missing jitter on exponential backoff — synchronized retries cause thundering herd
|
|
260
|
-
|
|
261
|
-
#### F2. Timeouts
|
|
262
|
-
|
|
263
|
-
- [ ] HTTP client / DB call / queue operation with no timeout configured
|
|
264
|
-
- [ ] Single timeout for the full chain (outer timeout too long relative to the number of downstream calls)
|
|
265
|
-
- [ ] `setTimeout` as a timeout substitute for async operations that do not stop when the timer fires
|
|
266
|
-
|
|
267
|
-
#### F3. Circuit Breaker
|
|
268
|
-
|
|
196
|
+
- [ ] Retry with fixed delay instead of exponential backoff — retry storms; no maximum retry count; missing jitter so retries synchronise
|
|
197
|
+
- [ ] Single timeout for the full chain (the outer timeout too long relative to the number of downstream calls)
|
|
269
198
|
- [ ] Repeated calls to a known-failing downstream without a circuit breaker — floods the downstream and starves the thread pool
|
|
270
|
-
- [ ] No
|
|
271
|
-
|
|
272
|
-
---
|
|
199
|
+
- [ ] No graceful degradation when the downstream is unavailable (a fallback that hides the failure is `error-handling.mdc`)
|
|
273
200
|
|
|
274
201
|
### Part G: Idempotency and Distributed Invariants
|
|
275
202
|
|
|
276
|
-
#### G1. Idempotency
|
|
277
|
-
|
|
278
203
|
- [ ] Webhook / event handler has no deduplication — processing the same event twice produces duplicate side effects
|
|
279
|
-
- [ ]
|
|
280
|
-
- [ ] Distributed cron/scheduled job running on multiple instances
|
|
281
|
-
|
|
282
|
-
#### G2. Distributed Consistency
|
|
283
|
-
|
|
204
|
+
- [ ] Non-idempotent operation retried without idempotency key (charge, send email, create record)
|
|
205
|
+
- [ ] Distributed cron/scheduled job running on multiple instances with no distributed lock
|
|
284
206
|
- [ ] Assumption that two sequential operations form an atomic unit without a transaction or saga
|
|
285
207
|
- [ ] Cross-service write sequence with no compensation logic on partial failure
|
|
286
208
|
- [ ] Relying on eventual consistency while assuming immediate consistency (reading from cache/replica right after writing)
|
|
287
|
-
|
|
288
|
-
#### G3. Clock and ID Assumptions
|
|
289
|
-
|
|
290
|
-
- [ ] Using `Date.now()` or `new Date()` for ordering events across distributed nodes — clocks drift
|
|
209
|
+
- [ ] `Date.now()` or `new Date()` used for ordering events across distributed nodes — clocks drift
|
|
291
210
|
- [ ] Auto-increment integer IDs expected to be globally unique across sharded databases
|
|
292
|
-
- [ ] UUID v1 (time-based, exposable MAC address) used where UUID v4 (random) is safer
|
|
293
211
|
|
|
294
212
|
---
|
|
295
213
|
|
|
@@ -297,18 +215,11 @@ finding here cites that trigger; it needs no request handler and no load profile
|
|
|
297
215
|
|
|
298
216
|
| Concern | This skill | Use instead |
|
|
299
217
|
|---------|-----------|-------------|
|
|
300
|
-
|
|
|
301
|
-
|
|
|
302
|
-
|
|
|
303
|
-
|
|
|
304
|
-
| Lock contention, long transactions, missing indexes | YES | — |
|
|
305
|
-
| Queue backpressure, dead letters, ordering | YES | — |
|
|
306
|
-
| Retry storms, timeouts, circuit breakers | YES | — |
|
|
307
|
-
| Idempotency, distributed locks, distributed consistency | YES | — |
|
|
308
|
-
| Frontend re-render performance, bundle size | NO | `review-performance` |
|
|
309
|
-
| General N+1 queries (not load-specific) | NO | `review-performance` |
|
|
218
|
+
| Races, shared mutable state, concurrent writes, lock files, child fan-out | YES | — |
|
|
219
|
+
| Connection pools, resource leaks, cache invalidation and stampede | YES | — |
|
|
220
|
+
| Lock contention, long transactions, queues, retries, idempotency | YES | — |
|
|
221
|
+
| N+1, query in a loop, missing indexes, pagination, frontend re-render, bundle size, React memory leaks | NO | `review-performance` |
|
|
310
222
|
| NestJS module structure, layer violations | NO | `review-architecture` |
|
|
311
|
-
| Memory leaks in React components | NO | `review-performance` |
|
|
312
223
|
| Logic bugs unrelated to concurrency | NO | `review-logic` |
|
|
313
224
|
|
|
314
225
|
---
|
|
@@ -327,11 +238,7 @@ Every `blocker` and `major` finding must carry `class_scope`: **every** site tha
|
|
|
327
238
|
holds the shape you found, and **how you enumerated them** — the grep or query
|
|
328
239
|
you ran, or the guard that derives the set.
|
|
329
240
|
|
|
330
|
-
A finding anchored to one `file:line` is a claim about one site
|
|
331
|
-
history of this repository is that a fix then repairs that site and leaves its
|
|
332
|
-
siblings: one writer of five, one operator instruction of four, six readers of
|
|
333
|
-
eight. Each was found by the *next* review round, which is why reviews here have
|
|
334
|
-
run to seven and four rounds instead of one.
|
|
241
|
+
A finding anchored to one `file:line` is a claim about one site, and a fix then repairs that site and leaves its siblings; the next review round finds them.
|
|
335
242
|
|
|
336
243
|
```yaml
|
|
337
244
|
class_scope:
|
|
@@ -340,11 +247,7 @@ class_scope:
|
|
|
340
247
|
```
|
|
341
248
|
|
|
342
249
|
"I checked the others" is not an enumeration method. A single-entry `sites` list
|
|
343
|
-
|
|
344
|
-
`review-finding.schema.json` accepts it and the next round tests it.
|
|
345
|
-
|
|
346
|
-
`minor` and `info` may omit it: enumerating the class for every low-severity
|
|
347
|
-
observation is theatre, not rigour.
|
|
250
|
+
claims the class has one member. `minor` and `info` may omit `class_scope`.
|
|
348
251
|
|
|
349
252
|
```markdown
|
|
350
253
|
### [F-NNN] Title
|
|
@@ -358,22 +261,20 @@ observation is theatre, not rigour.
|
|
|
358
261
|
```
|
|
359
262
|
|
|
360
263
|
Severity comes from **Severity (canonical)** in `review-orchestrator/SKILL.md`.
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
264
|
+
Conditions in **Rules This Lens Reads** are rated by those rules' tables. This
|
|
265
|
+
reviewer keeps no table of its own; what follows is where its remaining
|
|
266
|
+
conditions land under that rubric, not a second rubric. Each row names the
|
|
267
|
+
condition and the evidence the canonical level needs; without that evidence the
|
|
268
|
+
finding drops to the row's fallback level, and without a concrete trigger it is `info`.
|
|
366
269
|
|
|
367
270
|
| Condition | Severity | Why, under the canonical rubric |
|
|
368
271
|
|---|---|---|
|
|
369
272
|
| Race condition on shared mutable state, including a lost update to a shared state file | `blocker` **if** the interleaving can corrupt or lose data; otherwise `major` | Same wording as `review-logic`, deliberately: the outcome decides, not the word "race" |
|
|
370
273
|
| Check-then-act with no unique constraint or lock; non-idempotent retry; event handler with no deduplication; scheduled job or session work with no lock | `blocker` when the evidence shows the duplicate or lost write persisted (shape 2); otherwise `major` | The concurrent or retried path must exist in the code, not be assumed |
|
|
371
274
|
| Per-user data cached under a key not scoped to the user | `blocker` when the evidence shows a second user served the first user's entry (shape 2; shape 3 too when an attacker can steer it); `major` when a second user's request path to the key is named (trigger) but serving the wrong entry is not shown; `info` when no second reader's path is named | Blocker needs both readers shown; major needs the second reader's path named |
|
|
372
|
-
|
|
|
373
|
-
|
|
|
374
|
-
|
|
|
375
|
-
| External I/O inside a transaction or under a lock; connection without a pool; unbounded `Promise.all`; retry without cap or backoff; missing timeout; stale lock with no recovery; stampede on a hot key; N+1 on a hot path; long transaction; missing DLQ; blocking I/O on a thread or the event loop other work shares | `major` when the finding names the trigger and the stall, exhaustion or hang it causes; `blocker` only if it shows the crash | Degradation is not one of the four shapes |
|
|
376
|
-
| Backoff without jitter; TTL misconfigured; per-request allocation on a hot path; full-row fetch for one field; undocumented fallback | `minor` | Correct under load; the cost is to whoever tunes it next |
|
|
275
|
+
| Unbounded queue or in-process buffer | `blocker` only when the evidence shows the growth reaching exhaustion (shape 1); otherwise `major` with what grows it named | Law 3: the input that grows it is the trigger |
|
|
276
|
+
| External I/O inside a transaction or under a lock; connection without a pool; retry without cap or backoff; stampede on a hot key; long transaction; missing DLQ | `major` when the finding names the trigger and the stall, exhaustion or hang it causes; `blocker` only if it shows the crash | Degradation is not one of the four shapes |
|
|
277
|
+
| Backoff without jitter; TTL misconfigured; per-request allocation on a hot path | `minor` | Correct under load; the cost is to whoever tunes it next |
|
|
377
278
|
| Architectural note with no failure mode under a concrete trigger | `info` | Shared law 1 |
|
|
378
279
|
|
|
379
280
|
---
|
|
@@ -386,49 +287,10 @@ STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
|
|
|
386
287
|
|
|
387
288
|
```markdown
|
|
388
289
|
## High-Load Review
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
-
|
|
392
|
-
|
|
393
|
-
- Merge-base: `<BASE_SHA>`
|
|
394
|
-
- Scope mode: `<default-with-uncommitted | explicit-hash-range>`
|
|
395
|
-
- Load profile: `<from context doc, or "not provided" + the concrete triggers used>`
|
|
396
|
-
- Changed files reviewed: <N>
|
|
397
|
-
|
|
398
|
-
### Summary
|
|
399
|
-
<2-3 sentences: what changed, key high-load concerns, overall verdict at scale.>
|
|
400
|
-
|
|
401
|
-
### Stats
|
|
402
|
-
- blocker: N | major: N | minor: N | info: N
|
|
403
|
-
|
|
404
|
-
### Findings
|
|
405
|
-
|
|
406
|
-
#### CLI / Multi-Session Concurrency
|
|
407
|
-
<[F-NNN] findings or "None detected.">
|
|
408
|
-
|
|
409
|
-
#### Concurrency & Race Conditions
|
|
410
|
-
<[F-NNN] findings or "None detected.">
|
|
411
|
-
|
|
412
|
-
#### Resource Management
|
|
413
|
-
<[F-NNN] findings or "None detected.">
|
|
414
|
-
|
|
415
|
-
#### Caching
|
|
416
|
-
<[F-NNN] findings or "None detected.">
|
|
417
|
-
|
|
418
|
-
#### Database Under Load
|
|
419
|
-
<[F-NNN] findings or "None detected.">
|
|
420
|
-
|
|
421
|
-
#### Async / Queues
|
|
422
|
-
<[F-NNN] findings or "None detected.">
|
|
423
|
-
|
|
424
|
-
#### Retry / Timeout / Circuit Breaker
|
|
425
|
-
<[F-NNN] findings or "None detected.">
|
|
426
|
-
|
|
427
|
-
#### Idempotency & Distributed Invariants
|
|
428
|
-
<[F-NNN] findings or "None detected.">
|
|
429
|
-
|
|
430
|
-
### Clean Areas
|
|
431
|
-
[List checklist sections with no findings, confirming they were reviewed]
|
|
290
|
+
Scope: branch, merge-base, scope mode, load profile (from the context doc, or "not provided" + the concrete triggers used), files reviewed.
|
|
291
|
+
Summary: 2-3 sentences. Stats: blocker | major | minor | info counts.
|
|
292
|
+
Findings: [F-NNN] grouped under CLI / Multi-Session, Concurrency & Races, Resources, Caching, Lock Contention, Async / Queues, Retry / Timeout / Circuit Breaker, Idempotency & Distributed Invariants; "None detected." for an empty group.
|
|
293
|
+
Clean Areas: checklist sections with no findings, confirming they were reviewed.
|
|
432
294
|
```
|
|
433
295
|
|
|
434
296
|
---
|
|
@@ -442,13 +304,10 @@ JOB_NAME: <job-name>
|
|
|
442
304
|
CONTEXT_PATH: <JOBS_ROOT>/<job-name>/ai/context.md
|
|
443
305
|
```
|
|
444
306
|
|
|
445
|
-
If provided and the file exists, read
|
|
446
|
-
-
|
|
447
|
-
- Know the infrastructure constraints (pool sizes, queue limits, replica topology)
|
|
448
|
-
- Identify intentional trade-offs already accepted (eventual consistency, at-least-once delivery)
|
|
449
|
-
- Avoid flagging documented acceptable degradation paths as violations
|
|
307
|
+
If provided and the file exists, read it before reviewing. Use it to:
|
|
308
|
+
- Learn the traffic profile, the infrastructure constraints (pool sizes, queue limits, replica topology) and the trade-offs already accepted (eventual consistency, at-least-once delivery); a documented acceptable degradation is not a violation
|
|
450
309
|
|
|
451
|
-
If absent, proceed normally
|
|
310
|
+
If absent, proceed normally.
|
|
452
311
|
|
|
453
312
|
**No stated load.** Without a `load_profile` or a context document, do not assume
|
|
454
313
|
a traffic level. Name the concrete trigger the code shows instead: N concurrent
|
|
@@ -464,9 +323,6 @@ when no concrete trigger can be named.
|
|
|
464
323
|
| Rationalization | Why it is wrong |
|
|
465
324
|
|----------------|-----------------|
|
|
466
325
|
| "We don't have high traffic yet, so this is fine" | Correctness under concurrency does not depend on current traffic; a race condition exists at 1 RPS too |
|
|
467
|
-
| "The connection pool defaults are probably fine" | Default pools (5–10 connections) queue under concurrent use; verify against the trigger the code shows (**No stated load**) |
|
|
468
326
|
| "Retrying this is safe because it's idempotent" | Verify it actually is — most `POST` endpoints are not idempotent by default |
|
|
469
|
-
| "We'll add a circuit breaker later" | "Later" is when the downstream is down; flag it now, at the level the conditions table gives |
|
|
470
327
|
| "The cache invalidation is handled somewhere else" | "Somewhere else" means it will be missed — flag where the write happens with no corresponding invalidation |
|
|
471
|
-
| "This runs in a queue so race conditions don't apply" | Multiple consumer instances still race on shared DB rows unless explicitly serialized |
|
|
472
328
|
| "Using Date.now() for ordering is fine" | Clock skew across nodes makes wall-clock ordering unreliable; use logical clocks or DB sequences |
|
|
@@ -17,7 +17,7 @@ triggers:
|
|
|
17
17
|
- "does this render correctly"
|
|
18
18
|
metadata:
|
|
19
19
|
author: "MrCipherSmith"
|
|
20
|
-
version: "1.
|
|
20
|
+
version: "1.1.0"
|
|
21
21
|
category: "review"
|
|
22
22
|
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
23
23
|
license: "MIT"
|
|
@@ -37,6 +37,13 @@ and a score that sits 12px off centre both shipped through a full review round.
|
|
|
37
37
|
Every finding here is a claim about pixels, so every finding here is measured or
|
|
38
38
|
it is not filed.
|
|
39
39
|
|
|
40
|
+
## Rules This Lens Reads
|
|
41
|
+
|
|
42
|
+
Read `.metaproject/rules/core/layout-rendering.mdc` first: measurement in a real engine, the
|
|
43
|
+
320px floor and supported widths, locale geometry, RTL mirroring. Its **Review severities** table
|
|
44
|
+
rates every condition this lens files; this lens states none of them again and keeps only its
|
|
45
|
+
method and calibration. `review-ui-ux` defers overflow and reflow at a width to this lens.
|
|
46
|
+
|
|
40
47
|
---
|
|
41
48
|
|
|
42
49
|
## Scope
|
|
@@ -50,6 +57,7 @@ Dispatched when scope A touches, on a **rendered** element:
|
|
|
50
57
|
- `overflow-*`, `position`, `z-*`, `aspect-*`
|
|
51
58
|
- inline `style` carrying a computed dimension
|
|
52
59
|
- any container whose children render translated text
|
|
60
|
+
- reflow: clipping or sideways scroll at a supported width, 320px included
|
|
53
61
|
|
|
54
62
|
Out of scope: whether a class exists or comes from the theme, and whether it is
|
|
55
63
|
well named.
|
|
@@ -58,18 +66,11 @@ well named.
|
|
|
58
66
|
|
|
59
67
|
## The one method that makes this lane real
|
|
60
68
|
|
|
61
|
-
**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
Verify one of two ways, and put the numbers in the finding:
|
|
68
|
-
|
|
69
|
-
1. The project's real-CSS tier — the Storybook / Playwright / component-visual
|
|
70
|
-
suite. Find its script in `package.json` rather than assuming a name.
|
|
71
|
-
2. A direct probe that mounts the component in a real engine and reads computed
|
|
72
|
-
CSS off the node.
|
|
69
|
+
**Measure in a real engine (Rule 1).** Under happy-dom or jsdom `toHaveClass("w-fit")`
|
|
70
|
+
observes a string and `getBoundingClientRect` returns zeros; a claim reasoned from class
|
|
71
|
+
names turns this lane into a class-name spellchecker. Find the real-CSS tier's script in
|
|
72
|
+
`package.json` rather than assuming a name, or mount a probe that reads computed CSS off
|
|
73
|
+
the node, and put the numbers in the finding.
|
|
73
74
|
|
|
74
75
|
Report a table of measurements, not an adjective. `117.6px` is a finding; "the bar
|
|
75
76
|
may be too short" is not.
|
|
@@ -144,9 +145,10 @@ name instead.
|
|
|
144
145
|
2. **Measure the worst real case, not the convenient one.** The longest translation
|
|
145
146
|
in the catalog, the narrowest supported host, the state where the sibling is
|
|
146
147
|
absent, the locale that flips direction.
|
|
147
|
-
3. **Never flag a theoretical narrow viewport.**
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
3. **Never flag a theoretical narrow viewport.** 320px is always supported; other
|
|
149
|
+
widths come from `DESIGN.md`, the brief, the job context or the hosts the product
|
|
150
|
+
ships in. If no supported host reaches the collapse width, the finding is `info`
|
|
151
|
+
and says what would settle it. A breakpoint nobody ships is not a trigger.
|
|
150
152
|
|
|
151
153
|
### Shared laws (every reviewer)
|
|
152
154
|
|
|
@@ -156,16 +158,8 @@ name instead.
|
|
|
156
158
|
4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
|
|
157
159
|
|
|
158
160
|
Severity levels are defined once, in `review-orchestrator/SKILL.md` →
|
|
159
|
-
**Severity (canonical)**. This reviewer keeps no rubric of its own
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
| Condition | Severity | Why, under the canonical rubric |
|
|
163
|
-
|---|---|---|
|
|
164
|
-
| An element renders at 0px while its label shows, at a supported host width | `major` | Named trigger (that width), named outcome (the control is invisible) |
|
|
165
|
-
| Identical data renders different geometry per locale | `major` | Named trigger (the locale), named outcome (a different picture of the same number) |
|
|
166
|
-
| Content clipped, or the page forced to scroll horizontally, at a supported width | `major` | Named trigger and outcome |
|
|
167
|
-
| A cosmetic offset a user would not notice — a few px off centre | `minor` | The code behaves correctly; the cost is aesthetic |
|
|
168
|
-
| A measured-but-unreachable collapse, or any claim you could not measure | `info` | Shared law 1 |
|
|
161
|
+
**Severity (canonical)**. This reviewer keeps no rubric of its own: its conditions are
|
|
162
|
+
rated by the **Review severities** table in `layout-rendering.mdc`.
|
|
169
163
|
|
|
170
164
|
---
|
|
171
165
|
|
|
@@ -230,8 +224,8 @@ Report done only once all of these hold:
|
|
|
230
224
|
- Every `blocker` and `major` carries `class_scope` with `sites` and an
|
|
231
225
|
`enumeration_method` naming the search that derived the set of elements sharing
|
|
232
226
|
the sizing shape.
|
|
233
|
-
- No finding invents a severity: each
|
|
234
|
-
`review-orchestrator/SKILL.md`.
|
|
227
|
+
- No finding invents a severity: each comes from the `layout-rendering.mdc` table, under
|
|
228
|
+
**Severity (canonical)** in `review-orchestrator/SKILL.md`.
|
|
235
229
|
- The reply is the `REVIEW_RESULT` the Orchestrated Review Contract asks for, with
|
|
236
230
|
finding ids prefixed `LY-`, or `NEEDS_CONTEXT` naming the measurement that was missing.
|
|
237
231
|
Measurements supplied as `context_files` count as evidence when they name the command and the viewport.
|