event/v1 v1.7.0: JOB_SETTLED, and checks that can be required - #38
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
สองเรื่องที่ขวางทาง branch protection อยู่
1.
EventType+1 —JOB_SETTLED#37 รับ guarantee จาก RFC-0012 มาแล้ว (
semantics_version→1.2) แต่ค่าที่ใช้ยังไม่อยู่ใน$defs.EventTypedescriptionของ$defsนั้นเขียนเองว่ามีไว้ "ให้ consumer generate constant ของค่าที่ platform รับรองความหมาย" — ค่าที่มี guarantee ผูกอยู่แต่ไม่อยู่ในลิสต์ ทำให้ consumer ที่ generate constant ไม่มีมัน ต้อง hardcode string เองไม่ breaking และไม่มีอะไรรอมัน —
event_typeอ้างEventTypeNameชุดเปิดมาตั้งแต่ v1.2.0 → payload ที่ใช้JOB_SETTLEDvalidate ผ่านตั้งแต่ก่อน PR นี้ · additive ตาม ADR-0006 Rule 2ไม่ยกเว้น
COMPLETED— ออกทั้งJOB_COMPLETEDและJOB_SETTLEDเพราะตอบคนละคำถาม (งานถูกส่งมอบไหม vs บันทึกจบหรือยัง) · ถ้ายกเว้นให้ terminal ที่จบสวย ผู้อ่านต้องรู้ว่า "การจบแบบไหนพิเศษ" ซึ่งการไม่รู้เรื่องนั้นคือสาเหตุของ #23 ตั้งแต่ต้น2.
drift checkถอดpaths:filterrequired check ที่ไม่ทำงาน จะไม่รายงานผล → GitHub ค้าง PR ไว้ที่
Expected — waiting for status to be reportedโดยไม่มีทางไปต่อfilter เดิมครอบ
contracts/**profiles/**architecture/consumers.mdconformance/**· PR ที่แตะแค่decisions/หรือref/ไม่ match เลย และนั่นคือ PR ส่วนใหญ่ของ repo นี้ — ADR ทุกฉบับที่ merge มาสัปดาห์นี้จะติดกับดักนี้ราคาที่จ่ายคือรัน drift check กับ PR เอกสารล้วน ~1 นาที ซึ่งถูกกว่าการมี gate ที่บล็อกงานผิดชนิด
ตรวจแล้ว
หลัง merge
ตั้ง branch protection ด้วย required check:
drift🤖 Generated with Claude Code