Skip to content

feat: add opt-in loopback webhook hints with at-most-once epochs - #133

Merged
OBenner merged 2 commits into
mainfrom
codex/117-webhook-nudge
Nov 17, 2026
Merged

OBenner merged 2 commits into
mainfrom
codex/117-webhook-nudge

Conversation

@OBenner

@OBenner OBenner commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Adds an operator-enabled loopback webhook for newly committed message hints. Configure webhooks: {enabled: true, url: ...} only in gitignored synloq.local.yaml; shared manifests reject the field. Send/reply dedup replays emit nothing, and exporter failures never change durable send/ACK results.

Implements the final architecture contract: one HTTP attempt per event with no retries, reservation before network, five-minute recipient epochs reset only by an actually empty unacknowledged backlog. Payload contains only fixed identifiers, reservation timestamp and relay boot UUID. Numeric loopback, explicit port, own-relay-port rejection, no redirects/DNS/proxy/auth headers; TLS verification stays enabled. Queue/rate/deadline bounds and saturated counters prevent an exporter failure from creating an audit flood. Doctor exposes a bounded historical counter snapshot with observation time.

Validation: full pnpm verify PASS (122 files / 1084 tests), git diff --check PASS. New tests cover real HTTP transport, payload/header hygiene, absolute timeout/abort, post-commit send/reply observation, dedup and observer failure, delivered-but-unacknowledged epochs, rate/audit limits, shutdown and doctor snapshots.

Refs #117. The design document is included with the implementation. Explicit v1 non-goals: remote endpoints, lifecycle startup/rebound events, raw-token configuration, multiple endpoints and delivery guarantees. One unauthenticated local hint endpoint; no dependencies, relay wire changes, DB migrations, live endpoint activation or Claude stand changes. Publication requires operator approval; merge remains with CTO.

@OBenner OBenner left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final architecture review (arch) — ACCEPT for the wire/contract surface (PR #133, HEAD e213e6e).

Reviewed src/relay/webhook-nudger.ts in full against the final v1.1 contract (strict at-most-once, single HTTP attempt per reserved event, epoch reservation before any network work incl. cap-dropped events, 5-minute debounced epochs with reset only on actually-empty backlog, identifier-only 8-field payload, loopback-only literal addresses with deny-own-port, outcome telemetry never a delivery claim, bounded rate/audit per security M1/M4/M5/M6). Implementation matches the contract point by point; the docs commit e213e6e honestly records the at-most-once correction and the dropped-epoch semantics.

Design doc docs/design/2026-11-17-webhook-nudge.md is present in this PR as agreed (docs-with-code). Explicit v1 non-goals (remote URL, startup/session_rebound events, token authentication) are recorded with return triggers — nothing silently dropped.

No wire/protocol/schema changes; no new dependencies; verify 122 files / 1084 tests + build green. Ready for CTO final. (Self-approve is unavailable from this account; verdict recorded as COMMENT per our convention.)

@OBenner
OBenner merged commit 38f9ff9 into main Nov 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant