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
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
{
"acceptance_criteria": [
{
"id": "AC-001",
"statement": "The schema requires id, action_class, conditions, max_uses, expires_at and created_from with the stated types.",
"tests": [
"tests/test_preauth_policy.py::PreauthPolicyTest::test_schema_requires_the_envelope_fields"
],
"verification": "test"
},
{
"id": "AC-002",
"statement": "The policy states the 7-day expiry ceiling and names expires_at.",
"tests": [
"tests/test_preauth_policy.py::PreauthPolicyTest::test_policy_states_the_seven_day_ceiling"
],
"verification": "test"
},
{
"id": "AC-003",
"statement": "The policy names the gate, merge lane, policy/**, rulesets, preauth, secrets, force-push, deleting data and automatic rollback.",
"tests": [
"tests/test_preauth_policy.py::PreauthPolicyTest::test_policy_names_every_never_preauthorizable_class"
],
"verification": "test"
},
{
"id": "AC-004",
"statement": "The policy requires approved: preauth <hash>, revoke preauth <id> and states revocation is effective immediately.",
"tests": [
"tests/test_preauth_policy.py::PreauthPolicyTest::test_policy_requires_hash_approval_and_immediate_revocation"
],
"verification": "test"
},
{
"id": "AC-005",
"statement": "The policy proposes P1-P5 and names their exact conditions including source_rev/RED evidence, byte-identical vendored copies, superseded PRs, health check with automatic rollback, and dependency order with 4 bees in flight.",
"tests": [
"tests/test_preauth_policy.py::PreauthPolicyTest::test_policy_proposes_the_five_initial_envelopes"
],
"verification": "test"
},
{
"id": "AC-006",
"statement": "The policy requires proving every condition from data, a ledger and a daily digest.",
"tests": [
"tests/test_preauth_policy.py::PreauthPolicyTest::test_policy_requires_mechanical_conditions_and_a_daily_digest"
],
"verification": "test"
}
],
"authorization": {
"human_gates": [
"merge",
"tag",
"release",
"deploy",
"publish"
],
"not_authorized": [
"merge",
"tag",
"release",
"deploy",
"publish",
"restart",
"force-push",
"branch deletion",
"edit approved tests"
]
},
"contract_version": "acdd/1",
"evidence_required": [
"red",
"green",
"review"
],
"id": "preauth-policy",
"interfaces": [],
"outcome": {
"observable_behavior": [
"the schema requires every envelope field",
"the policy names every never-preauthorizable class",
"the five initial envelopes are proposed with exact conditions"
],
"summary": "policy/preauth.md and schemas/preauth.schema.json: the envelope contract, the 7-day ceiling, the never-preauthorizable classes, hash approval and immediate revocation, the mechanical-conditions rule, the daily digest, and the five initial envelopes P1-P5 proposed for the owner's decision."
},
"review": {
"approved_at": "2026-11-27T20:13:12Z",
"approved_by": "Kyle (owner) typed: approved 52b1c62c4b25 7ef0c9d08261 77ad1f384b72 efb38163ea06 80e7f8cfaef2 8665c168e76a 10d4cdeb93a0 9057d3800b21 19593ba24c9c ba367f1b2661 on 2026-11-27",
"contract_sha256": "10d4cdeb93a02353670cbc6fe2e461c8096c2d6b457e22bd4fb209aa4a702fa0",
"status": "approved",
"test_collection": {
"collected": 6,
"manifest_sha256": "58ec17a7be0ab4d3fabf5ea0b0fa8d5d1f41637139652bc681f8e77351fe1c5d",
"source_rev": "0006f6148624ba0b9349f772e2580a8da3ea4a3e"
}
},
"risk": {
"blast_radius": "every future pre-authorized action",
"reasons": [
"this text is what later envelopes are judged against; a vague rule becomes standing authority"
],
"tier": "medium"
},
"scope": {
"assigned_files": [
"policy/preauth.md",
"schemas/preauth.schema.json",
"policy/README.md"
],
"prohibited": [
"tests/test_preauth_policy.py::PreauthPolicyTest",
"CHANGELOG.md",
".rizzstack/**"
],
"read_only": [
".github/scripts/lease_tamper.py",
"policy/outside-review.md"
],
"test_files": [
"tests/test_preauth_policy.py"
]
},
"source_rev": "0006f6148624ba0b9349f772e2580a8da3ea4a3e",
"tdd": {
"applicable": true
},
"title": "Pre-authorization policy, schema and initial envelopes",
"verification": {
"commands": [
"env -u PYTHONPATH python3 -m pytest -q -p no:cacheprovider tests/test_preauth_policy.py::PreauthPolicyTest"
],
"independent": true,
"integration": false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
{
"acceptance_criteria": [
{
"id": "AC-001",
"regression": true,
"statement": "An approve_independent review from rizzstack-reviewer[bot] satisfies independent_review at the head.",
"tests": [
"tests/test_gate_review_identity.py::ReviewIdentityTest::test_reviewer_app_login_is_accepted"
],
"verification": "test"
},
{
"id": "AC-002",
"regression": true,
"statement": "An approve_independent review from the owner login satisfies independent_review at the head.",
"tests": [
"tests/test_gate_review_identity.py::ReviewIdentityTest::test_owner_login_is_accepted"
],
"verification": "test"
},
{
"id": "AC-003",
"statement": "The same body from any other login is not an approval.",
"tests": [
"tests/test_gate_review_identity.py::ReviewIdentityTest::test_any_other_login_is_not_an_approval"
],
"verification": "test"
},
{
"id": "AC-004",
"statement": "A review record with no user login is not an approval.",
"tests": [
"tests/test_gate_review_identity.py::ReviewIdentityTest::test_a_review_without_a_login_is_not_an_approval"
],
"verification": "test"
},
{
"id": "AC-005",
"statement": "review_identity_ok accepts exactly the reviewer app and owner logins and refuses an empty record.",
"tests": [
"tests/test_gate_review_identity.py::ReviewIdentityTest::test_identity_helper_names_the_two_allowed_identities"
],
"verification": "test"
},
{
"id": "AC-006",
"regression": true,
"statement": "review_form still reports changes_requested for a rejection posted by any login.",
"tests": [
"tests/test_gate_review_identity.py::ReviewIdentityTest::test_a_rejection_from_any_login_still_governs"
],
"verification": "test"
}
],
"authorization": {
"human_gates": [
"merge",
"tag",
"release",
"deploy",
"publish"
],
"not_authorized": [
"merge",
"tag",
"release",
"deploy",
"publish",
"restart",
"force-push",
"branch deletion",
"edit approved tests"
]
},
"contract_version": "acdd/1",
"evidence_required": [
"red",
"green",
"review"
],
"id": "gate-identity-check",
"interfaces": [],
"outcome": {
"observable_behavior": [
"the reviewer app login is accepted",
"any other login is not an approval",
"a rejection from any login still governs"
],
"summary": "The vendored gate checks the review's author login: an approve_independent attestation counts only from rizzstack-reviewer[bot] or the owner's login. A rejection still governs whatever account posted it. The six repos are re-vendored byte-identically after this lands."
},
"review": {
"approved_at": "2026-11-27T20:13:30Z",
"approved_by": "Kyle (owner) typed: approved 52b1c62c4b25 7ef0c9d08261 77ad1f384b72 efb38163ea06 80e7f8cfaef2 8665c168e76a 10d4cdeb93a0 9057d3800b21 19593ba24c9c ba367f1b2661 on 2026-11-27",
"contract_sha256": "ba367f1b2661b475269bdbab192d69e055e7d7729dc2bef5bb770b0a17a779d6",
"status": "approved",
"test_collection": {
"collected": 6,
"manifest_sha256": "c0949fb146757928415626ad4d2091942c176ff9a9aa0f7e3f383fb8b9c237df",
"source_rev": "15b2a99cfaadcb5bfa9c30369e50651a0997c401"
}
},
"risk": {
"blast_radius": "every non-slice merge in all six repos and the six vendored copies",
"reasons": [
"this is the gate that decides whether a PR has an independent review"
],
"tier": "high"
},
"scope": {
"assigned_files": [
".github/scripts/lease_tamper.py"
],
"prohibited": [
"tests/test_gate_review_identity.py::ReviewIdentityTest",
"CHANGELOG.md",
".rizzstack/**"
],
"read_only": [
"tests/fixtures/review_lines.json",
"scripts/merge_lane_v5.py"
],
"test_files": [
"tests/test_gate_review_identity.py"
]
},
"source_rev": "15b2a99cfaadcb5bfa9c30369e50651a0997c401",
"tdd": {
"applicable": true
},
"title": "Gate accepts independent approvals only from the reviewer app or owner",
"verification": {
"commands": [
"env -u PYTHONPATH python3 -m pytest -q -p no:cacheprovider tests/test_gate_review_identity.py::ReviewIdentityTest"
],
"independent": true,
"integration": false
}
}
37 changes: 37 additions & 0 deletions .rizzstack/leases/gate-identity-check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"branch": "feat/gate-identity-check",
"contract_id": "gate-identity-check",
"contract_sha256": "ba367f1b2661b475269bdbab192d69e055e7d7729dc2bef5bb770b0a17a779d6",
"derived_from": {
"approved_at": "2026-11-27T20:13:30Z",
"approved_by": "Kyle (owner) typed: approved 52b1c62c4b25 7ef0c9d08261 77ad1f384b72 efb38163ea06 80e7f8cfaef2 8665c168e76a 10d4cdeb93a0 9057d3800b21 19593ba24c9c ba367f1b2661 on 2026-11-27",
"contract": ".rizzstack/contracts/ba367f1b2661b475269bdbab192d69e055e7d7729dc2bef5bb770b0a17a779d6.json"
},
"id": "gate-identity-check",
"lease_version": "rizzstack.lease/1",
"review": {
"approved_at": "2026-11-27T20:13:30Z",
"approved_by": "Kyle (owner) typed: approved 52b1c62c4b25 7ef0c9d08261 77ad1f384b72 efb38163ea06 80e7f8cfaef2 8665c168e76a 10d4cdeb93a0 9057d3800b21 19593ba24c9c ba367f1b2661 on 2026-11-27",
"note": "contract_sha256 names the approved frozen contract; scope and source_rev are its verbatim scope",
"status": "frozen"
},
"scope": {
"assigned_files": [
".github/scripts/lease_tamper.py"
],
"prohibited": [
"tests/test_gate_review_identity.py::ReviewIdentityTest",
"CHANGELOG.md",
".rizzstack/**"
],
"read_only": [
"tests/fixtures/review_lines.json",
"scripts/merge_lane_v5.py"
],
"test_files": [
"tests/test_gate_review_identity.py"
]
},
"slice": "gate-identity-check",
"source_rev": "15b2a99cfaadcb5bfa9c30369e50651a0997c401"
}
39 changes: 39 additions & 0 deletions .rizzstack/leases/preauth-policy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"branch": "feat/preauth-policy",
"contract_id": "preauth-policy",
"contract_sha256": "10d4cdeb93a02353670cbc6fe2e461c8096c2d6b457e22bd4fb209aa4a702fa0",
"derived_from": {
"approved_at": "2026-11-27T20:13:12Z",
"approved_by": "Kyle (owner) typed: approved 52b1c62c4b25 7ef0c9d08261 77ad1f384b72 efb38163ea06 80e7f8cfaef2 8665c168e76a 10d4cdeb93a0 9057d3800b21 19593ba24c9c ba367f1b2661 on 2026-11-27",
"contract": ".rizzstack/contracts/10d4cdeb93a02353670cbc6fe2e461c8096c2d6b457e22bd4fb209aa4a702fa0.json"
},
"id": "preauth-policy",
"lease_version": "rizzstack.lease/1",
"review": {
"approved_at": "2026-11-27T20:13:12Z",
"approved_by": "Kyle (owner) typed: approved 52b1c62c4b25 7ef0c9d08261 77ad1f384b72 efb38163ea06 80e7f8cfaef2 8665c168e76a 10d4cdeb93a0 9057d3800b21 19593ba24c9c ba367f1b2661 on 2026-11-27",
"note": "contract_sha256 names the approved frozen contract; scope and source_rev are its verbatim scope",
"status": "frozen"
},
"scope": {
"assigned_files": [
"policy/preauth.md",
"schemas/preauth.schema.json",
"policy/README.md"
],
"prohibited": [
"tests/test_preauth_policy.py::PreauthPolicyTest",
"CHANGELOG.md",
".rizzstack/**"
],
"read_only": [
".github/scripts/lease_tamper.py",
"policy/outside-review.md"
],
"test_files": [
"tests/test_preauth_policy.py"
]
},
"slice": "preauth-policy",
"source_rev": "0006f6148624ba0b9349f772e2580a8da3ea4a3e"
}