Skip to content

Should DriftWarn observe middleware-written responses? #73

Description

@FumingPower3925

Today recovery- and auth-middleware-written responses (the recovery 500, an outer 401) are structurally invisible to DriftWarn: it wraps the mux directly, so the chain always sits outside it. A retrofit persona hit this — their 2016-era recovery middleware writes text/plain 500s that no drift check ever sees, and there is no wiring that fixes it.

This is the one adopter wish that closes a hole in an existing promise ("compares what handlers actually do") rather than adding a knob. But it needs new API — something like a second constructor taking the wrapped chain plus the mux for contracts — and design answers first: which contracts apply to a middleware-written status, does pattern resolution still hold when the response never came from a route, and does the auto-401 count. Parked deliberately; revisit only with real-user demand once the repo is public.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions