Prepare 0.2.0 Gate B pilot candidate
Build and verify web migration / verify (push) Has been cancelled
Build and verify web migration / verify (push) Has been cancelled
This commit is contained in:
@@ -11,14 +11,15 @@ spec.loader.exec_module(approval)
|
||||
def valid_record(gate="B"):
|
||||
ids = approval.GATE_C if gate == "C" else approval.GATE_B
|
||||
return {
|
||||
"schemaVersion": 1, "targetGate": gate, "decision": "approved",
|
||||
"schemaVersion": 2, "targetGate": gate, "decision": "approved",
|
||||
"releaseCommit": "a" * 40, "releaseRecordSha256": "b" * 64,
|
||||
"decidedAt": "2026-09-29T12:00:00Z",
|
||||
"approvals": {
|
||||
"hotelOwner": {"name": "Hotel owner", "approvedAt": "2026-09-29T11:00:00Z"},
|
||||
"technicalOwner": {"name": "Technical owner", "approvedAt": "2026-09-29T11:30:00Z"},
|
||||
},
|
||||
"capacity": {"reportSha256": "c" * 64, "targetConcurrency": 10, "observedConcurrency": 10, "targetP95Ms": 500, "observedP95Ms": 250, "targetErrorRate": 0.01, "observedErrorRate": 0},
|
||||
"capacity": {"reportSha256": "c" * 64, "hostMetricsSha256": "d" * 64, "targetConcurrency": 10, "observedConcurrency": 10, "targetP95Ms": 500, "observedP95Ms": 250, "targetErrorRate": 0.01, "observedErrorRate": 0, "targetCpuHeadroomPercent": 25, "observedCpuHeadroomPercent": 40, "targetMemoryHeadroomPercent": 25, "observedMemoryHeadroomPercent": 35},
|
||||
"pilot": {"recordSha256": "e" * 64, "businessDaysObserved": 5, "hotelsObserved": 1, "stopConditionsObserved": 0, "unresolvedFindings": 0},
|
||||
"evidence": [{"id": item, "status": "pass", "references": ["restricted-ticket-" + item]} for item in sorted(ids)],
|
||||
}
|
||||
|
||||
@@ -49,6 +50,17 @@ class PilotApprovalTests(unittest.TestCase):
|
||||
record = valid_record();record["capacity"]["targetErrorRate"] = 2
|
||||
with self.assertRaisesRegex(ValueError, "ratio"):
|
||||
approval.validate(record)
|
||||
record = valid_record();record["capacity"]["observedCpuHeadroomPercent"] = 24
|
||||
with self.assertRaisesRegex(ValueError, "cpu headroom"):
|
||||
approval.validate(record)
|
||||
|
||||
def test_completed_five_day_single_hotel_pilot_is_required(self):
|
||||
record = valid_record();record["pilot"]["businessDaysObserved"] = 4
|
||||
with self.assertRaisesRegex(ValueError, "five business days"):
|
||||
approval.validate(record)
|
||||
record = valid_record();record["pilot"]["stopConditionsObserved"] = 1
|
||||
with self.assertRaisesRegex(ValueError, "stop condition"):
|
||||
approval.validate(record)
|
||||
|
||||
def test_approvers_must_be_separate_people_without_email_addresses(self):
|
||||
record = valid_record();record["approvals"]["technicalOwner"]["name"] = "Hotel owner"
|
||||
|
||||
Reference in New Issue
Block a user