# http4s: preserve requirements through advanced agent edits - [Release http4s response resources after success or decoding failure](https://frameworkrecipes.dev/http4s/client-response-resource/guide.md): http4s client responses are Resources because their body streams and connections need finalization. Converting a Resource to an allocated pair transfers cleanup responsibility to the caller. Discarding that finalizer can exhaust the connection pool. - [http-response-resource-release rule pack](https://reporules.fyi/http4s/client-response-resource/rule-pack.zip): YAML requirement and agent task. - [Keep a doobie reservation and order insert in one transaction](https://frameworkrecipes.dev/http4s/doobie-conditional-reservation/guide.md): doobie ConnectionIO composes statements on one connection when the combined action is transacted. Checking the affected-row count inside that action ensures insufficient stock aborts before order creation and rolls back any prior write. - [failed-stock-check-prevents-insert rule pack](https://reporules.fyi/http4s/doobie-conditional-reservation/rule-pack.zip): YAML requirement and agent task. - [Framework rule pack](https://reporules.fyi/http4s/rule-pack.zip): All requirements from this framework site.