From 954e25c7f2d86b8be55405ab69027a32115b851a Mon Sep 17 00:00:00 2001 From: eunhhu Date: Sun, 27 Sep 2026 08:22:21 +0100 Subject: Check a payments API's answers coming back as events exactly once A Python payments API answers 200 or 402 and repeats a key's first answer; the sender's output is wired to it and its answers to the charged input. With the sender killed (-9) while clients buy, the app's paid and declined counts and paid total match the API's answers one per key. The language notes say how answers arrive. --- docs/design/001-language-v0.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs') diff --git a/docs/design/001-language-v0.md b/docs/design/001-language-v0.md index 0f95500..3fe9ff8 100644 --- a/docs/design/001-language-v0.md +++ b/docs/design/001-language-v0.md @@ -123,6 +123,9 @@ on edit { `send 이름 { 필드: 값, 그룹: { 필드: 값 } }`으로 모든 필드를 한 번씩 주어 보낸다. 보냄은 이벤트의 일부라서 이벤트가 실패하면 보내지 않았고, 호스트는 저장된 보냄만 전한다. 무엇이 받는지는 앱 밖(호스트의 배선)이 정한다. 받는 앱은 같은 메시지를 여러 번 받아도 한 번만 적용한다(Pure `docs/research/078-app-connections.md`). 출력에는 핸들러가 없다. +- 외부 API의 응답은 보통의 메시지 입력으로 받는다. 호스트가 출력의 응답을 그 입력에 이으면(`pure-serve --reply 출력=입력`), + 필드는 응답 JSON에서, 응답에 없는 필드는 보낸 메시지의 같은 이름 필드에서, `http_status: u32`는 상태 코드로 채워진다 + (Pure `docs/research/083-delivery-over-http.md`). - `이름[key]`는 그 메시지 키의 문서다. 읽으면 bytes, `.bytes`는 크기(없으면 0)다. 없는 문서를 읽으면 `not_found`. - `replace(a .. b, 값)`는 문서의 `[a, b)`를 바꾼다. 정수가 아니거나 범위 밖이면 이벤트가 `limit`으로 실패한다. - `require 조건`이 거짓이면 이벤트가 `limit`으로 실패한다. 크기 정책처럼 저장소의 특수 인자였던 것이 문장 하나가 된다. -- cgit v1.2.3