Build and check a daw_event_response/v1 for a decision_required event #21
Labels
No labels
coordination/cross-repo
coordination/needed
effort
large
effort
medium
effort
small
meta/duplicate
meta/planning
meta/wontfix
priority
high
priority
low
priority
medium
session
blocker
session
handover
session
next
status
blocked
status
done
status
in-progress
status
review
status
to-go
type
admin
type
bug
type
config
type
deployment
type
docs
type/documentation
type
enhancement
type
feature
type
handover
type
infrastructure
type
installation
type
maintenance
type
migration
type/refactor
type
research
type
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DAW/daw-modul-berhtjan-core#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
A module asks a question by emitting a
daw_event/v1(decision_required).The answer comes back as
daw_event_response/v1, correlated byevent_idand
operation_id. Every adapter (cli, web, api) needs the same two steps:build the response from the event, and check the given value against the
field the module declared with
daw_field_type/v1. berhtjan-core has thefield type registry and
compose(), but nothing to build or check aresponse. Common to all adapters, so it belongs in core.
First use case: yes/no confirmation before a module is removed
(DAW/daw-module-manager), declared as a
selection/static/singlefield with two answers.
Scope
daw_event_response/v1|daw_error/v1event_idandoperation_idare copied from the event, never generatedonly (
cardinality,acquisition[].kind,collection.source); neverswitch on the open
value.kindselectionwithstaticvalues (the value must be one ofthe declared ones, cardinality respected); other combinations are
out of scope and return a
daw_error/v1daw_error/v1, oneresource_idper error siteinput to a value itself
Provisional (marked as such until validated)
data.answerof the event, the valuein
data.valueof the response;daw_event/v1anddaw_event_response/v1do not fix this yetcollection.valuesentries (object withvalue,message,resource_id), see the companion issue in DAW/daw-contractsA contract proposal follows after the first validation.
Acceptance criteria
daw_i18n/v1resources,resource_idper error sitefragjan code .andmake test(Lua 5.1 and 5.4) passRelated
DAW/daw-contracts (
daw_event/v1,daw_event_response/v1,daw_field_type/v1),DAW/daw-modul-berhtjan-cli#14, DAW/fragjan#137
Cross references
value to this function)
collection.valuesentries); the object form used here is provisional until it is decided
Implemented on main
Commits:
92dc194Pushed. Follow-up points, if any, are tracked in their own issues.