@clipboard-health/ai-rules 2.43.1 → 2.43.3

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": "@clipboard-health/ai-rules",
3
- "version": "2.43.1",
3
+ "version": "2.43.3",
4
4
  "description": "Pre-built AI agent rules for consistent coding standards.",
5
5
  "keywords": [
6
6
  "ai",
@@ -19,9 +19,9 @@ Resolve bundled "./scripts" paths relative to SKILL.md.
19
19
 
20
20
  The skill uses two sentinels with visible footer lines.
21
21
 
22
- **Addressed sentinel**: `<sub>🤖 <code>cb-babysit:addressed v1 core@3.22.1</code></sub>`. Appended on its own line at the end of every reply the skill posts so re-runs know which threads and review-body comments are already handled. Dedupe also recognizes the legacy `babysit-pr:addressed v1` prefix from before this skill was renamed.
22
+ **Addressed sentinel**: `<sub>🤖 <code>cb-babysit:addressed v1 core@3.22.3</code></sub>`. Appended on its own line at the end of every reply the skill posts so re-runs know which threads and review-body comments are already handled. Dedupe also recognizes the legacy `babysit-pr:addressed v1` prefix from before this skill was renamed.
23
23
 
24
- **Follow-up sentinel**: `<sub>🤖 <code>cb-babysit:followup v1 core@3.22.1</code></sub>`. Attached to replies that defer an out-of-scope comment as a tracked follow-up. The sentinel is additive: the post-reply scripts still append the `addressed` sentinel at the end.
24
+ **Follow-up sentinel**: `<sub>🤖 <code>cb-babysit:followup v1 core@3.22.3</code></sub>`. Attached to replies that defer an out-of-scope comment as a tracked follow-up. The sentinel is additive: the post-reply scripts still append the `addressed` sentinel at the end.
25
25
 
26
26
  **Sentinel recency rules.** The script emits a per-thread `activityState` with three values. Step 6a owns the handling rules for each state.
27
27
 
@@ -247,7 +247,7 @@ Body templates (the script appends the `addressed` sentinel if missing):
247
247
  - **Agree**: `Addressed in <commit-url>. <one-line what-changed>.`
248
248
  - **Disagree**: `Leaving current behavior. <reasoning>.`
249
249
  - **Already fixed**: `Already handled by <commit-url-or-file:line>. <brief pointer>.`
250
- - **Defer**: `Out of scope for this PR; this looks like follow-up work rather than something introduced or required by this change. <one-line rationale or pointer if useful>.\n\n<sub>🤖 <code>cb-babysit:followup v1 core@3.22.1</code></sub>`
250
+ - **Defer**: `Out of scope for this PR; this looks like follow-up work rather than something introduced or required by this change. <one-line rationale or pointer if useful>.\n\n<sub>🤖 <code>cb-babysit:followup v1 core@3.22.3</code></sub>`
251
251
 
252
252
  For Defer replies, include the follow-up sentinel on its own line as shown. The script will append the `addressed` sentinel after it on its own line, so the final body ends with the follow-up sentinel followed by a blank line followed by the `addressed` sentinel. `grep cb-babysit:followup` finds the deferral and `grep cb-babysit:addressed` still marks the thread handled for dedupe.
253
253
 
@@ -263,7 +263,7 @@ The PR-level summary should:
263
263
 
264
264
  - Group by source. Use `## Review-body findings` for step-7 work and `## Conversation-tab comments` for step-6b work. Omit a section if its list is empty.
265
265
  - Inside each section, group verdicts under **Agree / Disagree / Already fixed / Deferred (out of scope)** subheadings. Omit a subheading if its list is empty.
266
- - Under **Deferred (out of scope)**, list each deferred item as a bullet, followed on its own line by `<sub>🤖 <code>cb-babysit:followup v1 core@3.22.1</code></sub>` so grep catches them individually.
266
+ - Under **Deferred (out of scope)**, list each deferred item as a bullet, followed on its own line by `<sub>🤖 <code>cb-babysit:followup v1 core@3.22.3</code></sub>` so grep catches them individually.
267
267
  - Include the commit URL for fixes.
268
268
  - End with a fenced fingerprint block listing every current fingerprint (addressed and deferred) one per line. Include both `reviewBodyComments[].fingerprint` (whole-body, one per automated review) and `activeIssueComments[].fingerprint` (per Conversation-tab comment). Future runs dedupe by matching these against `priorBabysitSentinels`.
269
269
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  SENTINEL_PREFIX='cb-babysit:addressed v1 '
12
12
  LEGACY_SENTINEL_PREFIX='babysit-pr:addressed v1 '
13
- SENTINEL='<sub>🤖 <code>cb-babysit:addressed v1 core@3.22.1</code></sub>'
13
+ SENTINEL='<sub>🤖 <code>cb-babysit:addressed v1 core@3.22.3</code></sub>'
14
14
 
15
15
  # Bot author allowlist (JSON array literal). Used by unresolvedPrComments.sh
16
16
  # as a fallback when GraphQL's `author.__typename == "Bot"` misses a GitHub
@@ -40,10 +40,11 @@ Resolve bundled "./references" paths relative to SKILL.md.
40
40
  - Session: [Resume command from 6a] (omit if none)
41
41
  - Existing changes: [Uncommitted changes that remain outside the shipped scope] (omit if none)
42
42
 
43
- 🚀 [Complete url] (e.g., `https://github.com/clipboardhealth/core-utils/pull/123`) 🚀
43
+ 🚀 [Complete url] 🚀
44
44
  ```
45
45
 
46
- Keep the PR as the final line and visually separate it from everything else
47
- with a blank line. Use the middle section only for meaningful behavior or
48
- outcome details. Put lower-priority handoff metadata and caveats under
49
- `Details`.
46
+ Keep the PR as the final line using a complete URL, for example,
47
+ `https://github.com/clipboardhealth/core-utils/pull/123`. Visually separate
48
+ it from everything else with a blank line. Use the middle section only for
49
+ meaningful behavior or outcome details. Put lower-priority handoff metadata
50
+ and caveats under `Details`.
@@ -17,5 +17,5 @@ Concisely explain the user intent from session history and the meaningful behavi
17
17
 
18
18
  Optional, don't fabricate: ticket links, rollout plan, residual risk, or specific areas for reviewers to focus.
19
19
 
20
- <sub>🤖 <code>cb-ship:created v1 core@3.22.1</code></sub>
20
+ <sub>🤖 <code>cb-ship:created v1 core@3.22.3</code></sub>
21
21
  ```
@@ -18,6 +18,7 @@ When adding an entry, keep the same sections used by the seeded entries:
18
18
  | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
19
19
  | `element was detached from the DOM`, `element is not stable`, open dialog or sheet disappears during a mutation/refetch | Overlay is rendered below a query-driven mapped row that is reconciled or removed | [Query-driven list dialog teardown](./query-driven-list-dialog-teardown.md) |
20
20
  | Dialog title or sheet content never becomes stably visible after it opened | The owning list item remounted while the overlay was open | [Query-driven list dialog teardown](./query-driven-list-dialog-teardown.md) |
21
+ | Open menu or form detaches as a delayed provider token arrives; route lifecycle shows a parent remount | A token-dependent provider topology replaced the authenticated application subtree | [Query-driven list dialog teardown](./query-driven-list-dialog-teardown.md) |
21
22
  | Fingerprints `33deef731a10`, `2d93cd67b48a` | Home Health instance of query-driven overlay ownership | [Query-driven list dialog teardown](./query-driven-list-dialog-teardown.md) |
22
23
  | `Cognito user '<email>' does not exist`, `UserNotFoundException` immediately after a successful user-create response | Consumer is rediscovering an opaque Cognito username through an eventually consistent email alias | [Cognito email-alias eventual consistency](./cognito-email-alias-eventual-consistency.md) |
23
24
  | Email-based Cognito Admin mutation fails while the same user exists under `from_admin_<uuid>` | Strong username identity was discarded at the producer boundary | [Cognito email-alias eventual consistency](./cognito-email-alias-eventual-consistency.md) |
@@ -1,6 +1,6 @@
1
1
  # Query-Driven List Dialog Teardown
2
2
 
3
- Last reviewed: 2026-07-16.
3
+ Last reviewed: 2026-07-17.
4
4
 
5
5
  ## Symptom signatures
6
6
 
@@ -8,6 +8,8 @@ Last reviewed: 2026-07-16.
8
8
  - A dialog or sheet opens, then its title/content disappears or never becomes stably visible.
9
9
  - The failure moves between actions on different rows of the same query-backed list.
10
10
  - A mutation succeeds, but the confirmation interaction or post-success assertion loses the overlay.
11
+ - An already-open menu or other interaction surface detaches when a delayed
12
+ provider token changes the authenticated application's React topology.
11
13
  - Known families: `33deef731a10` and `2d93cd67b48a`.
12
14
 
13
15
  ## Mechanism
@@ -16,9 +18,15 @@ The overlay is owned by a component rendered beneath a mapped query result, such
16
18
 
17
19
  The decisive test is structural: if deleting or replacing the launching row also destroys the open overlay, the product has this mechanism even when the visible failure is a locator timeout.
18
20
 
21
+ The same structural mechanism can occur above the list. A token-dependent
22
+ provider wrapper that returns raw application children before bootstrap and
23
+ wraps those children after bootstrap replaces the authenticated route subtree.
24
+ That higher ancestor remount destroys menus, drawers, and form state even after
25
+ list-owned dialogs have been hoisted into a stable host.
26
+
19
27
  ## Affected repositories and surfaces
20
28
 
21
- - `cbh-admin-frontend`: Home Health case and visit action dialogs; other query-driven list dialogs found by the repository sweep.
29
+ - `cbh-admin-frontend`: Home Health case and visit action dialogs; other query-driven list dialogs found by the repository sweep; authenticated route state beneath the Knock bootstrap boundary.
22
30
  - `cbh-mobile-app`: placement sign-on-bonus and badge-history sheets; workplace-review comment and reply action sheets.
23
31
  - Any React surface that renders modal state and overlay JSX inside a query-backed `.map()` descendant.
24
32
 
@@ -31,16 +39,19 @@ The decisive test is structural: if deleting or replacing the launching row also
31
39
 
32
40
  The durable Home Health fix is [cbh-admin-frontend#7574](https://github.com/ClipboardHealth/cbh-admin-frontend/pull/7574). Repository-wide follow-ups landed in [cbh-admin-frontend#7569](https://github.com/ClipboardHealth/cbh-admin-frontend/pull/7569), [cbh-mobile-app#12857](https://github.com/ClipboardHealth/cbh-mobile-app/pull/12857), and [cbh-mobile-app#12860](https://github.com/ClipboardHealth/cbh-mobile-app/pull/12860).
33
41
 
42
+ [cbh-admin-frontend#7608](https://github.com/ClipboardHealth/cbh-admin-frontend/pull/7608) fixed the provider-topology variant. It keeps the authenticated application children at a stable React position and conditionally mounts only the Knock guide consumers beneath the token-dependent providers. Component coverage proved that delayed and immediate tokens preserve the application mount and local state; a rate-negotiation E2E fault injection holds the Knock-token response across an open interaction and requires exactly one end-negotiation request.
43
+
34
44
  ## What failed and why
35
45
 
36
46
  - Repeated `toPass` blocks, response waits, locator retries, failure trackers, and expanded timeouts hardened whichever Home Health step failed most recently but left overlay ownership unchanged. The family recurred across [STAFF-1329](https://linear.app/clipboardhealth/issue/STAFF-1329), [STAFF-1369](https://linear.app/clipboardhealth/issue/STAFF-1369), [STAFF-1495](https://linear.app/clipboardhealth/issue/STAFF-1495), [STAFF-1554](https://linear.app/clipboardhealth/issue/STAFF-1554), [STAFF-1582](https://linear.app/clipboardhealth/issue/STAFF-1582), [STAFF-1673](https://linear.app/clipboardhealth/issue/STAFF-1673), and [STAFF-1685](https://linear.app/clipboardhealth/issue/STAFF-1685).
37
47
  - Preserving modal state across a remount did not preserve the DOM node Playwright or a user was interacting with. The Team Members recurrence from [STAFF-1422](https://linear.app/clipboardhealth/issue/STAFF-1422) to [STAFF-1459](https://linear.app/clipboardhealth/issue/STAFF-1459) is the precedent.
38
48
  - Pausing backing-list observers and deferring invalidations in [cbh-admin-frontend#7559](https://github.com/ClipboardHealth/cbh-admin-frontend/pull/7559) reduced the race window but was explicitly an interim mitigation: another ancestor update could still remove the row. The hoisted host later deleted that workaround.
49
+ - Hoisting Home Health dialogs in [cbh-admin-frontend#7574](https://github.com/ClipboardHealth/cbh-admin-frontend/pull/7574) correctly removed their query-row ownership, but it could not preserve the earlier action menu or the route when the delayed Knock token replaced a higher provider boundary. [STAFF-1856](https://linear.app/clipboardhealth/issue/STAFF-1856) established that failed scope with route lifecycle telemetry and immediate post-remount Knock requests.
39
50
  - Splitting the E2E test alone would reduce blast radius and improve fingerprints, but it would not fix the user-facing overlay teardown.
40
51
 
41
52
  ## Current status
42
53
 
43
- Fixed for the known admin and mobile surfaces covered by [STAFF-1789](https://linear.app/clipboardhealth/issue/STAFF-1789), [STAFF-1790](https://linear.app/clipboardhealth/issue/STAFF-1790), [STAFF-1796](https://linear.app/clipboardhealth/issue/STAFF-1796), [STAFF-1797](https://linear.app/clipboardhealth/issue/STAFF-1797), and [STAFF-1806](https://linear.app/clipboardhealth/issue/STAFF-1806). Treat future instances as the same mechanism when overlay ownership is still below a replaceable query row; extend the stable-host pattern and guard rather than adding per-test waits.
54
+ Fixed for the known query-row surfaces covered by [STAFF-1789](https://linear.app/clipboardhealth/issue/STAFF-1789), [STAFF-1790](https://linear.app/clipboardhealth/issue/STAFF-1790), [STAFF-1796](https://linear.app/clipboardhealth/issue/STAFF-1796), [STAFF-1797](https://linear.app/clipboardhealth/issue/STAFF-1797), and [STAFF-1806](https://linear.app/clipboardhealth/issue/STAFF-1806). The admin Knock provider-topology variant is fixed by [cbh-admin-frontend#7608](https://github.com/ClipboardHealth/cbh-admin-frontend/pull/7608); the corresponding mobile topology remains tracked by [STAFF-1872](https://linear.app/clipboardhealth/issue/STAFF-1872). Treat future instances as the same mechanism when interaction ownership remains below any replaceable ancestor; make the ancestor composition stable or move interaction ownership above that boundary rather than adding per-test waits.
44
55
 
45
56
  ## Evidence
46
57
 
@@ -50,3 +61,6 @@ Fixed for the known admin and mobile surfaces covered by [STAFF-1789](https://li
50
61
  - [cbh-admin-frontend#7574](https://github.com/ClipboardHealth/cbh-admin-frontend/pull/7574): hoisted host and deletion of the temporary guard.
51
62
  - [cbh-mobile-app#12857](https://github.com/ClipboardHealth/cbh-mobile-app/pull/12857): mobile sheet hoists and architecture guard.
52
63
  - [cbh-mobile-app#12860](https://github.com/ClipboardHealth/cbh-mobile-app/pull/12860): indirect workplace-review descendants hoisted after the syntactic guard could not detect them.
64
+ - [STAFF-1846](https://linear.app/clipboardhealth/issue/STAFF-1846): source deep dive and prior-attempt dossier for the provider-topology fix.
65
+ - [STAFF-1856](https://linear.app/clipboardhealth/issue/STAFF-1856): provider-topology recurrence, route lifecycle telemetry, and the failed scope of the dialog-only hoist.
66
+ - [cbh-admin-frontend#7608](https://github.com/ClipboardHealth/cbh-admin-frontend/pull/7608): stable application composition plus delayed-token and fault-injection regression coverage.