---
title: "ADR-047: Contain failed hook diagnostic writes"
manual: "Secrets Vault"
version: "main"
permalink: "https://docs.typo3.org/permalink/netresearch/nr-vault:adr-047-hook-diagnostic-containment@main"
source: "Developer/Adr/ADR-047-HookDiagnosticContainment.rst"
rendered: "2026-10-31T22:32:37+00:00"
---

# ADR-047: Contain failed hook diagnostic writes {#adr-047-hook-diagnostic-containment}

## Status {#status}

Proposed

## Date {#date}

2026-10-10

## Context {#context}

The cause-independent hook reporter sends a server-side diagnostic before
returning a correlated message to the editor.
A failing PSR-3 writer instead propagates its own exception.
An actual public FlexForm copy counterexample proves this can interrupt clone
compensation before the column's references are cleared.
This is the diagnostic-provider boundary left open by ADR046.

## Decision {#decision}

Attempt the existing PSR-3 error write once and contain its Throwable failures.
Return the same sanitized, cause-independent user diagnostic so callers can
continue their existing refusal or compensation.
Keep accepted server records unchanged and avoid recursive fallback logging.

This boundary concerns secondary diagnostics.
Required Vault mutation auditing, storage and permission failures keep their
existing propagation and compensation contracts.
A failed clone deletion remains a failed deletion; containing its diagnostic
writer allows reference clearing to continue, not a claim of atomic rollback.

## Consequences {#consequences}

A correlation reference still identifies the attempted diagnostic, but a failed
writer may leave no corresponding server record.
Neither an attempt nor a returned user message proves diagnostic delivery.
Core record logs and language-service failures remain distinct boundaries.
There is no new public signature, database schema or fallback writer.

## Related decisions {#related-decisions}

-   [ADR-046: Compensate failed final FlexForm copy links](https://docs.typo3.org/permalink/netresearch/nr-vault:adr-046-flexform-copy-link-compensation@main)
-   [ADR-036: Mutation and audit are all-or-nothing](https://docs.typo3.org/permalink/netresearch/nr-vault:adr-036-mutation-audit-atomicity@main)
