mirror of
https://github.com/azaion/ui.git
synced 2026-06-21 13:41:12 +00:00
[AZ-512] Defer to backlog at cross-workspace BLOCKING gate
AZ-512 (Admin edit detection class) hit its spec-defined Cross-Workspace Verification gate during cycle 3 batch 15. The admin/ service (Azaion.AdminApi/Program.cs) exposes /login, /users*, /resources* only — no /classes routes exist, so neither the PATCH this task needs nor the POST/DELETE that AdminPage.tsx already calls today are wired end-to-end. Per the spec's Choose A/B/C (user skipped, defaulted to A): file a prerequisite ticket on admin/ and pause AZ-512 in backlog/. AZ-510 + AZ-511 already shipped this cycle; cycle 3 closes with 6 of 9 points delivered. - Move AZ-512 spec from todo/ to backlog/ with a STATUS banner. - Add Jira comment on AZ-512 documenting the blocker + replay path. - Write leftover record _docs/_process_leftovers/2026-05-13_az-512-... capturing the full prerequisite payload (suggested ticket summary, description, ACs, story points) and the side observation that the existing add+delete affordances on the Detection Classes table are also broken end-to-end against admin/ (pre-existing bug, NOT introduced by cycle 3). - Write batch 15 deferral report. - Write Product Implementation Completeness Gate report (PASS for AZ-510 + AZ-511; AZ-512 deferred is outside the gate's scope). - Write final cycle 3 implementation report with handoff to Step 11. - Advance state: step 10 -> step 11 (Run Tests). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
# Batch 15 — AZ-512 (Admin edit detection class) — DEFERRED
|
||||
|
||||
**Date**: 2026-05-13
|
||||
**Cycle**: 3 — autodev Step 10 (Implement), batch 3 of 3 (fixes-first order: AZ-510 ✓ → AZ-511 ✓ → AZ-512 deferred at gate)
|
||||
**Tickets**: AZ-512 (Epic AZ-509)
|
||||
**Verdict**: DEFERRED — BLOCKING gate failed; cross-workspace prerequisite missing
|
||||
|
||||
---
|
||||
|
||||
## Task Results
|
||||
|
||||
| Task | Status | Files Modified | Tests | AC Coverage | Issues |
|
||||
|------|--------|----------------|-------|-------------|--------|
|
||||
| AZ-512_admin_edit_detection_class | DEFERRED | 0 production files (verification only) | n/a — implementation never started | 0/8 ACs covered (gate stopped before implementation) | 1 (cross-workspace prerequisite missing) |
|
||||
|
||||
## Why deferred
|
||||
|
||||
The task spec defines a Cross-Workspace Verification BLOCKING gate that must pass before implementation begins:
|
||||
|
||||
> *"Before implementing the form, the implementer MUST verify the backend endpoint exists.
|
||||
> Read `../admin/` source to confirm `PATCH /api/admin/classes/{id}` is routed and accepts `{ name?, shortName?, color?, maxSizeM? }`."*
|
||||
|
||||
### Verification result
|
||||
|
||||
`grep -rn -E "MapPost|MapPatch|MapDelete|MapGet" /Users/.../suite/admin --include="*.cs" | grep -i class` → **no matches**.
|
||||
|
||||
The `admin/` sibling service (`Azaion.AdminApi/Program.cs`) exposes `/login`, `/users*`, `/resources*` only. There are no `/classes` routes at all.
|
||||
|
||||
### Choices presented (per spec)
|
||||
|
||||
- **A**: File a hard-prerequisite ticket on the `admin/` workspace, pause AZ-512 until it lands.
|
||||
- **B**: Implement only the UI form, MSW-stubbed in tests, mark Step 11 blocked-on-admin/PATCH, ship draft PR.
|
||||
- **C**: Drop AZ-512 from cycle 3, defer to a future cycle.
|
||||
|
||||
User was prompted via `AskQuestion`; user skipped the prompt.
|
||||
|
||||
### Default decision (A)
|
||||
|
||||
The autodev defaulted to **A** for these reasons:
|
||||
|
||||
1. **Workspace boundary discipline** (`.cursor/rules/coderule.mdc`): the UI workspace cannot add routes in the `admin/` workspace. Filing a prerequisite ticket is the right cross-workspace coordination pattern.
|
||||
2. **Spec invariant**: *"Do not invent a workaround that bypasses the missing endpoint."* Option B's MSW-stubbed UI is exactly that workaround once it ships, because the user-visible affordance would 404 in production.
|
||||
3. **Cycle ordering rationale**: cycle 3 was deliberately ordered fixes-first (AZ-510 → AZ-511 → AZ-512) for exactly this risk — if AZ-512 hits a cross-workspace blocker, the fixes ship anyway. Option C re-validates that decision.
|
||||
4. **Conservative default**: A is the minimal-progress option that preserves both correctness and the user's ability to override at the next `/autodev` invocation.
|
||||
|
||||
### Side observation (pre-existing bug, not introduced by AZ-512)
|
||||
|
||||
`AdminPage.tsx` already calls `POST /api/admin/classes` and `DELETE /api/admin/classes/{id}`. Neither is served by the admin service today (same gap that blocks AZ-512). The existing add+delete affordances on the Detection Classes table are therefore broken end-to-end against the live admin/ service in production. This is **pre-existing**, not introduced by AZ-510 / AZ-511 / AZ-512. Captured in the leftover record (see Section 7) for the user to track as a separate UI-workspace ticket once the admin/ work is filed.
|
||||
|
||||
## Files touched
|
||||
|
||||
- `_docs/02_tasks/todo/AZ-512_admin_edit_detection_class.md` → moved to `_docs/02_tasks/backlog/AZ-512_admin_edit_detection_class.md` (with a STATUS banner inserted at the top of the spec).
|
||||
- `_docs/_process_leftovers/2026-05-13_az-512-admin-classes-prereq.md` (new) — full prerequisite payload + replay obligation.
|
||||
- Jira AZ-512 — status remains `To Do` (no `Blocked` status exists in the project workflow); a comment was added explaining the blocker and linking to the leftover record.
|
||||
|
||||
## Re-activation
|
||||
|
||||
The next `/autodev` invocation will:
|
||||
|
||||
1. Run the leftovers replay step from `.cursor/rules/tracker.mdc` and check this entry.
|
||||
2. If the admin/ workspace's `/classes` routes now exist → move `_docs/02_tasks/backlog/AZ-512_*.md` back to `todo/`, transition the Jira ticket back to In Progress, and proceed with implementation.
|
||||
3. If they still don't exist → leave the leftover as-is and surface the outstanding prerequisite to the user.
|
||||
|
||||
## Cycle 3 outcome (overall)
|
||||
|
||||
- **AZ-510** ✓ shipped (batch 13, commit `70fb452`) — closes Finding B3 / Vision P3
|
||||
- **AZ-511** ✓ shipped (batch 14, commit `c368f60`) — closes Finding F3
|
||||
- **AZ-512** ⏸ deferred to backlog — blocked on cross-workspace prerequisite
|
||||
|
||||
Cycle 3 ships **6 of 9 planned story points** (3 + 3 = 6, with AZ-512's 3 points carried forward). Both delivered tasks were the cycle's "fixes" half — Vision P3 and F3 are now closed. The "feature" half (P12 / F10) is deferred until the cross-workspace prerequisite lands.
|
||||
@@ -0,0 +1,54 @@
|
||||
# Product Implementation Completeness — Cycle 3
|
||||
|
||||
**Date**: 2026-05-13
|
||||
**Cycle**: 3
|
||||
**Inputs**: `_docs/02_tasks/done/AZ-510_*.md`, `_docs/02_tasks/done/AZ-511_*.md` (the 2 completed product tasks of cycle 3); `_docs/02_document/architecture.md`; `_docs/02_document/components/02_auth/description.md`; `_docs/02_document/components/11_class-colors/description.md`; `_docs/02_document/architecture_compliance_baseline.md`; cycle 3 batch reports + reviews.
|
||||
|
||||
---
|
||||
|
||||
## Per-task classification
|
||||
|
||||
### AZ-510 — Auth bootstrap refresh consolidation
|
||||
|
||||
**Verdict**: **PASS**
|
||||
|
||||
| Promise | Implementation evidence |
|
||||
|---------|------------------------|
|
||||
| Bootstrap uses `POST /api/admin/auth/refresh` with `credentials:'include'` | `src/auth/AuthContext.tsx:45-48` — direct `fetch(getApiBase()+endpoints.admin.authRefresh(),{method:'POST',credentials:'include'})` |
|
||||
| Chained `GET /api/admin/users/me` on success | `:51-53` — `setToken(refreshData.token)` then `api.get<AuthUser>(endpoints.admin.usersMe())` |
|
||||
| `setToken(null)` precedes `setUser(null)` on every failure path | `:59` (users/me failure) and `:87-88` (outer catch) |
|
||||
| StrictMode-safe inflight guard | `:25, 70-74` — module-scoped `bootstrapInflight` promise + test-only reset hook |
|
||||
| Closes Architecture Vision principle P3 + Finding B3 | Baseline `architecture_compliance_baseline.md` updated (B3 closed); `components/02_auth/description.md` updated; verification log `04_verification_log.md` B3 marked closed |
|
||||
|
||||
Evidence files/symbols checked: `src/auth/AuthContext.tsx`, `src/auth/index.ts`, `src/api/endpoints.ts`, `tests/setup.ts`, `tests/msw/handlers/admin.ts`. No `placeholder`, `stub`, `TODO`, `NotImplemented`, `fake`, `deterministic`, `scaffold`, or empty-bridge markers in the changed surface.
|
||||
|
||||
### AZ-511 — classColors carve-out to `src/class-colors/`
|
||||
|
||||
**Verdict**: **PASS**
|
||||
|
||||
| Promise | Implementation evidence |
|
||||
|---------|------------------------|
|
||||
| File at new location `src/class-colors/classColors.ts` | `git mv` confirmed; `find src/features/annotations -name classColors.ts` empty |
|
||||
| Barrel `src/class-colors/index.ts` re-exports the 4 public symbols | File exists; re-exports `getClassColor`, `getPhotoModeSuffix`, `getClassNameFallback`, `FALLBACK_CLASS_NAMES` |
|
||||
| All 4 consumers import via barrel | Verified in `src/components/DetectionClasses.tsx`, `src/features/annotations/CanvasEditor.tsx`, `src/features/annotations/AnnotationsSidebar.tsx`, `src/features/annotations/AnnotationsPage.tsx` |
|
||||
| Zero STC-ARCH-01 exemptions remain | `scripts/check-arch-imports.mjs` `ARCH_IMPORTS_EXEMPT_RE = null`; `class-colors` added to `COMPONENT_DIRS` so deep imports past the new barrel are caught |
|
||||
| Architecture test fixture replaced with stronger assertion | `tests/architecture_imports.test.ts` "AC-4: FAILS when a deep import bypasses the class-colors barrel" |
|
||||
| 5-coupled-places carry-over fully retired | `module-layout.md` (Layout Rule #2/#3 + 4 Per-Component Mapping entries + Verification Needed #1/#3 + shared/class-colors block); `11_class-colors/description.md` (Caveats §7 + Module Inventory); `architecture_compliance_baseline.md` (F3 CLOSED + F4 carry-forward exemption note retired); `06_annotations/index.ts` (carry-over comment removed); `scripts/run-tests.sh` (description block updated); `04_verification_log.md` (#1 + #8 RESOLVED) |
|
||||
| Build passes with no circular-import warnings | `bun run build` — built in 3.83s; 198 modules; only pre-existing CSS/chunk-size warnings remain |
|
||||
| Closes Finding F3 | Baseline `architecture_compliance_baseline.md` F3 marked CLOSED 2026-05-13 by AZ-511 |
|
||||
|
||||
Evidence files/symbols checked: `src/class-colors/`, all 4 consumer files, `scripts/check-arch-imports.mjs`, `tests/architecture_imports.test.ts`, `tests/detection_classes.test.tsx`, all 5 coupled doc/script touchpoints. No scaffold, no placeholder, no TODO. Pure file-move + barrel + import-path edits + doc updates.
|
||||
|
||||
### AZ-512 — Admin edit detection class
|
||||
|
||||
**Verdict**: **DEFERRED — outside this gate's scope** (cross-workspace prerequisite missing; task spec parked in `_docs/02_tasks/backlog/`; not in `done/`). The Product Implementation Completeness Gate audits completed product tasks for the cycle; deferred tasks are not classified here. See `_docs/03_implementation/batch_15_cycle3_report.md` and `_docs/_process_leftovers/2026-05-13_az-512-admin-classes-prereq.md`.
|
||||
|
||||
---
|
||||
|
||||
## Verdict
|
||||
|
||||
**Cycle 3 product implementation: PASS.**
|
||||
|
||||
Both completed product tasks (AZ-510, AZ-511) implement the promised production behaviour with no scaffold, no placeholder, no missing named runtime dependency. AZ-512 is parked in `backlog/` with a leftover record; it is the only cycle 3 work that did not ship, and it was deferred at its spec-defined BLOCKING gate (not silently abandoned). Cycle 3 ships 6 of 9 planned story points (AZ-510 + AZ-511); the remaining 3 (AZ-512) carry forward.
|
||||
|
||||
No remediation tasks needed for the completed work. The cross-workspace prerequisite for AZ-512 is captured in the leftover record for the user to action externally.
|
||||
@@ -0,0 +1,58 @@
|
||||
# Implementation Report — Cycle 3 (Auth bootstrap + classColors carve-out)
|
||||
|
||||
**Date**: 2026-05-13
|
||||
**Cycle**: 3
|
||||
**Epic**: AZ-509 (UI workspace cycle 3)
|
||||
**Status**: COMPLETE for AZ-510 + AZ-511; AZ-512 deferred to backlog/ at its BLOCKING gate.
|
||||
|
||||
---
|
||||
|
||||
## Tasks delivered
|
||||
|
||||
| Task | Title | Points | Status | Commit | Batch report |
|
||||
|------|-------|--------|--------|--------|--------------|
|
||||
| AZ-510 | Auth bootstrap refresh consolidation (closes Vision P3 / Finding B3) | 3 | DONE — In Testing | `70fb452` | `batch_13_cycle3_report.md` |
|
||||
| AZ-511 | classColors carve-out to `src/class-colors/` (closes Finding F3) | 3 | DONE — In Testing | `c368f60` | `batch_14_cycle3_report.md` |
|
||||
| AZ-512 | Admin edit detection class (P12 / F10) | 3 | DEFERRED to backlog/ — see `batch_15_cycle3_report.md` | — | `batch_15_cycle3_report.md` |
|
||||
|
||||
**Shipped**: 6 of 9 planned story points. **Carried forward**: 3 points (AZ-512 awaiting cross-workspace prerequisite).
|
||||
|
||||
## Code review
|
||||
|
||||
| Batch | Verdict | Findings | Report |
|
||||
|-------|---------|----------|--------|
|
||||
| 13 (AZ-510) | PASS | 0 | `reviews/batch_13_review.md` |
|
||||
| 14 (AZ-511) | PASS | 0 | `reviews/batch_14_review.md` |
|
||||
|
||||
No auto-fix attempts; no escalations. Cumulative review (every K=3 batches) — not triggered this cycle (only 2 successfully completed batches).
|
||||
|
||||
## Product Implementation Completeness Gate
|
||||
|
||||
PASS — see `implementation_completeness_cycle3_report.md`. AZ-510 and AZ-511 both implement promised production behaviour with no scaffold or placeholder. AZ-512 is deferred (not failed), task spec parked in `backlog/` with a leftover record for replay.
|
||||
|
||||
## Architecture baseline delta (cycle 3)
|
||||
|
||||
| Status | Finding | Delta source |
|
||||
|--------|---------|--------------|
|
||||
| Resolved | B3 — Auth bootstrap missing `credentials:'include'` (Vision P3) | AZ-510 (batch 13) |
|
||||
| Resolved | F3 — Physical / logical owner split for `classColors.ts` (5-coupled-places carry-over) | AZ-511 (batch 14) |
|
||||
| Open | F2 (CanvasEditor cross-feature edge), F5 (mission-planner internal cycle, track-only), F6 (no `src/shared/`), F8 (Header→useAuth unannotated), F10 (P12 missing CRUD edit) | Untouched this cycle; F10 is AZ-512's target, deferred |
|
||||
|
||||
## Cycle 3 leftovers
|
||||
|
||||
- `_docs/_process_leftovers/2026-05-13_az-512-admin-classes-prereq.md` — cross-workspace prerequisite (POST + PATCH + DELETE `/classes` routes in `admin/Azaion.AdminApi/Program.cs`). Includes a side observation that `AdminPage.tsx`'s existing add+delete affordances are **also** broken end-to-end against the live admin/ service today (pre-existing bug, surfaced during AZ-512 verification — NOT introduced by cycle 3).
|
||||
|
||||
Cycle 2 leftovers (carried forward; not actioned this cycle):
|
||||
- `_docs/_process_leftovers/2026-05-12_az-498-deploy-and-key-revocations.md` — `L-AZ-498-DEPLOY` (deploy gate at Step 16); `L-AZ-499-OWM-REVOKE` and `L-AZ-501-GOOGLE-REVOKE` (manual user action at OpenWeatherMap and Google Cloud dashboards).
|
||||
|
||||
## Test posture (handoff to Step 11)
|
||||
|
||||
- Static profile: GREEN (all gates including STC-ARCH-01 with zero exemptions, STC-ARCH-02)
|
||||
- Fast profile: GREEN (31 files / 231 passed / 13 skipped quarantines unchanged)
|
||||
- Build (`bun run build`): GREEN (no circular-import warnings)
|
||||
|
||||
Per `.cursor/skills/implement/SKILL.md` Step 16, the Final Test Run is **handed off to Step 11 (Run Tests)** — the next autodev step in the existing-code flow. The full-suite gate is owned by `.cursor/skills/test-run/SKILL.md` to avoid duplicate runs.
|
||||
|
||||
## Next autodev step
|
||||
|
||||
**Step 11 — Run Tests** (auto-chain). The test-run skill will rerun the full suite and surface any blocking failures.
|
||||
Reference in New Issue
Block a user