|
9 | 9 | {"id":"AssurancePlatform-59h","title":"My first issue","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-24T10:21:42.184897Z","updated_at":"2025-12-24T10:23:10.736974Z","closed_at":"2025-12-24T10:23:10.736974Z","close_reason":"Just testing"} |
10 | 10 | {"id":"AssurancePlatform-5fm","title":"Phase 2d: Auth Cleanup (RefreshToken Removal)","description":"Final cleanup of the legacy RefreshToken authentication system. BLOCKED until 2025-01-19 (30 days after JWT-only deployment).\n\nPre-requisite: JWT-only auth (USE_JWT_ONLY_AUTH=true) must be stable in production for 30+ days.\n\nCode Cleanup:\n- [ ] Delete lib/auth/refresh-token-service.ts\n- [ ] Delete lib/auth/validate-session.ts\n- [ ] Delete lib/auth/feature-flags.ts\n- [ ] Update lib/auth-options.ts - Remove legacy RefreshToken code\n- [ ] Update middleware.ts - Remove stale session detection\n- [ ] Update types/next-auth.d.ts - Remove key from Session type\n- [ ] Remove USE_JWT_ONLY_AUTH from environment variables\n\nClient Component Cleanup (remove session?.key references):\n- [ ] components/common/node-edit.tsx\n- [ ] components/common/new-link-form.tsx\n- [ ] components/common/edit-form.tsx\n- [ ] components/common/create-form.tsx\n- [ ] components/cases/orphan-elements.tsx\n\nTest Updates:\n- [ ] app/(landing)/_components/__tests__/header.test.tsx\n- [ ] lib/__tests__/auth-helpers.test.ts\n\nDatabase Migration:\n- [ ] Create Prisma migration to drop RefreshToken table\n- [ ] Run on staging first\n- [ ] Run on production","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-07T12:58:17.791742Z","created_by":"cburr","updated_at":"2026-01-11T09:58:10.515745Z","closed_at":"2026-01-11T09:58:10.515745Z","close_reason":"Merged to staging. Removed RefreshToken model, feature flags, and legacy session token references. Migration created to drop refresh_tokens table.","labels":["auth","tech-debt"],"dependencies":[{"issue_id":"AssurancePlatform-5fm","depends_on_id":"AssurancePlatform-dpk","type":"parent-child","created_at":"2026-01-09T09:38:44.305533Z","created_by":"cburr"}],"comments":[{"id":3,"issue_id":"AssurancePlatform-5fm","author":"cburr","text":"Unblocked: JWT-only auth has been stable in production for 30+ days. Ready to proceed with RefreshToken removal.","created_at":"2026-01-09T17:30:59Z"}]} |
11 | 11 | {"id":"AssurancePlatform-5hb","title":"Implement user data retention policy (2-3 years inactivity)","description":"Implement a data retention policy to comply with UK GDPR storage limitation principle.\n\n## Requirements\n- Delete user accounts after 2-3 years of inactivity (based on `lastLoginAt`)\n- Send email warnings before deletion:\n - First warning: 30 days before deletion\n - Final warning: 7 days before deletion\n- Offer data export option before deletion\n\n## Technical considerations\n- Scheduled background job to check for inactive users\n- Soft-delete with 30-day grace period before hard deletion\n- Handle edge cases:\n - Users who never created any cases (shorter retention?)\n - Inactive users who own cases shared with active team members\n- Document retention policy for users (privacy policy update)\n\n## Reference\n- ICO guidance on storage limitation\n- `lastLoginAt` field already exists on User model (prisma/schema.prisma:70)","status":"closed","priority":2,"issue_type":"feature","created_at":"2026-01-16T17:18:10.491183Z","created_by":"cburr","updated_at":"2026-01-18T08:03:04.115715Z","closed_at":"2026-01-18T08:03:04.115715Z","close_reason":"Data retention policy documented in content/data-retention-policy.mdx"} |
| 12 | +{"id":"AssurancePlatform-5l1","title":"Staging Azure App Service not starting after deployment","description":"## Problem\n\nThe staging Azure App Service (staging-assuranceplatform) returns 503 errors after deployment. The container fails to start despite successful Docker image push to ghcr.io.\n\n## Symptoms\n\n- Health endpoint returns 503: `https://staging-assuranceplatform.azurewebsites.net/api/health`\n- Container was using stale image tag (`staging-acc8a9a`) instead of `staging`\n- Manual update to `staging` tag and restart did not resolve\n\n## Investigation Done\n\n1. **Verified image pushed successfully** - GitHub Actions Build workflow completed\n2. **Checked container config** - Was pinned to old tag, updated to `staging`\n3. **Restart attempts** - `az webapp restart`, stop/start cycle - all returned 503\n4. **Logs checked** - Kudu logs show deployment requests but no container startup logs visible via CLI\n\n## Commands Tried\n\n```bash\naz webapp restart --name staging-assuranceplatform --resource-group AssuranceSiteStaging\naz webapp stop/start --name staging-assuranceplatform --resource-group AssuranceSiteStaging\naz webapp config container set --container-image-name \"ghcr.io/alan-turing-institute/assuranceplatform/tea-app:staging\"\n```\n\n## Next Steps\n\n1. Check Azure Portal → App Services → staging-assuranceplatform → Diagnose and solve problems → Container Crash\n2. Check Deployment Center → Logs for container startup errors\n3. Verify DATABASE_URL and other env vars are correct for staging\n4. Check if container is pulling correct image (may need to clear container cache)\n5. Consider checking if the new seed workflow or other changes affected startup\n\n## Related\n\n- Build workflow: https://github.com/alan-turing-institute/AssurancePlatform/actions/runs/21109956120\n- Release v0.3.0 deployed successfully to main\n- Issue appeared after merging dev seed database feature\n\n## Impact\n\n- Staging environment unavailable for testing\n- Changelog page cannot be verified at `/docs/technical-guide/ci-cd-pipeline/changelog`","status":"closed","priority":1,"issue_type":"bug","created_at":"2026-01-18T10:50:52.72571Z","created_by":"cburr","updated_at":"2026-01-18T15:04:12.638061Z","closed_at":"2026-01-18T15:04:12.638061Z","close_reason":"Fixed: Prisma now copied from builder stage with correct ownership for nextjs user","comments":[{"id":13,"issue_id":"AssurancePlatform-5l1","author":"cburr","text":"Additional fixes required after initial resolution:\n\n## Root Causes Found\n\n1. Docker build OOM - Next.js build exceeded default Node.js heap. Fixed by adding NODE_OPTIONS to Dockerfile.\n\n2. Prisma migration table missing - The _prisma_migrations table did not exist in staging DB.\n\n3. Database permissions - tea_app user lacked CREATE permission on public schema.\n\n## Fixes Applied\n\nCommits: 6a429b5 (NODE_OPTIONS), e1b4893 (seed workflow permissions)\n\nSTAGING_DATABASE_URL secret updated to use admin credentials.\n\nSeed workflow now grants permissions after reset.","created_at":"2026-01-18T20:48:35Z"}]} |
12 | 13 | {"id":"AssurancePlatform-5o1","title":"Code Quality: Replace raw SQL pattern in health check","description":"The health check in app/api/health/route.ts (line 34) uses $queryRaw with a hardcoded query.\n\n**Current code:**\n```typescript\nawait prisma.$queryRaw`SELECT 1`;\n```\n\n**Issue:** While this specific usage is safe (hardcoded query with no user input), using $queryRaw sets a pattern that could be dangerous if copied elsewhere.\n\n**Fix:** Replace with a safer alternative:\n```typescript\nawait prisma.user.count({ take: 1 }); // Prisma ORM method\n```\n\n**Confidence:** 80%","status":"closed","priority":2,"issue_type":"chore","created_at":"2025-12-24T10:27:30.403578Z","updated_at":"2026-01-02T10:57:51.766249Z","closed_at":"2026-01-02T10:57:51.766249Z","close_reason":"Replaced $queryRaw with prisma.user.count({ take: 1 }) and added unit tests","labels":["code-quality"]} |
13 | 14 | {"id":"AssurancePlatform-5oy","title":"Auto-seed dev database from backup on container creation","description":"Create a simple, lightweight dev/test database instead of using the full prod backup.\n\n## Purpose\n- Fast local development setup\n- Testing infrastructure for Phase 5 (g2a)\n- Reproducible test data for CI/CD and Playwright E2E tests\n\n## Requirements\n\n### Users\nCreate a small set of test users with known credentials:\n- **chris** - primary dev account (cburr)\n- **alice** - test user, team member (internal collaborator)\n- **bob** - test user, team member (internal collaborator)\n- **charlie** - test user, no team membership (external collaborator)\n\n### Team Structure\n- **Test Team** - alice and bob are members (alice as admin, bob as member)\n- charlie deliberately excluded to test internal vs external collaboration flows\n\n### Assurance Cases\nEach user should have cases of varying complexity:\n- **Simple**: Single goal with 1-2 claims and evidence (for quick tests)\n- **Medium**: Nested structure with strategies, multiple claims, evidence links\n- Cases in different states: draft, published, shared\n- At least one case shared between team members\n- At least one case shared with charlie (external sharing)\n\n### Data to Support E2E User Journeys\n1. **Authentication** - users with known passwords for login tests\n2. **Case Management** - cases to edit/delete, space to create new\n3. **Collaboration** - shared cases, existing comments to verify\n4. **Team Management** - existing team with members and permissions\n5. **Community Case Studies** - at least one published case study\n6. **User Settings** - users that can update profile/password\n7. **Import/Export** - cases suitable for export testing\n\n### Credentials Storage\n- Store passwords in a file that is NOT committed to git\n- Add to .gitignore\n- Document location for developers\n\n### Implementation\n1. Create seed SQL file: `prisma/seed/dev-seed.sql`\n2. Mount to `/docker-entrypoint-initdb.d/` in docker-compose.development.yml\n3. Runs automatically on fresh container (empty data directory)\n\n## Notes\n- Replaces current workflow of restoring from `backups/prod-backup-*.sql`\n- Seed data should be minimal but realistic\n- Passwords file location: `prisma/seed/.credentials` (gitignored)\n- Reference: Phase 5 (g2a) Critical User Journeys","status":"in_progress","priority":2,"issue_type":"feature","created_at":"2026-01-14T07:34:21.445679Z","created_by":"cburr","updated_at":"2026-01-18T08:23:30.059116Z"} |
14 | 15 | {"id":"AssurancePlatform-5s1","title":"Create database seeding utilities","description":"Create utilities for seeding test database with realistic data.\n\n## Location\nsrc/__tests__/utils/seed-utils.ts\n\n## API Design\n```typescript\n// Seed a complete test user with case\nexport async function seedTestUser(tx: PrismaTransaction): Promise\u003cTestUser\u003e\n\n// Seed a complete assurance case with elements\nexport async function seedTestCase(tx: PrismaTransaction, ownerId: string): Promise\u003cTestCase\u003e\n\n// Seed a team with members\nexport async function seedTestTeam(tx: PrismaTransaction): Promise\u003cTestTeam\u003e\n```\n\n## Data Sources\n- Adapt from existing mock-data.ts\n- Use test-factories.ts patterns\n- Ensure realistic relationships","status":"open","priority":1,"issue_type":"task","created_at":"2026-01-15T12:33:00.811758Z","created_by":"cburr","updated_at":"2026-01-15T12:33:00.811758Z","dependencies":[{"issue_id":"AssurancePlatform-5s1","depends_on_id":"AssurancePlatform-x8n","type":"blocks","created_at":"2026-01-15T12:33:07.54206Z","created_by":"cburr"}]} |
|
0 commit comments