contracts: follow devfactory-core semantics 1.2 - #37
Merged
Conversation
RFC-0012 added a third guarantee to event: every terminal emits a closing record, not only the one that ended well. That is a change to the frozen block upstream, so semantics_version moved 1.1 to 1.2 and both derived contracts are out of conformance until their pointers follow. drift_check confirms it, which is the mechanism working. Nothing in either schema changes. The guarantee is devfactory-core's and the guarantees block here is ours, already covering theirs at 8 against 3. The closing record is an event type rather than a field, and event_type refs EventTypeName, so JOB_SETTLED validates today without us having touched anything. This closes the half of issue #23 that ADR-0015 sent back. We established there that a number carried on an event cannot say what number the last event should have been, and that completeness would be closed by a closing record per terminal - which was theirs to declare. It is declared, and it needed no contract change at all. approval/v1 moves only because semantics_version scopes the whole manifest rather than one contract. Splitting it per contract would be a change to the mechanism, not a fix for this round; noted in its changelog so the next reader does not have to rediscover why an untouched contract got a version. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 21, 2026
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.
ปิดครึ่งของ #23 ที่ ADR-0015 ส่งกลับไปให้
devfactory-core— กลับมาแล้ว และไม่ต้องแก้ contract เลยสักตัวเกิดอะไรขึ้นที่ต้นทาง
RFC-0012 เพิ่ม guarantee ข้อที่สาม ให้
event:JOB_COMPLETEDเป็นใบปิดท้ายที่ทำงานได้จริงอยู่แล้วสำหรับCOMPLETED· สิ่งที่ขาดไม่ใช่กลไก แต่คือกฎว่ากลไกนี้ใช้กับทุกการจบ · ตอนนี้JOB_SETTLEDออกทุก terminal รวมCOMPLETED(สองใบตอบคนละคำถาม — งานถูกส่งมอบไหม vs บันทึกจบหรือยัง) พกsettled_asและevent_countฝั่งเขา implement แล้ว: replay ได้
UnsettledTrail·PrematureSettlement·MiscountedTrailและ conformance ตรวจ trail จริงว่าครบทั้ง 4 terminal พร้อมตัดใบท้ายดูว่าถูกจับPR นี้แก้อะไร — pointer อย่างเดียว
contracts/event/v1/event.schema.yamlderived_from.semantics_version→"1.2"· เพิ่มrfcs/0012ในรายการที่มาcontracts/approval/v1/approval.schema.yamlderived_from.semantics_version→"1.2"ไม่มีอะไรใน schema เปลี่ยน:
guaranteesblock ในไฟล์เราเป็นของเรา และครอบของเขาอยู่แล้ว (8 ≥ 3) — drift check ยืนยันevent_typeอ้างEventTypeNameชุดเปิด →JOB_SETTLEDvalidate ผ่านตั้งแต่วันนี้ โดยที่เราไม่ได้แตะอะไรนี่คือ ADR-0015 option C ทำงานตามที่ออกแบบ — เราแยกสามชั้น ship เฉพาะชั้นที่เป็นของเรา (
sequenceสำหรับเรียง) แล้วชั้นความครบถ้วนกลับมาจากเจ้าของมันทำไม
approval/v1ขยับทั้งที่ไม่เกี่ยวsemantics_versionเป็นของ manifest ทั้งไฟล์ ไม่ได้แยกต่อ contract · RFC-0012 แตะเฉพาะ guarantee ของeventแต่ pointer ของapprovalก็ต้องขยับตามถ้าอยากให้ contract ที่ไม่เกี่ยวไม่ต้องขยับด้วย ต้องแยก version ต่อ contract ที่ต้นทาง ซึ่งเป็นการเปลี่ยนกลไก ไม่ใช่การแก้รอบนี้ · เขียนไว้ใน CHANGELOG ของ
approvalแล้วเพื่อให้คนอ่านครั้งหน้าไม่ต้องมาขุดเองที่ยังเป็นของท่านตัดสิน — ไม่ได้ทำมาให้
เพิ่ม
JOB_SETTLEDเข้า$defs.EventTypeเป็น additive ตาม ADR-0006 Rule 2 และเป็นการตัดสินใจฝั่งนี้ผ่าน ADR — เราจึงไม่ทำมาให้ในนี้ไม่มีอะไรรอมัน — payload ผ่านอยู่แล้ว · ค่านี้มีไว้ให้ consumer generate constant ของค่าที่ platform รับรองความหมาย ตามที่ description ของ
$defs.EventTypeเขียนไว้เองconsumers.mdไม่ต้องแก้ — สถานะและ pin ของdevfactory-coreไม่เปลี่ยนRelated
#23 · ADR-0015 · ADR-0006 · devfactory-core#26 · devfactory-core#29
🤖 Generated with Claude Code