Skip to content

event/v1 v1.7.0: JOB_SETTLED, and checks that can be required - #38

Merged
monthop-gmail merged 1 commit into
mainfrom
contracts/job-settled-vocabulary
Aug 21, 2026
Merged

event/v1 v1.7.0: JOB_SETTLED, and checks that can be required#38
monthop-gmail merged 1 commit into
mainfrom
contracts/job-settled-vocabulary

Conversation

@monthop-gmail

Copy link
Copy Markdown
Owner

สองเรื่องที่ขวางทาง branch protection อยู่

1. EventType +1 — JOB_SETTLED

#37 รับ guarantee จาก RFC-0012 มาแล้ว (semantics_version1.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

ไม่ยกเว้น COMPLETED — ออกทั้ง JOB_COMPLETED และ JOB_SETTLED เพราะตอบคนละคำถาม (งานถูกส่งมอบไหม vs บันทึกจบหรือยัง) · ถ้ายกเว้นให้ terminal ที่จบสวย ผู้อ่านต้องรู้ว่า "การจบแบบไหนพิเศษ" ซึ่งการไม่รู้เรื่องนั้นคือสาเหตุของ #23 ตั้งแต่ต้น

2. drift check ถอด paths: filter

required check ที่ไม่ทำงาน จะไม่รายงานผล → GitHub ค้าง PR ไว้ที่ Expected — waiting for status to be reported โดยไม่มีทางไปต่อ

filter เดิมครอบ contracts/** profiles/** architecture/consumers.md conformance/** · PR ที่แตะแค่ decisions/ หรือ ref/ ไม่ match เลย และนั่นคือ PR ส่วนใหญ่ของ repo นี้ — ADR ทุกฉบับที่ merge มาสัปดาห์นี้จะติดกับดักนี้

ราคาที่จ่ายคือรัน drift check กับ PR เอกสารล้วน ~1 นาที ซึ่งถูกกว่าการมี gate ที่บล็อกงานผิดชนิด

ตรวจแล้ว

passed=20  FAIL=0  WARN=0

หลัง merge

ตั้ง branch protection ด้วย required check: drift

ℹ️ ไม่ตั้ง required review — repo นี้มี collaborator คนเดียว และ GitHub ไม่ให้อนุมัติ PR ของตัวเอง · ตั้งแล้วจะ merge ไม่ได้เลย · CODEOWNERS จึงยังเป็น auto-request reviewer เหมือนเดิม ไม่ใช่เพราะลืม

🤖 Generated with Claude Code

Two things, both in the way of branch protection.

v1.6.1 took the guarantee that every terminal emits a closing record, but the value
that carries it was not in $defs.EventType. That $defs says of itself that it exists
so consumers can generate constants for the values the platform vouches for, so a
value with a guarantee attached and no entry leaves those consumers hardcoding a
string. Adding it is additive under ADR-0006 Rule 2, and nothing was waiting on it:
event_type refs EventTypeName, so JOB_SETTLED validated before this PR and validates
after.

COMPLETED emits both JOB_COMPLETED and JOB_SETTLED. They answer different questions -
was the work delivered, is the record finished - and exempting the terminal that
already worked would put the reader back to needing to know which endings are
special, which is what issue #23 was about.

The drift check also loses its paths filter. It is about to become a required check,
and a required check that does not run never reports: GitHub holds the PR at
"Expected — waiting for status to be reported" with no way forward. A PR touching
only decisions/ or ref/ matches none of the old paths, and those are most of the PRs
here. The gate would have blocked the work it exists to protect.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@monthop-gmail monthop-gmail added the contract Canonical contract ที่ทุก repo ใช้ร่วม label Aug 21, 2026
@monthop-gmail
monthop-gmail merged commit c92a414 into main Aug 21, 2026
1 check passed
@monthop-gmail
monthop-gmail deleted the contracts/job-settled-vocabulary branch August 21, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contract Canonical contract ที่ทุก repo ใช้ร่วม

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant