60 lines
2.2 KiB
Markdown
60 lines
2.2 KiB
Markdown
---
|
|
id: pg-fix-forwarder-diagnosability
|
|
name: Surface the forwarder's swallowed connect/poll failures (review 004 item 7 arms)
|
|
status: pending
|
|
depends_on: [decide-log-facade-adoption, pg-fix-forwarder-hardening]
|
|
scope: narrow
|
|
risk: low
|
|
impact: component
|
|
level: implementation
|
|
tags: [review-004-fixes, postgres-engine, forwarder]
|
|
---
|
|
|
|
## Description
|
|
|
|
The two narrow diagnosability arms in the pg forwarder, per
|
|
`docs/reviews/004-pre-release-general-review.md` §"Findings recorded,
|
|
not fixed" item 7: the reconnect arm's connect failures are swallowed
|
|
with `.ok()` (`forwarder.rs:839` — the review's ref; re-locate) and
|
|
the loop's exit discards the poll error (`forwarder.rs:855-869`) — an
|
|
operator sees nothing before wake loss.
|
|
|
|
Fix: surface both failures. The *output form* follows the
|
|
log-facade decision of record (`decide-log-facade-adoption`): through
|
|
the adopted facade, or through the documented `eprintln!` discipline
|
|
if the decision declined adoption. The error content must stay
|
|
secret-free (no DSN/password material — the standing verified
|
|
property; re-grep after).
|
|
|
|
Sequenced after `pg-fix-forwarder-hardening` deliberately: same file,
|
|
and the hardening's restructure may move the reconnect arm and the
|
|
loop-exit path this task touches.
|
|
|
|
## Acceptance Criteria
|
|
|
|
- [ ] Failed reconnect connects are surfaced (not `.ok()`-swallowed)
|
|
with enough context to diagnose (error class, attempt/backoff
|
|
state — no endpoint credentials)
|
|
- [ ] The loop's exit path surfaces the poll error instead of
|
|
discarding it
|
|
- [ ] The output form matches the log-facade decision of record; the
|
|
secret-free property re-verified by grep
|
|
- [ ] Existing forwarder tests green unchanged; the hardening task's
|
|
new pins green
|
|
- [ ] `cargo test -p alkstore-postgres` (harness server), clippy
|
|
`-D warnings`, fmt clean; workspace gates green server-less
|
|
|
|
## References
|
|
|
|
- docs/reviews/004-pre-release-general-review.md §"Findings recorded,
|
|
not fixed" item 7 (the finding, the swallowed-error sites)
|
|
- tasks/decide-log-facade-adoption.md (the output-form decision)
|
|
- tasks/pg-fix-forwarder-hardening.md (the same-file sequencing)
|
|
|
|
## Notes
|
|
|
|
> To be filled by implementation agent
|
|
|
|
## Summary
|
|
|
|
> To be filled on completion |