Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions .github/workflows/drift-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,13 @@ name: drift check
# ห้าม generate · ห้าม commit · ห้าม deploy · ห้ามเรียก service อื่นนอกจาก raw.githubusercontent.com

on:
# ไม่มี paths: filter โดยเจตนา — check นี้เป็น required check ของ branch protection
# และ required check ที่ไม่ทำงานจะไม่รายงานผล ทำให้ PR ค้างที่
# "Expected — waiting for status to be reported" โดยไม่มีทางไปต่อ
# PR ที่แตะแค่ decisions/ หรือ ref/ จะติดกับดักนั้นพอดี ซึ่งเป็น PR ส่วนใหญ่ของ repo นี้
push:
branches: [main]
paths:
- 'contracts/**'
- 'profiles/**'
- 'architecture/consumers.md'
- 'conformance/**'
- '.github/workflows/drift-check.yml'
pull_request:
paths:
- 'contracts/**'
- 'profiles/**'
- 'architecture/consumers.md'
- 'conformance/**'
schedule:
# ทุกวัน 02:00 UTC — จับกรณีที่ repo ต้นทางขยับ semantics_version
# โดยที่ไม่มีอะไรใน repo นี้เปลี่ยน ซึ่ง push/PR trigger จับไม่ได้
Expand Down
16 changes: 16 additions & 0 deletions contracts/event/v1/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# event/v1

## v1.7.0 — 2026-08-22

`EventType` +1 — **`JOB_SETTLED`**

[RFC-0012](https://github.com/monthop-gmail/devfactory-core/blob/main/rfcs/0012-terminal-closing-record.md) กำหนดว่าทุกการจบแบบ terminal ต้องออกใบปิดท้าย · v1.6.1 รับ guarantee นั้นมาแล้ว (`semantics_version` `1.2`) แต่ค่าที่ใช้ยังไม่อยู่ใน `$defs.EventType`

`description` ของ `$defs` นั้นเขียนเองว่ามีไว้ **"ให้ consumer generate constant ของค่าที่ platform รับรองความหมาย"** — ค่าที่มี guarantee ผูกอยู่แต่ไม่อยู่ในลิสต์ ทำให้ consumer ที่ generate constant ไม่มีมันและต้อง hardcode string เอง

### ไม่ breaking · ไม่มีอะไรรอมันอยู่

`event_type` อ้าง `EventTypeName` (ชุดเปิด) มาตั้งแต่ v1.2.0 → payload ที่ใช้ `JOB_SETTLED` **validate ผ่านตั้งแต่ก่อน PR นี้** · การเพิ่มค่าเป็น additive ตาม [ADR-0006 Rule 2](../../../decisions/0006-contract-versioning.md) และ RFC-0009

### ไม่มีข้อยกเว้นให้ `COMPLETED`

`COMPLETED` ออกทั้ง `JOB_COMPLETED` และ `JOB_SETTLED` · สองใบตอบคนละคำถาม — งานถูกส่งมอบไหม vs บันทึกจบหรือยัง · ถ้ายกเว้นให้ terminal ที่จบสวย ผู้อ่านต้องรู้ว่า "การจบแบบไหนพิเศษ" ซึ่งการไม่รู้เรื่องนั้นคือสาเหตุของ [#23](https://github.com/monthop-gmail/agent-platform/issues/23) ตั้งแต่ต้น

## v1.6.1 — 2026-08-21

`derived_from.semantics_version` `1.1` → `1.2` ตามต้นทาง
Expand Down
8 changes: 8 additions & 0 deletions contracts/event/v1/event.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ $defs:
- EXECUTION_STARTED
- EXECUTION_FAILED
- JOB_COMPLETED
# ใบปิดท้ายของ subject ที่จบแล้ว — devfactory-core RFC-0012
# ออกทุก terminal รวม COMPLETED ที่ออก JOB_COMPLETED ด้วย เพราะสองใบตอบคนละคำถาม:
# JOB_COMPLETED = งานถูกส่งมอบไหม · JOB_SETTLED = บันทึกจบแล้วหรือยัง
# กฎที่ไม่มีข้อยกเว้นคือสิ่งที่ทำให้ผู้อ่านตรวจได้โดยไม่ต้องรู้ว่าการจบแบบไหนพิเศษ
#
# นี่คือครึ่งความครบถ้วนที่ ADR-0015 บอกเองว่าปิดด้วยใบปิดท้าย ไม่ใช่ด้วย sequence
# ([#23](https://github.com/monthop-gmail/agent-platform/issues/23))
- JOB_SETTLED
# consent — `consent/v1` consent_rules ข้อ 2 บังคับให้ออก event ทุกครั้ง
# ([ADR-0020](../../../decisions/0020-consent-event-vocabulary.md))
# ⚠️ ไม่มี CONSENT_USED โดยเจตนา — การใช้บันทึกด้วย field `consent` บน event
Expand Down
Loading