Skip to content

Commit 5a5313e

Browse files
committed
Update feature request template
1 parent 49eb67f commit 5a5313e

File tree

11 files changed

+551
-7
lines changed

11 files changed

+551
-7
lines changed

.cursor/commands/jira.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Jira Command Palette
3+
description: Quick links for creating or updating Jira artifacts from Cursor chat.
4+
---
5+
6+
# Jira Management Shortcuts
7+
8+
## Create Items
9+
- `@create-feature-doc` → scaffold FR folder (`jira/feature-requests/FR-XXX-title/`)
10+
- `@create-bug-doc` → scaffold BUG folder (`jira/bugs/BUG-XXX-title/`)
11+
- `@create-tech-debt-doc` → scaffold TD folder (`jira/tech-debt/TD-XXX-title/`)
12+
- `@create-chore` → scaffold CHORE folder (`jira/chores/CHORE-XXX-title/`)
13+
14+
## Update Existing Items
15+
- `@update-feature-doc` → append structured handoff entry to selected feature
16+
- `@update-bug-doc` → append structured handoff entry to selected bug
17+
- `@update-tech-debt-doc` → append structured handoff entry to selected tech-debt item
18+
19+
## Need a Refresher?
20+
- Open `.cursor/commands/README-JIRA-COMMANDS.md` for full prompts, naming rules, and examples.
21+
- All templates live inside the `jira/` tree; customize there if formats change.
22+
- After any edits, run `update-handoff [ITEM-ID]` to sync the central summary.
23+

CLAUDE.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,3 +513,46 @@ encore run
513513
- Remove outdated entries proactively
514514
- Link to cursor rules for detailed explanations
515515
- Enforce naming conventions: rule files must end `_rules`, skill artifacts end `_skill`, and `.cursor/commands` entries stay natural-language headlines of five words or fewer.
516+
517+
// ✅ MUST import subscriptions in encore test
518+
// encore test for backend testing
519+
import "../agent/orchestrator/subscription";
520+
import "../artifacts/store";
521+
import "../graph/encore.service.ts";
522+
// Import ALL subscriptions you need
523+
import "../agent/orchestrator/subscription"; // Agent worker
524+
import "../notifications/email-subscription"; // Email service
525+
import "../analytics/event-subscription"; // Analytics
526+
import "../webhooks/delivery-subscription"; // Webhooks
527+
528+
// Import ALL services
529+
import "../artifacts/store";
530+
import "../graph/encore.service.ts";
531+
import "../notifications/encore.service.ts";
532+
import "../analytics/encore.service.ts";
533+
534+
it("tests multi-service flow", async () => {
535+
// ALL services run in same encore test environment
536+
const { runId } = await start({ ... });
537+
538+
// Verify agent processed
539+
while (runStatus !== "completed") { await poll(); }
540+
541+
// Verify email sent
542+
const email = await db.queryRow`
543+
SELECT * FROM emails WHERE run_id = ${runId}
544+
`;
545+
expect(email).toBeDefined();
546+
547+
// Verify analytics tracked
548+
const event = await db.queryRow`
549+
SELECT * FROM analytics_events WHERE run_id = ${runId}
550+
`;
551+
expect(event).toBeDefined();
552+
553+
// Verify webhook delivered
554+
const webhook = await db.queryRow`
555+
SELECT * FROM webhook_deliveries WHERE run_id = ${runId}
556+
`;
557+
expect(webhook).toBeDefined();
558+
});

bun.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
"version": "1.0.0",
4141
"dependencies": {
4242
"@formkit/auto-animate": "^0.8.2",
43+
"@skeletonlabs/skeleton": "^4.2.4",
44+
"@skeletonlabs/skeleton-svelte": "^4.2.4",
4345
"clsx": "^2.1.1",
4446
"envalid": "^8.1.1",
4547
"lucide-svelte": "^0.425.0",
@@ -49,8 +51,6 @@
4951
"devDependencies": {
5052
"@biomejs/biome": "1.9.2",
5153
"@playwright/test": "^1.56.1",
52-
"@skeletonlabs/skeleton": "^4.2.4",
53-
"@skeletonlabs/skeleton-svelte": "^4.2.4",
5454
"@sveltejs/adapter-vercel": "^4.0.0",
5555
"@sveltejs/kit": "^2.0.0",
5656
"@sveltejs/vite-plugin-svelte": "^5.0.0",

frontend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
},
2121
"dependencies": {
2222
"@formkit/auto-animate": "^0.8.2",
23+
"@skeletonlabs/skeleton": "^4.2.4",
24+
"@skeletonlabs/skeleton-svelte": "^4.2.4",
2325
"clsx": "^2.1.1",
2426
"envalid": "^8.1.1",
2527
"lucide-svelte": "^0.425.0",
@@ -29,8 +31,6 @@
2931
"devDependencies": {
3032
"@biomejs/biome": "1.9.2",
3133
"@playwright/test": "^1.56.1",
32-
"@skeletonlabs/skeleton": "^4.2.4",
33-
"@skeletonlabs/skeleton-svelte": "^4.2.4",
3434
"@sveltejs/adapter-vercel": "^4.0.0",
3535
"@sveltejs/kit": "^2.0.0",
3636
"@sveltejs/vite-plugin-svelte": "^5.0.0",
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# BUG-011: appium-shell-stall
2+
3+
> **Line Limit:** 150 lines max (enforced)
4+
> **Purpose:** Core bug documentation and implementation details
5+
6+
---
7+
8+
## Summary
9+
Drift detection runs never finish when Appium starts without `allowInsecure=adb_shell`. The agent captures a screenshot, but the run remains `running`, the frontend shows the stale frame, and there is no failure surfaced to engineers or QA.
10+
11+
---
12+
13+
## Severity / Impact
14+
- **Severity**: High
15+
- **Impact**: Automated backend tests and manual drift detection rely on Appium. Misconfiguration silently stalls runs, masking failure signals and blocking verification.
16+
17+
---
18+
19+
## Environment
20+
- **Backend**: encore run (local)
21+
- **Frontend**: localhost:5173
22+
- **Browser/OS**: Chrome 130 on macOS 14.6
23+
- **Package Versions**: Appium 2.x (without `allowInsecure=adb_shell`)
24+
25+
---
26+
27+
## Steps to Reproduce
28+
1. Start Appium without insecure shell (`appium --port 4723`).
29+
2. Run `task backend:test` or click “Detect My First Drift” in the UI.
30+
3. Observe Vitest logs: `ProvisionApp.signature.failed` with `adb_shell not enabled`.
31+
4. Frontend displays a screenshot forever; Encore reports run status `running`.
32+
33+
---
34+
35+
## Expected Result
36+
- Backend run transitions to `failed` with an actionable `stop_reason`.
37+
- Frontend surfaces an error state to the user when the agent cannot proceed.
38+
39+
---
40+
41+
## Actual Result
42+
- `mobile: shell` command fails; Encore logs a warning but leaves the run in `running`.
43+
- UI shows the last captured screenshot indefinitely with no error banner.
44+
- Engineers receive no signal that Appium is misconfigured.
45+
46+
---
47+
48+
## Root Cause
49+
Initial finding: the agent treats signature verification failure as recoverable, so the orchestration never emits a terminal event. The frontend only sees `status: "running"`, leaving the stale frame onscreen.
50+
51+
---
52+
53+
## Proposed Fix
54+
1. Update `ProvisionApp` handling to propagate the signature failure as a terminal `run.stop_reason`.
55+
2. Add backend telemetry/metrics for `adb_shell` capability errors.
56+
3. Frontend: detect runs that remain `running` past timeout and surface an explicit error banner.
57+
4. Document Appium startup requirements and add a CLI guard to `task qa:appium:start`.
58+
59+
---
60+
61+
## Attachments / Logs
62+
- Vitest snippet: `WebDriverError: Potentially insecure feature 'adb_shell' has not been enabled.`
63+
- Encore log lines from `ProvisionApp.signature.failed`.
64+
- Screenshot of frontend showing single frozen frame.
65+
66+
---
67+
68+
## Owner / Priority
69+
- **Reported by**: QA (Founder request)
70+
- **Assigned to**: Backend + QA pair
71+
- **Priority**: P1
72+
73+
---
74+
75+
## Related Items
76+
- **Discovered in**: Drift detection regression testing
77+
- **Blocks**: Automated backend smoke tests that depend on Appium
78+
- **Related**: FR-019 (Appium auto-start hardening)
79+
80+
---
81+
82+
## Notes
83+
- Tests `agent/tests/metrics.test.ts` and `backend/run/start.integration.test.ts` fail with timeout when this occurs.
84+
- Issue confirmed multiple times on 2025-11-10; screenshot persisted on frontend even after Appium shutdown.
85+
86+
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# BUG-011: appium-shell-stall - Retro
2+
3+
> **Line Limit:** 100 lines max (enforced)
4+
> **Purpose:** Learnings and retrospective after bug resolution
5+
6+
---
7+
8+
## Completed
9+
**Date:** TBD
10+
**Resolution:** Pending
11+
12+
---
13+
14+
## Rating (out of 5)
15+
**Overall:** TBD
16+
17+
**Breakdown:**
18+
- Investigation speed: TBD
19+
- Fix quality: TBD
20+
- Testing coverage: TBD
21+
- Documentation: TBD
22+
23+
---
24+
25+
## What Went Well
26+
- Pending resolution
27+
28+
---
29+
30+
## What Didn't Go Well
31+
- Pending resolution
32+
33+
---
34+
35+
## Lessons Learned
36+
1. **TBD**
37+
- What: Pending
38+
- Why: Pending
39+
- Action: Pending
40+
41+
2. **TBD**
42+
- What: Pending
43+
- Why: Pending
44+
- Action: Pending
45+
46+
---
47+
48+
## Prevention
49+
**How to prevent this bug class in the future:**
50+
- Pending
51+
52+
---
53+
54+
## Impact
55+
- **Users affected**: Pending
56+
- **Duration**: Pending
57+
- **Time to fix**: Pending
58+
59+
---
60+
61+
## Follow-up Items
62+
- [ ] Identify follow-up tasks after fix
63+
64+
---
65+
66+
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# BUG-011: appium-shell-stall - Status
2+
3+
> **Line Limit:** 100 lines max (enforced)
4+
> **Purpose:** Track todos, progress, and current state
5+
6+
---
7+
8+
## Manual Testing Required (Top 5)
9+
1. Backend `task backend:test` completes with misconfigured Appium (should fail fast).
10+
2. Frontend “Detect Any Drift” shows explicit error when Appium cannot execute `mobile: shell`.
11+
3. Backend run terminates with `stop_reason` when `adb_shell` is disabled.
12+
4. Appium start script enforces `allowInsecure=adb_shell`; missing flag is detected.
13+
5. Regression: normal run succeeds when Appium is configured correctly.
14+
15+
---
16+
17+
## Status
18+
**Current:** investigating
19+
**Priority:** P1
20+
**Severity:** High
21+
22+
**Started:** 2025-11-10
23+
**Last Updated:** 2025-11-10
24+
**Completed:**
25+
26+
---
27+
28+
## Todos
29+
- [ ] Reproduce bug locally
30+
- [ ] Identify root cause
31+
- [ ] Implement fix
32+
- [ ] Write/update tests
33+
- [ ] Manual verification
34+
- [ ] Update documentation
35+
36+
---
37+
38+
## Progress Summary
39+
Reproduced consistently: runs hang at `running` when Appium lacks `adb_shell`. Need backend change to surface failure and frontend guardrail.
40+
41+
---
42+
43+
## Blockers
44+
- (none)
45+
46+
---
47+
48+
## Recent Updates
49+
50+
### 2025-11-10
51+
Documented failure scenario; Vitest logs confirm signature validation falls back without terminating run.
52+
53+
---
54+
55+
## Help Needed
56+
- (none)
57+
58+
---
59+
60+

0 commit comments

Comments
 (0)