Map payload fields by example, from a real captured event #454

Closed
opened 2026-10-27 13:36:23 +00:00 by sam · 0 comments
Owner

Pick a captured event, click through its payload, and bind JSON paths to named fields the workflow will receive. Schema by example, not schema by specification.

The hard part is not the happy path, it is drift. A mapping authored against one payload will eventually meet a payload where the path is missing, null, or a different type -- the sending app shipped a change nobody told you about. That must fail LOUDLY and land somewhere the operator sees, not silently pass an empty string into an agent prompt. An agent handed a blank field will confabulate around it, which turns a schema change into an agent doing confident nonsense in a repo.

Support a preview: given this mapping and this captured event, show exactly what the workflow would receive. Never ship a mapping the operator has not seen resolve against real data.

Acceptance criteria

Fields are mappable from a captured payload without writing code; a mapping preview resolves against a real event before saving; a missing, null or type-changed path at runtime produces a visible failure rather than an empty value; the failure names the path and the event.

Close reason

Payload field mapping: domain (internal/domain/mapping), SQLite store (internal/store/mappings.go), HTTP API (internal/webui/api_mapping.go), and dashboard editor (ui/src/mappings) shipped. PRD at docs/prds/payload-field-mapping.md. task check green; adversarial review found 4 issues (stale preview after rename, duplicate field names, hardcoded capture scan window, malformed path silently reinterpreted), all fixed and re-verified.


Imported from beads archie-core-t2db.3 · GitHub #540 · type feature · priority P1 · created 2026-08-21 · closed 2026-08-22

Pick a captured event, click through its payload, and bind JSON paths to named fields the workflow will receive. Schema by example, not schema by specification. The hard part is not the happy path, it is drift. A mapping authored against one payload will eventually meet a payload where the path is missing, null, or a different type -- the sending app shipped a change nobody told you about. That must fail LOUDLY and land somewhere the operator sees, not silently pass an empty string into an agent prompt. An agent handed a blank field will confabulate around it, which turns a schema change into an agent doing confident nonsense in a repo. Support a preview: given this mapping and this captured event, show exactly what the workflow would receive. Never ship a mapping the operator has not seen resolve against real data. ### Acceptance criteria Fields are mappable from a captured payload without writing code; a mapping preview resolves against a real event before saving; a missing, null or type-changed path at runtime produces a visible failure rather than an empty value; the failure names the path and the event. ### Close reason Payload field mapping: domain (internal/domain/mapping), SQLite store (internal/store/mappings.go), HTTP API (internal/webui/api_mapping.go), and dashboard editor (ui/src/mappings) shipped. PRD at docs/prds/payload-field-mapping.md. task check green; adversarial review found 4 issues (stale preview after rename, duplicate field names, hardcoded capture scan window, malformed path silently reinterpreted), all fixed and re-verified. --- _Imported from beads `archie-core-t2db.3` · GitHub #540 · type feature · priority P1 · created 2026-08-21 · closed 2026-08-22_
sam added the highfeature labels 2026-10-27 13:36:23 +00:00
sam self-assigned this 2026-10-27 13:36:23 +00:00
sam closed this issue 2026-10-27 13:36:24 +00:00
sam added a new dependency 2026-10-27 13:42:04 +00:00
sam added a new dependency 2026-10-27 13:42:04 +00:00
sam added a new dependency 2026-10-27 13:42:04 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#454