TenantAtlas/specs/056-remove-legacy-bulkops/contracts/operations.bulk.openapi.yaml
ahmido a97beefda3 056-remove-legacy-bulkops (#65)
Kurzbeschreibung

Versteckt die Rerun-Row-Action für archivierte (soft-deleted) RestoreRuns und verhindert damit fehlerhafte Neu-Starts aus dem Archiv; ergänzt einen Regressionstest.
Änderungen

Code: RestoreRunResource.php — Sichtbarkeit der rerun-Action geprüft auf ! $record->trashed() und defensive Abbruchprüfung im Action-Handler.
Tests: RestoreRunRerunTest.php — neuer Test rerun action is hidden for archived restore runs.
Warum

Archivierte RestoreRuns durften nicht neu gestartet werden; UI zeigte trotzdem die Option. Das führte zu verwirrendem Verhalten und möglichen Fehlern beim Enqueueing.
Verifikation / QA

Unit/Feature:
./vendor/bin/sail artisan test tests/Feature/RestoreRunRerunTest.php
Stil/format:
./vendor/bin/pint --dirty
Manuell (UI):
Als Tenant-Admin Filament → Restore Runs öffnen.
Filter Archived aktivieren (oder Trashed filter auswählen).
Sicherstellen, dass für archivierte Einträge die Rerun-Action nicht sichtbar ist.
Auf einem aktiven (nicht-archivierten) Run prüfen, dass Rerun sichtbar bleibt und wie erwartet eine neue RestoreRun erzeugt.
Wichtige Hinweise

Kein DB-Migration required.
Diese PR enthält nur den UI-/Filament-Fix; die zuvor gemachten operative Fixes für Queue/adapter-Reconciliation bleiben ebenfalls auf dem Branch (z. B. frühere commits während der Debugging-Session).
T055 (Schema squash) wurde bewusst zurückgestellt und ist nicht Teil dieses PRs.
Merge-Checklist

 Tests lokal laufen (RestoreRunRerunTest grünt)
 Pint läuft ohne ungepatchte Fehler
 Branch gepusht: 056-remove-legacy-bulkops (PR-URL: https://git.cloudarix.de/ahmido/TenantAtlas/compare/dev...056-remove-legacy-bulkops)

Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.local>
Reviewed-on: #65
2026-01-19 23:27:52 +00:00

67 lines
2.1 KiB
YAML

openapi: 3.0.3
info:
title: TenantAtlas Operations — Bulk Enqueue (Conceptual)
version: 0.1.0
description: |
Conceptual contract for enqueue-only bulk operations.
Notes:
- This contract describes the shape of inputs and outputs; it does not prescribe a specific Laravel route.
- Start surfaces are enqueue-only and must not perform remote work inline.
paths:
/operations/bulk/enqueue:
post:
summary: Enqueue a bulk operation (enqueue-only)
operationId: enqueueBulkOperation
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: true
properties:
operation_type:
type: string
minLength: 1
target_scope:
type: object
additionalProperties: true
properties:
entra_tenant_id:
type: string
directory_context_id:
type: string
selection:
type: object
additionalProperties: true
properties:
kind:
type: string
enum: [ids, query]
ids:
type: array
items:
type: string
query:
type: object
additionalProperties: true
required: [operation_type, selection]
responses:
'202':
description: Enqueued or deduped to an existing active run
content:
application/json:
schema:
type: object
additionalProperties: true
properties:
operation_run_id:
type: integer
status:
type: string
enum: [queued, running]
view_run_url:
type: string
required: [operation_run_id, status]