ADR-007: Approval Step and Publishing Through a Webhook
- Status
-
Accepted
- Date
-
2026-09-26
- Authors
-
Netresearch DTT GmbH
Context
Every artifact is AI-generated. Before a post goes out under the company's name, a person should have looked at it and said yes. The social posts are the one format this extension could put on a network itself, at a planned time.
Posting to LinkedIn, X or Instagram directly needs an app registration and an OAuth grant per network and per account, and every network changes its API on its own schedule. Which networks and whose accounts is not a decision the extension can make.
Decision
An approval state on every artifact. review_ (open, approved,
rejected) with reviewed_ and reviewed_ on the artifact row. Users
whose groups grant the custom permission nrrepurpose: (and
administrators) approve or reject a finished artifact in the result view. The
state has a reader: only an approved social post can be scheduled, and the
publishing command sends only approved posts.
Scheduling on the artifact, publishing by a schedulable command.
publish_ and publish_ (scheduled, publishing, published, failed)
on the row. nr_ sends every approved post whose time
has come. It claims a post with one conditional update (scheduled → publishing)
before sending, so two runs at the same time cannot send it twice. A refused
post becomes failed with the channel's reason and stays failed until an editor
schedules it again.
The channel is a webhook. Social has one
implementation, Webhook: an HTTP POST of the post as JSON
(platform, text, publishing time, source URL without user name and password,
ai and the artifact's ai) to the URL in social, optionally signed
with HMAC-SHA256 in X-. A scheduling tool, an
automation service or an own endpoint takes it from there. Without a URL the
command sends nothing and says how many posts are due.
Regenerating a job starts over. The generator deletes a job's artifacts before it runs again, and with them their review and schedule.
Consequences
- ● No network credentials in the extension; the network is chosen where the
- webhook ends.
- ● A post carries its AI label into the channel (
ai,Generated ai), so the receiving side can disclose it.Label
◐ Publishing is as punctual as the scheduler runs the command.
- ◐ The review of an image, a PDF or a podcast is recorded but has no reader
- yet; it documents the decision for the editor's team.
- ✕ Direct posting to a network needs its own
SocialPublisher Interface - implementation with that network's credentials.