@clipboard-health/ai-rules 2.40.0 โ 2.41.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.
- package/package.json +1 -1
- package/rules/common/coreLibraries.md +1 -0
- package/skills/cb-babysit/SKILL.md +4 -4
- package/skills/cb-babysit/scripts/_sentinel.sh +1 -1
- package/skills/cb-ship/references/pr-template.md +1 -1
- package/skills/flaky-critic/SKILL.md +2 -1
- package/skills/flaky-critic/references/rubric.md +2 -0
- package/skills/flaky-debug/SKILL.md +17 -4
- package/skills/flaky-debug/references/fix.md +40 -0
- package/skills/flaky-debug/references/plan.md +1 -0
- package/skills/flaky-debug/references/root-cause-kb/README.md +4 -0
- package/skills/flaky-debug/references/root-cause-kb/dry-run-workplace-review-sheet.md +81 -0
package/package.json
CHANGED
|
@@ -34,6 +34,7 @@ When a bug traces into a `@clipboard-health/*` library, read the source code in
|
|
|
34
34
|
- **nx-plugin**: An Nx plugin with generators to manage libraries and applications.
|
|
35
35
|
- **oxlint-config**: Shared Oxlint configuration for Clipboard Health repositories.
|
|
36
36
|
- **phone-number**: Phone number utility functions.
|
|
37
|
+
- **playwright-flake-linter**: Shared configurable checks for Playwright flake anti-patterns.
|
|
37
38
|
- **playwright-reporter-llm**: Playwright reporter that outputs structured JSON for LLM agents. Minimal console output, flat schema, easy to filter to failures.
|
|
38
39
|
- **playwright-toolkit**: Shared anti-flake primitives for Clipboard Health Playwright suites.
|
|
39
40
|
- **rules-engine**: A pure functional rules engine to keep logic-dense code simple, reliable, understandable, and explainable.
|
|
@@ -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
|
+
**Addressed sentinel**: `<sub>๐ค <code>cb-babysit:addressed v1 core@3.20.0</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.
|
|
24
|
+
**Follow-up sentinel**: `<sub>๐ค <code>cb-babysit:followup v1 core@3.20.0</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.
|
|
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.20.0</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.
|
|
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.20.0</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.
|
|
13
|
+
SENTINEL='<sub>๐ค <code>cb-babysit:addressed v1 core@3.20.0</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
|
|
@@ -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.
|
|
20
|
+
<sub>๐ค <code>cb-ship:created v1 core@3.20.0</code></sub>
|
|
21
21
|
```
|
|
@@ -16,6 +16,7 @@ Your job is adversarial: assume the plan papers over the root cause until its ev
|
|
|
16
16
|
## Rules
|
|
17
17
|
|
|
18
18
|
- Load `references/rubric.md` (relative to this SKILL.md) before judging anything. Every rejection MUST cite rule IDs and quote the offending plan sentence or diff hunk. Every approval MUST name the fix class (A1โA7, C1โC5, D1โD5) and the evidence that satisfies its requirements.
|
|
19
|
+
- In shadow/enforce mode, consult `../flaky-debug/references/root-cause-kb/README.md` for the plan's symptom signature and proposed mechanism, and read every plausible entry before applying B5's Prior-attempts rule. A KB entry's **What failed and why** section may supply substantive evidence that the proposed mechanism was already tried and failed; cite the entry and its linked recurrence evidence, not the index row alone. In backtest mode, do not open the live KB; use KB evidence only when the supplied historical snapshot includes the contemporaneous entry.
|
|
19
20
|
- One verdict per ticket per content-state: skip tickets whose latest `<!-- flaky-critic:` marker is newer than the last substantive edit/comment.
|
|
20
21
|
- Findings from automated reviewers (Mendral, CodeRabbit) are advisory inputs, never binding (rubric ยง1).
|
|
21
22
|
- A plan outside the rubric's taxonomy is **needs-human**, not a guess. Uncertainty bounces up, never through.
|
|
@@ -32,7 +33,7 @@ If the queue is empty, skip to the digest. Fetch linked investigation tickets an
|
|
|
32
33
|
## Phase 2: Verdict per ticket
|
|
33
34
|
|
|
34
35
|
1. **Classify** the proposed fix into the rubric taxonomy. Multi-part plans get classified per part; the worst verdict wins.
|
|
35
|
-
2. **B-rules first** (any violation โ reject): B1โ
|
|
36
|
+
2. **B-rules first** (any violation โ reject): B1โB8, per rubric ยง2. For B5 in shadow/enforce mode, compare the plan's mechanism with candidate KB entries. In backtest mode, make that comparison only when a contemporaneous entry is part of the supplied snapshot. Reject substantively when an eligible entry documents that the same proposed mechanism already merged and then recurred; a shared symptom signature without a matching mechanism is not enough.
|
|
36
37
|
3. **A/C requirements**: the named fix class's "Required evidence" must be present (A-rules), or the conditional justification stated verbatim (C-rules). A1 has a shared-helper carve-out that's easy to miss โ check it explicitly before approving.
|
|
37
38
|
4. **D dispositions**: a no-code plan must carry the disposition's required evidence (D1โD5).
|
|
38
39
|
5. **Verdict**: `approve` / `reject` / `needs-human`, with confidence high/moderate/low. Low confidence โ needs-human.
|
|
@@ -56,6 +56,8 @@ Opening one plan/PR per failing test when the failures share one mechanism (same
|
|
|
56
56
|
|
|
57
57
|
**Prior attempts (amendment, 2026-07-16):** when a fingerprint family has prior implementation tickets, the plan MUST contain a **Prior attempts** section listing each prior ticket/PR, what it blamed, what it changed, and the recurrence evidence showing its diagnosis was wrong or incomplete. A missing section is statement-missing and gets amend-and-resubmit per ยง1. A plan that re-proposes a mechanism a prior merged fix already tried is a substantive reject. A family with **โฅ2 failed merged fixes** โ merged fixes followed by recurrence โ is disqualified from the normal fix path: verdict = reject and escalate as needs-human. Apply the `chronic` label and route the family to the credential-checked, dossier-first `flaky-deep-dive` skill. The โฅ2 threshold is intentionally different from flaky-triage's โฅ3-prior-implementation-tickets screen: triage counts tickets cheaply before any diagnosis exists, while the critic can see merge and recurrence outcomes and applies the sharper failed-merged-fix test. Either stage flagging chronic routes the same way; the counts are staged by the evidence available at each stage, not a contradiction.
|
|
58
58
|
|
|
59
|
+
**Knowledge-base cross-reference (amendment, 2026-07-16):** in shadow/enforce mode, consult the flaky-debug [root-cause knowledge-base index](../../flaky-debug/references/root-cause-kb/README.md) using the plan's symptom signature, then read each plausible entry's mechanism and **What failed and why** section. An entry that links a prior merged fix for the same mechanism to later recurrence is evidence for a substantive B5 reject under the Prior-attempts rule, even when the current plan omitted that history. Cite the entry and its recurrence evidence in the verdict. An index match on symptom text alone is not sufficient: if the causal mechanism differs or the entry has no failed merged attempt, continue evaluating the plan on its own evidence. In backtest mode, do not consult the live KB; use an entry only when the supplied historical snapshot includes the contemporaneous entry, so later recurrence evidence cannot leak into the historical verdict.
|
|
60
|
+
|
|
59
61
|
### B6 โ Code fix on low-confidence diagnosis
|
|
60
62
|
|
|
61
63
|
Proposing a code change when root-cause confidence is โค2/5, or any plan below 5/5 that omits observability follow-ups.
|
|
@@ -58,7 +58,7 @@ If the type is ambiguous, check the test file extension and imports to confirm.
|
|
|
58
58
|
|
|
59
59
|
If the type is E2E, also classify where the failure surfaced in the lifecycle -- see [Classify the E2E Failure Surface](./references/plan-e2e.md#classify-the-e2e-failure-surface) in `plan-e2e.md`. The failure surface dictates how broadly to investigate before reading or editing the test.
|
|
60
60
|
|
|
61
|
-
## Phase 1b: Build the Dossier and Check for Existing Fixes
|
|
61
|
+
## Phase 1b: Build the Dossier, Consult the Knowledge Base, and Check for Existing Fixes
|
|
62
62
|
|
|
63
63
|
Before diagnosing, build the fingerprint family's dossier, then check whether someone (or another agent) has already fixed this flake. Do not limit the dossier to the failing file or recent activity.
|
|
64
64
|
|
|
@@ -74,12 +74,22 @@ Before diagnosing, build the fingerprint family's dossier, then check whether so
|
|
|
74
74
|
For all four queries, omit the state filter so every state, including terminal states, is searched. Omit created/updated date filters; there is no 14-day restriction. The `query` field must search issue titles and descriptions, not the file name alone.
|
|
75
75
|
- Fetch every matching issue with `get_issue`, then read its relations, comments, and linked PRs so closed and merged attempts are not lost to truncated list results
|
|
76
76
|
|
|
77
|
-
2. **
|
|
78
|
-
|
|
77
|
+
2. **Consult the root-cause knowledge base alongside the Linear search.** Open [`references/root-cause-kb/README.md`](./references/root-cause-kb/README.md), compare the observed fingerprint, error text, failure surface, and causal evidence with its symptom index, and read every plausible entry in full.
|
|
78
|
+
- A matching symptom signature seeds the diagnosis with the entry's known mechanism; it does not prove the mechanism. Confirm or falsify it against the current artifacts and causal chain.
|
|
79
|
+
- Read the entry's **What failed and why** section before proposing a fix. Carry those failed-fix patterns into the dossier even when the current Linear family has no prior implementation ticket.
|
|
80
|
+
- Record one of these statements before diagnosis:
|
|
81
|
+
- `KB match: <entry link> โ <matched symptom signature>; mechanism hypothesis: <mechanism>; failed fixes to avoid: <summary>.`
|
|
82
|
+
- `KB match: none โ checked <symptom signatures/fingerprint> against the index.`
|
|
83
|
+
- If more than one entry is plausible, cite each candidate and state the evidence that selects or falsifies it. Create a new entry only when the causal terminus establishes a genuinely novel mechanism.
|
|
84
|
+
|
|
85
|
+
See the checked-in [KB lookup and close-out dry run](./references/root-cause-kb/dry-run-workplace-review-sheet.md) for one full cycle.
|
|
86
|
+
|
|
87
|
+
3. **Build the `Prior attempts` table before diagnosis.** Add one row for each prior implementation ticket and linked PR found through either query. The table columns are `Prior ticket/PR`, `What it blamed`, `What it changed`, and `Recurrence evidence`. The table must list each prior ticket/PR, what it blamed, what it changed, and the recurrence evidence showing its diagnosis was wrong or incomplete. Use later investigation sightings and post-merge failures as recurrence evidence; do not infer failure merely because an attempt is old. If there are no prior implementation tickets, record `None found` plus the fingerprint and test-title searches run. Keep KB-derived failed-fix history in the separate `KB match` statement unless the entry links a ticket or PR to this fingerprint family; do not manufacture family-specific prior attempts from a mechanism-level entry.
|
|
88
|
+
4. **Search open PRs with the `flaky-test-fix` label** that touch the failing test file or its surrounding code. Use GitHub search scoped to the repo:
|
|
79
89
|
- Search PRs labeled `flaky-test-fix` for the test file name or test directory
|
|
80
90
|
- Review the PR's changes to assess whether they address the same flake pattern with reasonable confidence โ if so, stop and report it to the user rather than opening a duplicate fix
|
|
81
91
|
- If the PR only partially addresses the flake or targets a different root cause, note it and proceed with investigation
|
|
82
|
-
|
|
92
|
+
5. **Check recent commits on `main`** that touch the failing test file or its surrounding code:
|
|
83
93
|
- `git log --oneline -20 origin/main -- <test-file-path>` and also check the parent directory or related source files
|
|
84
94
|
- Read the commit messages โ if one clearly fixes the same flake pattern, stop and report it to the user
|
|
85
95
|
|
|
@@ -89,6 +99,7 @@ If an existing fix is found, report:
|
|
|
89
99
|
- A brief summary of what it addresses
|
|
90
100
|
- Whether it fully covers the current flake or only partially
|
|
91
101
|
- The `Prior attempts` table, including recurrence evidence for any failed prior diagnosis
|
|
102
|
+
- The `KB match` statement, including the cited entry and failed-fix history when matched
|
|
92
103
|
|
|
93
104
|
If no existing fix is found, proceed to Phase 2.
|
|
94
105
|
|
|
@@ -101,3 +112,5 @@ If you are in plan mode, present the plan and stop here.
|
|
|
101
112
|
## Phase 3: Apply the plan (fix mode only)
|
|
102
113
|
|
|
103
114
|
Follow [`references/fix.md`](./references/fix.md). It takes the plan from Phase 2, validates the recorded sibling frontend check and reruns it when stale or missing, applies the proposed fix, searches for same-repo sibling anti-patterns, and verifies. PR creation is out of scope -- if the user later opens one (or invokes a PR-shipping skill), label it `flaky-test-fix`.
|
|
115
|
+
|
|
116
|
+
After that fix merges, the knowledge-base close-out in `fix.md` is required. Update the matched entry with the new evidence, repository/surface, fix result, and any newly established failed-fix history, or add a new mechanism-indexed entry when the causal terminus was genuinely novel.
|
|
@@ -90,6 +90,44 @@ Skip this step when the fix is **specific to one test's logic** -- for example a
|
|
|
90
90
|
|
|
91
91
|
Run the plan's **Validation plan** commands โ including the previously-flaky test, repeated enough times to give reasonable confidence the flake is gone. Lint and type-check touched files as the floor; do not stop there.
|
|
92
92
|
|
|
93
|
+
## Required Knowledge-Base Close-Out After Merge
|
|
94
|
+
|
|
95
|
+
After the target fix merges, close out the root-cause knowledge base in `references/root-cause-kb/`. This is required even when the plan matched an existing entry. A merged fix is new evidence about the mechanism and must not remain only in a target-repository PR.
|
|
96
|
+
|
|
97
|
+
1. In a core-utils checkout, reopen the plan's **KB match** and the [KB symptom index](./root-cause-kb/README.md). Read the matched entry, or identify the proposed entry path when the plan established a novel mechanism.
|
|
98
|
+
2. Print a dry-run statement before editing:
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
KB close-out dry run
|
|
102
|
+
Entry: <existing path or proposed new path>
|
|
103
|
+
Symptom signature: <signature being added or confirmed>
|
|
104
|
+
Mechanism: <causal mechanism>
|
|
105
|
+
Update type: <new evidence | new repository/surface | failed fix | new entry>
|
|
106
|
+
Sections: <entry sections and index rows to change>
|
|
107
|
+
Evidence: <merged PR, ticket, recurrence, trace, or fault-injection links>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
3. Update the existing entry when the causal mechanism is the same:
|
|
111
|
+
- Add or refine symptom signatures only when the new evidence makes them more discriminating.
|
|
112
|
+
- Add a newly implicated repository or surface.
|
|
113
|
+
- Add the merged fix and its validation under **What fixed it** and **Evidence**.
|
|
114
|
+
- Add a failed or partial fix under **What failed and why**, including the recurrence evidence that falsified it.
|
|
115
|
+
- Refresh **Current status** and `Last reviewed`.
|
|
116
|
+
4. Add a new entry only when the causal terminus proves a genuinely novel mechanism. Use the seven required sections from the KB index, index it by symptom signature and mechanism cue, and link evidence. A new test name, repository, or failure site is not by itself a new mechanism.
|
|
117
|
+
5. Run the core-utils sync and verification commands, open a focused core-utils PR for the KB change, and link that PR from the flaky implementation ticket or target fix PR. The close-out is not complete until the KB PR link is recorded.
|
|
118
|
+
|
|
119
|
+
Use the same statement discipline as the diagnosis plan. The final close-out must state:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
Knowledge-base close-out: <entry link>
|
|
123
|
+
Update: <new evidence | new repository/surface | failed fix | new entry>
|
|
124
|
+
Mechanism: <mechanism>
|
|
125
|
+
Evidence: <merged fix and recurrence/validation links>
|
|
126
|
+
KB PR: <link>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
If the target fix has not merged, write `Knowledge-base close-out: pending โ <target PR> is not merged` and leave the close-out open. Do not use `no KB update needed`. The checked-in [workplace-review sheet dry run](./root-cause-kb/dry-run-workplace-review-sheet.md) demonstrates the lookup, cited plan, and post-merge entry update without external writes.
|
|
130
|
+
|
|
93
131
|
## Output Format
|
|
94
132
|
|
|
95
133
|
When opening a PR for a flaky test fix, include `--label flaky-test-fix` in the `gh pr create` command so other agents can find it during Phase 1b deduplication.
|
|
@@ -101,6 +139,7 @@ When documenting the fix in a PR or issue, use this structure. Carry **Confidenc
|
|
|
101
139
|
- **Confidence:** score (1-5) with brief justification
|
|
102
140
|
- **Failure surface:** where the failure first surfaced and why the fix belongs there
|
|
103
141
|
- **Current main status:** whether the failure path still existed when the fix was made
|
|
142
|
+
- **KB match:** the cited entry, matched symptom signature, mechanism hypothesis, and failed fixes to avoid; or `None` plus the fingerprints and symptom signatures checked against the index
|
|
104
143
|
- **Symptom:** what failed and where
|
|
105
144
|
- **Root cause:** concise technical explanation
|
|
106
145
|
- **Evidence:** artifacts supporting the diagnosis (traces, network, error messages, screenshots as applicable)
|
|
@@ -109,3 +148,4 @@ When documenting the fix in a PR or issue, use this structure. Carry **Confidenc
|
|
|
109
148
|
- **Sibling-repo check:** sibling repository and current `main` commit searched; exact helper names or grep-able code patterns; commands, scope, and matches; linked mirror implementation ticket URL when created, or the explicit pending post-merge deliverable before then; or `N/A` with the reason the mechanism was not plausibly shared
|
|
110
149
|
- **Validation:** commands and suites run
|
|
111
150
|
- **Residual risk:** what could still be flaky
|
|
151
|
+
- **Knowledge-base close-out:** the entry update and KB PR link after merge, or the explicit pending statement before merge
|
|
@@ -94,6 +94,7 @@ Produce the plan with these fields:
|
|
|
94
94
|
- **Confidence:** score (1-5) with brief justification
|
|
95
95
|
- **Failure surface:** CI/job setup, test setup/auth/data, app bootstrap, user action no-op, backend request, post-success render, assertion/locator, or mixed
|
|
96
96
|
- **Current main status:** whether the failing commit's code path still exists on current `main`, has already been fixed, or has changed enough that the plan must be adjusted
|
|
97
|
+
- **KB match:** cite the matching entry, matched symptom signature, mechanism hypothesis, and known failed fixes to avoid. If none matched, write `None` and list the symptom signatures/fingerprint checked against the index.
|
|
97
98
|
- **Prior attempts:** list each prior ticket/PR, what it blamed, what it changed, and the recurrence evidence showing its diagnosis was wrong or incomplete. Use a table with `Prior ticket/PR`, `What it blamed`, `What it changed`, and `Recurrence evidence` columns. If the dossier search found no prior implementation tickets, write `None found` and include the fingerprint-family and exact-test-title searches run.
|
|
98
99
|
- **Symptom:** what failed and where
|
|
99
100
|
- **Root cause:** concise technical explanation
|
|
@@ -42,3 +42,7 @@ When adding an entry, keep the same sections used by the seeded entries:
|
|
|
42
42
|
- Read the candidate entry's failed-attempt section before proposing a fix.
|
|
43
43
|
- If the evidence contradicts the entry, continue the investigation and add a new mechanism only when the causal terminus is genuinely different.
|
|
44
44
|
- Update an existing entry when a new repository or test exposes the same mechanism.
|
|
45
|
+
|
|
46
|
+
## Demonstrated cycle
|
|
47
|
+
|
|
48
|
+
The [workplace-review sheet dry run](./dry-run-workplace-review-sheet.md) demonstrates one complete, write-free cycle: a diagnosis matches symptom signatures to an entry, the plan cites the mechanism and failed-fix history, and the merged fix close-out identifies the exact entry sections updated.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Dry Run: Workplace-Review Sheet Knowledge-Base Cycle
|
|
2
|
+
|
|
3
|
+
- **Mode:** Retrospective dry run; no external writes
|
|
4
|
+
- **Repository:** `cbh-mobile-app`
|
|
5
|
+
- **Surface:** Workplace-review comment and reply action sheets
|
|
6
|
+
- **Fix evidence:** [cbh-mobile-app#12860](https://github.com/ClipboardHealth/cbh-mobile-app/pull/12860)
|
|
7
|
+
- **Date:** 2026-07-16
|
|
8
|
+
|
|
9
|
+
This dry run demonstrates the required diagnosis-to-close-out cycle using a real merged fix. It reconstructs the statements the workflow must produce; it does not claim that the historical investigation originally consulted an entry that was created later.
|
|
10
|
+
|
|
11
|
+
## 1. Diagnosis lookup
|
|
12
|
+
|
|
13
|
+
Observed symptom signatures:
|
|
14
|
+
|
|
15
|
+
- A sheet opens from a query-backed review or reply row, then disappears or loses its actionable content.
|
|
16
|
+
- The failure occurs while the backing list can refetch or reconcile.
|
|
17
|
+
- Retries at the locator or interaction site do not make the sheet lifecycle stable.
|
|
18
|
+
|
|
19
|
+
Index lookup output:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
KB match: query-driven-list-dialog-teardown.md
|
|
23
|
+
Matched symptom signature: dialog or sheet opens, then its content does not remain stably visible
|
|
24
|
+
Mechanism hypothesis: the sheet is owned below a query-driven mapped row and unmounts when that row reconciles
|
|
25
|
+
Failed fixes to avoid: locator retries, response waits, expanded timeouts, and state preservation that leaves overlay ownership below the replaceable row
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Candidate read in full: [Query-driven list dialog teardown](./query-driven-list-dialog-teardown.md).
|
|
29
|
+
|
|
30
|
+
The failure surface and component ownership select this entry. A shared `element was detached` string alone would not be enough; the causal evidence must show that the open sheet is a descendant of the replaceable query row.
|
|
31
|
+
|
|
32
|
+
## 2. Plan excerpt seeded by the entry
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
KB match: Query-driven list dialog teardown
|
|
36
|
+
Matched signature: open query-row sheet disappears during list reconciliation
|
|
37
|
+
Mechanism hypothesis: overlay lifecycle is coupled to a replaceable mapped row
|
|
38
|
+
Known failed fixes: interaction retries and timeout expansion leave ownership unchanged; preserving modal state does not preserve the active DOM subtree
|
|
39
|
+
|
|
40
|
+
Root cause: workplace-review comment and reply action sheets are rendered beneath query-backed mapped rows. A refetch can reconcile the launching row and destroy the open sheet during interaction.
|
|
41
|
+
|
|
42
|
+
Proposed fix: hoist the action sheets into one stable, entity-keyed host above the mapped list. Keep rows trigger-only.
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The entry seeds the mechanism and failed-fix history, but the plan still has to prove the current ownership chain from source and artifacts. The plan cites the entry rather than presenting the mechanism as novel.
|
|
46
|
+
|
|
47
|
+
## 3. Post-merge close-out dry-run output
|
|
48
|
+
|
|
49
|
+
After `cbh-mobile-app#12860` merged, the close-out chooses an existing entry because the causal mechanism is unchanged:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
KB close-out dry run
|
|
53
|
+
Entry: references/root-cause-kb/query-driven-list-dialog-teardown.md
|
|
54
|
+
Symptom signature: workplace-review comment or reply sheet disappears while its query-backed row reconciles
|
|
55
|
+
Mechanism: overlay lifecycle is coupled to a replaceable query-driven mapped row
|
|
56
|
+
Update type: new repository/surface and new fix evidence
|
|
57
|
+
Sections: Affected repositories and surfaces; What fixed it; Current status; Evidence
|
|
58
|
+
Evidence: cbh-mobile-app#12860
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Expected entry changes:
|
|
62
|
+
|
|
63
|
+
- **Affected repositories and surfaces:** add the workplace-review comment and reply action sheets under `cbh-mobile-app`.
|
|
64
|
+
- **What fixed it:** record that the sheets were hoisted to a stable host and rows became trigger-only.
|
|
65
|
+
- **Current status:** mark the known workplace-review descendants fixed while retaining the lookup guidance for future surfaces.
|
|
66
|
+
- **Evidence:** link `cbh-mobile-app#12860`.
|
|
67
|
+
- **Symptom index:** no new row required because the existing disappearing-sheet signature already retrieves this mechanism.
|
|
68
|
+
|
|
69
|
+
Resulting entry: [Query-driven list dialog teardown](./query-driven-list-dialog-teardown.md) now names the workplace-review surfaces, records `cbh-mobile-app#12860` as the repository-wide indirect-descendant fix, and links that PR in its evidence.
|
|
70
|
+
|
|
71
|
+
Final close-out statement:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
Knowledge-base close-out: [Query-driven list dialog teardown](./query-driven-list-dialog-teardown.md)
|
|
75
|
+
Update: new repository/surface and new fix evidence
|
|
76
|
+
Mechanism: overlay lifecycle coupled to a replaceable query-driven mapped row
|
|
77
|
+
Evidence: [cbh-mobile-app#12860](https://github.com/ClipboardHealth/cbh-mobile-app/pull/12860)
|
|
78
|
+
KB PR: [ClipboardHealth/core-utils#785](https://github.com/ClipboardHealth/core-utils/pull/785)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The retrospective KB publication is [core-utils#785](https://github.com/ClipboardHealth/core-utils/pull/785). This is an entry update, not a new entry: the repository and sheet names are new evidence for the same mechanism, not a genuinely novel causal terminus.
|