Source: https://frameworkrecipes.dev/echo/

# Echo: preserve requirements through advanced agent edits

Work through Go examples of real application boundaries: Prevent privileged-field binding in an Echo profile mutation; Carry Echo cancellation through to the database query. Each recipe includes implementation code, integration prerequisites, failure-path tests to add, a Perch rule, and the captured broken/fixed source checks.

[Download the Echo rule pack ZIP](https://reporules.fyi/echo/rule-pack.zip) · [Inspect the YAML rules](https://reporules.fyi/echo/rules.yaml)

Go

## [Prevent privileged-field binding in an Echo profile mutation](https://frameworkrecipes.dev/echo/explicit-profile-dto/)

Binding an HTTP body directly into a business model can expose fields the form never displayed. A dedicated DTO plus explicit mapping makes the mutable fields visible. The regression here is an agent extending the mapper with a privileged assignment.

Broken edit flagged · corrected edit passes

Go

## [Carry Echo cancellation through to the database query](https://frameworkrecipes.dev/echo/request-context-database/)

A response timeout does not automatically stop a database query that never receives its context. Thread the request context through the adapter and select a database driver that supports cancellation. Do not substitute context.Background inside request-owned operations.

Broken edit flagged · corrected edit passes

## Use a correction as a saved requirement

Choose the failure you need to prevent, add the scoped rule to your repository, and check both the broken and corrected implementation. Ask your agent to inspect the finding, repair the code and recheck the same rule. Keep framework tests beside the model check.

Perch keeps the requirement beside the code. Reuse the named check during the agent’s next edit and in CI, with cached answers free on unchanged requests.

[Official Echo documentation](https://echo.labstack.com/docs/) · [All language and framework recipes](https://frameworkrecipes.dev/)

**Framework Recipes**

Implementation, failure path, check.

Published by Perch · © 2026 Verglas LLC. Framework Recipes is a Perch publication.

Perch’s MIT license covers the CLI; hosted model analysis is a paid service. Relevant source is sent to the configured model service.

[Perch CLI MIT license](https://github.com/lakeday-org/perch/blob/main/LICENSE) · [Article text](https://frameworkrecipes.dev/echo/index.md) · [Resource index](https://frameworkrecipes.dev/llms.txt)
