Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/features/search-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,35 @@ The qualified Server 2.11.0 list API has **no built-in roots-only or children-on

Inspect the run's lineage when you need its actual parent/child relationship. Broader shared visibility filtering remains [product work](https://github.com/durable-workflow/.github/issues/224); this limitation and a user-authored metadata convention do not deliver that capability. The [verification receipt](https://github.com/durable-workflow/durable-workflow.github.io/issues/368#issuecomment-6362355504) preserves the observed parent-and-child result and rejected predicates.

## Repairing datetime search attributes {#repair-datetime-search-attributes}

The history-backed repair command requires an actually installed **Workflow 2.12.0 or newer**. Check `composer.lock` and `php artisan help workflow:v2:repair-search-datetimes` in the Laravel application that will run it. A source checkout or Composer constraint alone does not establish the installed command.

Datetime projections store UTC instants with microsecond precision: `2026-10-08T12:34:56.123456+02:00` is `2026-10-08T10:34:56.123456Z`. Earlier writers could persist the offset’s local wall time while retaining its offset in typed history. Upgrading prevents new writer errors but does not identify or rewrite old rows. Never infer an original timezone from the stored wall time.

Upgrade every projection writer and back up the workflow database first. Use the exact **run ID**, not a workflow instance ID. Start with a preview:

```sh
php artisan workflow:v2:repair-search-datetimes RUN_ID --namespace=production --json
php artisan workflow:v2:repair-search-datetimes RUN_ID --namespace=production --key=SubmittedAt --json
```

`--namespace=production` is an exact equality guard; use the run’s actual namespace. Omit it only when the exact run ID is sufficient, including legacy null namespaces; an empty explicit namespace is refused. Without `--key`, the selection covers that run’s datetime attributes. Repeat the option for known keys, such as `--key=SubmittedAt --key=ApprovedAt`.

Preview is the default. Review `examined`, `would_repair` and the exact run/key selection before explicitly applying the same selection:

```sh
php artisan workflow:v2:repair-search-datetimes RUN_ID --namespace=production --key=SubmittedAt --apply --json
```

Read the selected attributes and run summary back, then preview again. With unchanged evidence and already-correct values, a repeat apply reports zero repairs. A repaired subset does not establish that unselected keys are correct.

Repair requires the latest retained, explicitly typed `SearchAttributesUpserted` evidence for each key, with its original logical command sequence matching the projection. Pruned history, missing/stale evidence, timezone-ambiguous values, wrong namespace and selected keys no longer retained as datetime attributes refuse the operation. One unprovable key refuses the entire selection; inspect the history and select only proven keys instead of guessing an offset.

The command locks and validates the complete selection before updating derived attributes and their summary in one storage transaction. Authoritative history, business commands, run/task identities and leases remain unchanged. JSON failures distinguish `refused` from `unverified`: after an unexpected storage error, inspect the rows before retrying because an uncertain commit is not a guaranteed rollback.

This repairs derived search attributes and their summary; it does not restore pruned history or change authoritative input. The separate Server visibility-query binding path and Server image adoption require their own qualified delivery; a Core package tag does not establish an HTTP fix. See the [canonical recovery procedure](https://github.com/durable-workflow/workflow/blob/b3bbfdb5258c68546ae38ca1fde52818e4b05d12/docs/architecture/projection-timestamp-storage.md#datetime-search-attributes).

## Continue-as-New

When a workflow continues as new, the current search attributes are carried forward to the new run automatically. The new run starts with the full merged attribute map from the previous run and can continue upserting from there.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,35 @@ Die qualifizierte Listen-API von Server 2.11.0 hat **kein eingebautes Prädikat

Prüfen Sie die Abstammung des Laufs, wenn Sie seine tatsächliche Eltern-/Kindbeziehung benötigen. Umfassendere gemeinsame Sichtbarkeitsfilter bleiben [Produktarbeit](https://github.com/durable-workflow/.github/issues/224). Diese Einschränkung und eine vom Nutzer definierte Metadatenkonvention liefern diese Fähigkeit nicht. Der [Prüfbericht](https://github.com/durable-workflow/durable-workflow.github.io/issues/368#issuecomment-6362355504) bewahrt das Ergebnis mit Elternlauf und Kind sowie die abgewiesenen Prädikate.

## Datetime-Suchattribute reparieren {#repair-datetime-search-attributes}

Der historiengestützte Reparaturbefehl benötigt **tatsächlich installiertes Workflow 2.12.0 oder neuer**. Prüfen Sie `composer.lock` und `php artisan help workflow:v2:repair-search-datetimes` in der ausführenden Laravel-Anwendung. Ein Quellcheckout oder eine Composer-Vorgabe allein belegt keinen installierten Befehl.

Datetime-Projektionen speichern UTC-Zeitpunkte mit Mikrosekunden: `2026-10-08T12:34:56.123456+02:00` entspricht `2026-10-08T10:34:56.123456Z`. Frühere Writer konnten die lokale Uhrzeit des Offsets speichern, obwohl der Offset in typisierter Historie erhalten blieb. Ein Upgrade verhindert neue Writer-Fehler, identifiziert oder korrigiert alte Zeilen aber nicht. Leiten Sie die ursprüngliche Zeitzone niemals aus der gespeicherten Uhrzeit ab.

Aktualisieren Sie zuerst sämtliche Projektions-Writer und sichern Sie die Workflow-Datenbank. Verwenden Sie die **exakte Run-ID**, keine Workflow-Instanz-ID. Beginnen Sie mit einer Vorschau:

```sh
php artisan workflow:v2:repair-search-datetimes RUN_ID --namespace=production --json
php artisan workflow:v2:repair-search-datetimes RUN_ID --namespace=production --key=SubmittedAt --json
```

`--namespace=production` prüft exakte Gleichheit; verwenden Sie den tatsächlichen Namespace des Runs. Lassen Sie die Option nur weg, wenn die genaue Run-ID genügt, auch bei alten Null-Namespaces; ein ausdrücklich leerer Namespace wird abgelehnt. Ohne `--key` werden die Datetime-Attribute dieses Runs ausgewählt. Wiederholen Sie die Option für bekannte Schlüssel, etwa `--key=SubmittedAt --key=ApprovedAt`.

Standardmäßig erfolgt eine Vorschau. Prüfen Sie `examined`, `would_repair` und die genaue Run-/Schlüsselauswahl, bevor Sie dieselbe Auswahl ausdrücklich anwenden:

```sh
php artisan workflow:v2:repair-search-datetimes RUN_ID --namespace=production --key=SubmittedAt --apply --json
```

Lesen Sie ausgewählte Attribute und Run-Zusammenfassung erneut und wiederholen Sie die Vorschau. Bei unveränderten Nachweisen und korrekten Werten meldet ein wiederholtes Apply null Reparaturen. Ein reparierter Teil belegt nicht die Korrektheit ungewählter Schlüssel.

Jeder Schlüssel benötigt das letzte erhaltene, ausdrücklich typisierte `SearchAttributesUpserted` mit einer ursprünglichen logischen Befehlssequenz, die zur Projektion passt. Bereinigte Historie, fehlende/veraltete Nachweise, uneindeutige Zeitzonen, falscher Namespace und nicht mehr als Datetime erhaltene Schlüssel führen zur Ablehnung. Ein unbelegbarer Schlüssel lehnt die gesamte Auswahl ab; prüfen Sie die Historie und wählen Sie nur belegte Schlüssel, ohne Offsets zu erraten.

Der Befehl sperrt und validiert die gesamte Auswahl, bevor er abgeleitete Attribute und ihre Zusammenfassung in einer Speichertransaktion aktualisiert. Maßgebliche Historie, Geschäftsbefehle, Run-/Task-Identitäten und Leases bleiben unverändert. JSON-Fehler unterscheiden `refused` und `unverified`: Nach einem unerwarteten Speicherfehler prüfen Sie die Zeilen vor dem Wiederholen, denn ein unsicherer Commit garantiert keinen Rollback.

Repariert werden abgeleitete Suchattribute und ihre Zusammenfassung; bereinigte Historie wird nicht wiederhergestellt und maßgebliche Eingaben bleiben unverändert. Der separate Sichtbarkeitsabfrage-Bindungspfad des Servers und die Image-Übernahme benötigen eine eigene qualifizierte Lieferung; ein Core-Tag belegt keine HTTP-Korrektur. Siehe das [kanonische Wiederherstellungsverfahren](https://github.com/durable-workflow/workflow/blob/b3bbfdb5258c68546ae38ca1fde52818e4b05d12/docs/architecture/projection-timestamp-storage.md#datetime-search-attributes).

## Continue-as-new {#continue-as-new}

Bei Continue-as-new werden die aktuellen Suchattribute automatisch in den
Expand Down
2 changes: 1 addition & 1 deletion i18n/de/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"features/queries.md": "c66dd9542a062edd8158a46cebc9f1bf926aaf3599dca4a3122bd9860df6e2a2",
"features/sagas.md": "8dae955491a54bcbf545ce6972928df59f3885e00f98bf3a57b14dad98f89161",
"features/schedules.md": "73dd4d49bfb61d5ecafc0fb799136fc170d8cd33781ff00f40893efe4e0de0d6",
"features/search-attributes.md": "74bd53d45dcde40597d7eb2f6bda6cd88c3a773ccf6beed08cd3eeb542d39b0d",
"features/search-attributes.md": "607a37a0ff8ffcb111d07f33de7b9d2797d24567fb4da37014f604a62ce709b5",
"features/service-operations.md": "912131c0a8ef393040a933fb4a66e68abcb9d475a3ebd47c85287d4032f45a0e",
"features/side-effects.md": "abdccab8d6fc1a12b3eff8a4ccc58730ac36f523559b4ad89c5c2a8d201a3b86",
"features/signal+timer.md": "65b4a78b9e90a845297b1cb12591dd26a6573f76c75717e1e4ba02211c590822",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,35 @@ La API de listado del Server 2.11.0 verificada **no tiene un predicado integrado

Inspeccione el linaje de la ejecución cuando necesite la relación real padre/hijo. La filtración compartida más amplia sigue siendo [trabajo de producto](https://github.com/durable-workflow/.github/issues/224); esta limitación y una convención de metadatos del usuario no entregan esa capacidad. La [verificación](https://github.com/durable-workflow/durable-workflow.github.io/issues/368#issuecomment-6362355504) conserva el resultado con padre e hijo y los predicados rechazados.

## Reparar atributos de búsqueda datetime {#repair-datetime-search-attributes}

El comando de reparación basado en historial exige **Workflow 2.12.0 o posterior realmente instalado**. Comprueba `composer.lock` y `php artisan help workflow:v2:repair-search-datetimes` en la aplicación Laravel que lo ejecutará. Un checkout de fuentes o una restricción Composer no demuestra que el comando esté instalado.

Las proyecciones datetime guardan instantes UTC con microsegundos: `2026-10-08T12:34:56.123456+02:00` equivale a `2026-10-08T10:34:56.123456Z`. Los writers anteriores podían guardar la hora local del offset y conservar ese offset en el historial tipado. Actualizar evita nuevos errores del writer, pero no identifica ni reescribe filas antiguas. Nunca deduzcas la zona original de la hora almacenada.

Actualiza primero todos los writers de proyecciones y respalda la base de datos del workflow. Usa el **ID exacto del run**, no el de la instancia de workflow. Empieza con una vista previa:

```sh
php artisan workflow:v2:repair-search-datetimes RUN_ID --namespace=production --json
php artisan workflow:v2:repair-search-datetimes RUN_ID --namespace=production --key=SubmittedAt --json
```

`--namespace=production` es una comprobación de igualdad exacta; usa el namespace real del run. Omítelo solo si basta el ID exacto, incluidos namespaces null antiguos; un valor explícito vacío se rechaza. Sin `--key`, se seleccionan los atributos datetime de ese run. Repite la opción para claves conocidas, como `--key=SubmittedAt --key=ApprovedAt`.

La vista previa es el modo predeterminado. Revisa `examined`, `would_repair` y la selección exacta de run/claves antes de aplicar explícitamente esa misma selección:

```sh
php artisan workflow:v2:repair-search-datetimes RUN_ID --namespace=production --key=SubmittedAt --apply --json
```

Vuelve a leer los atributos seleccionados y el resumen del run; repite después la vista previa. Con evidencia sin cambios y valores correctos, repetir apply informa cero reparaciones. Reparar un subconjunto no demuestra que las claves no seleccionadas sean correctas.

Cada clave exige el último upsert retenido y explícitamente tipado `SearchAttributesUpserted`, cuya secuencia lógica original del comando coincida con la proyección. Historial podado, evidencia ausente/obsoleta, zona horaria ambigua, namespace incorrecto o claves que ya no se conservan como datetime rechazan la operación. Una clave sin prueba rechaza toda la selección; inspecciona el historial y selecciona solo claves demostrables, sin adivinar un offset.

El comando bloquea y valida toda la selección antes de actualizar atributos derivados y su resumen en una transacción de almacenamiento. No cambia historial autoritativo, comandos de negocio, identidades de run/tarea ni leases. Los fallos JSON distinguen `refused` y `unverified`: tras un error inesperado de almacenamiento, inspecciona las filas antes de reintentar porque un commit incierto no garantiza rollback.

Repara atributos derivados y su resumen; no restaura historial podado ni cambia input autoritativo. El binding de consultas de visibilidad del Server y la adopción en su imagen requieren su propia entrega cualificada; un tag Core no demuestra una corrección HTTP. Consulta el [procedimiento canónico](https://github.com/durable-workflow/workflow/blob/b3bbfdb5258c68546ae38ca1fde52818e4b05d12/docs/architecture/projection-timestamp-storage.md#datetime-search-attributes).

## Continuar como nueva ejecución {#continue-as-new}

Los atributos actuales pasan automáticamente a la nueva ejecución. Esta comienza con el mapa combinado completo de la anterior y puede seguir actualizándolo.
Expand Down
2 changes: 1 addition & 1 deletion i18n/es/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"features/queries.md": "c66dd9542a062edd8158a46cebc9f1bf926aaf3599dca4a3122bd9860df6e2a2",
"features/sagas.md": "8dae955491a54bcbf545ce6972928df59f3885e00f98bf3a57b14dad98f89161",
"features/schedules.md": "73dd4d49bfb61d5ecafc0fb799136fc170d8cd33781ff00f40893efe4e0de0d6",
"features/search-attributes.md": "74bd53d45dcde40597d7eb2f6bda6cd88c3a773ccf6beed08cd3eeb542d39b0d",
"features/search-attributes.md": "607a37a0ff8ffcb111d07f33de7b9d2797d24567fb4da37014f604a62ce709b5",
"features/service-operations.md": "912131c0a8ef393040a933fb4a66e68abcb9d475a3ebd47c85287d4032f45a0e",
"features/side-effects.md": "abdccab8d6fc1a12b3eff8a4ccc58730ac36f523559b4ad89c5c2a8d201a3b86",
"features/signal+timer.md": "65b4a78b9e90a845297b1cb12591dd26a6573f76c75717e1e4ba02211c590822",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,35 @@ L’API de liste qualifiée de Server 2.11.0 **n’a pas de prédicat intégré

Examinez la filiation de l’exécution pour connaître sa relation parent/enfant réelle. Le filtrage partagé plus large reste un [travail produit](https://github.com/durable-workflow/.github/issues/224) ; cette limitation et une convention de métadonnées définie par l’utilisateur ne livrent pas cette capacité. La [vérification](https://github.com/durable-workflow/durable-workflow.github.io/issues/368#issuecomment-6362355504) conserve le résultat contenant parent et enfant ainsi que les prédicats refusés.

## Réparer les attributs de recherche datetime {#repair-datetime-search-attributes}

La commande de réparation fondée sur l’historique exige **Workflow 2.12.0 ou ultérieur réellement installé**. Vérifiez `composer.lock` et `php artisan help workflow:v2:repair-search-datetimes` dans l’application Laravel qui l’exécutera. Un checkout des sources ou une contrainte Composer ne prouve pas que la commande est installée.

Les projections datetime stockent des instants UTC avec microsecondes : `2026-10-08T12:34:56.123456+02:00` représente `2026-10-08T10:34:56.123456Z`. Les anciens writers pouvaient enregistrer l’heure locale du décalage tout en conservant celui-ci dans l’historique typé. La mise à niveau évite de nouvelles erreurs du writer, mais n’identifie ni ne réécrit les anciennes lignes. Ne déduisez jamais le fuseau initial de l’heure stockée.

Mettez d’abord à niveau tous les writers de projections et sauvegardez la base du workflow. Utilisez l’**ID exact du run**, pas celui de l’instance de workflow. Commencez par un aperçu :

```sh
php artisan workflow:v2:repair-search-datetimes RUN_ID --namespace=production --json
php artisan workflow:v2:repair-search-datetimes RUN_ID --namespace=production --key=SubmittedAt --json
```

`--namespace=production` impose une égalité exacte ; indiquez le vrai namespace du run. Omettez-le seulement lorsque l’ID exact suffit, y compris pour les anciens namespaces null ; une valeur explicite vide est refusée. Sans `--key`, la sélection couvre les attributs datetime du run. Répétez l’option pour les clés connues, comme `--key=SubmittedAt --key=ApprovedAt`.

L’aperçu est le mode par défaut. Examinez `examined`, `would_repair` et la sélection exacte run/clés avant d’appliquer explicitement cette même sélection :

```sh
php artisan workflow:v2:repair-search-datetimes RUN_ID --namespace=production --key=SubmittedAt --apply --json
```

Relisez les attributs sélectionnés et le résumé du run, puis relancez l’aperçu. Si les preuves sont inchangées et les valeurs correctes, répéter apply indique zéro réparation. Un sous-ensemble réparé ne prouve pas que les clés non sélectionnées sont correctes.

Chaque clé nécessite le dernier upsert conservé et explicitement typé `SearchAttributesUpserted`, dont la séquence logique initiale de commande correspond à la projection. Historique purgé, preuves absentes/périmées, fuseau ambigu, mauvais namespace ou clés qui ne sont plus conservées comme datetime entraînent un refus. Une seule clé non démontrable refuse toute la sélection ; inspectez l’historique et sélectionnez uniquement les clés prouvées, sans deviner de décalage.

La commande verrouille et valide toute la sélection avant de mettre à jour les attributs dérivés et leur résumé dans une transaction de stockage. Historique faisant autorité, commandes métier, identités run/tâche et leases restent inchangés. Les échecs JSON distinguent `refused` et `unverified` : après une erreur de stockage inattendue, inspectez les lignes avant de réessayer, car un commit incertain ne garantit pas un rollback.

Cette procédure répare les attributs dérivés et leur résumé ; elle ne restaure pas l’historique purgé et ne modifie pas l’input faisant autorité. Le binding des requêtes de visibilité du Server et l’adoption dans son image exigent leur propre livraison qualifiée ; un tag Core ne prouve pas une correction HTTP. Consultez la [procédure canonique](https://github.com/durable-workflow/workflow/blob/b3bbfdb5258c68546ae38ca1fde52818e4b05d12/docs/architecture/projection-timestamp-storage.md#datetime-search-attributes).

## Continuation dans une nouvelle exécution {#continue-as-new}

Lors d’une continuation, les attributs courants sont automatiquement transmis à la nouvelle exécution. Celle-ci démarre avec la table fusionnée complète de la précédente et peut continuer à la modifier.
Expand Down
2 changes: 1 addition & 1 deletion i18n/fr/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"features/queries.md": "c66dd9542a062edd8158a46cebc9f1bf926aaf3599dca4a3122bd9860df6e2a2",
"features/sagas.md": "8dae955491a54bcbf545ce6972928df59f3885e00f98bf3a57b14dad98f89161",
"features/schedules.md": "73dd4d49bfb61d5ecafc0fb799136fc170d8cd33781ff00f40893efe4e0de0d6",
"features/search-attributes.md": "74bd53d45dcde40597d7eb2f6bda6cd88c3a773ccf6beed08cd3eeb542d39b0d",
"features/search-attributes.md": "607a37a0ff8ffcb111d07f33de7b9d2797d24567fb4da37014f604a62ce709b5",
"features/service-operations.md": "912131c0a8ef393040a933fb4a66e68abcb9d475a3ebd47c85287d4032f45a0e",
"features/side-effects.md": "abdccab8d6fc1a12b3eff8a4ccc58730ac36f523559b4ad89c5c2a8d201a3b86",
"features/signal+timer.md": "65b4a78b9e90a845297b1cb12591dd26a6573f76c75717e1e4ba02211c590822",
Expand Down
Loading
Loading