fix: align Central independent review and base invalidation gates

This commit is contained in:
jarvis-at-skic committed 2026-10-26 11:31:49 +00:00
1 parent 8c39ebe70e
commit 35f0a7259c
9 files changed
+56 -47

No files matched your search

+3 -3
View File
@@ -1,15 +1,15 @@
[
{
"path": "references/task-delivery-gates.md",
"sha256": "4475ccf43b8f026bdc1acee38cbe09969be6a387c71f6724cad94c8cef93e973"
"sha256": "6ecc350c0aaa66551a4bcd9a5da278c55980cce783eaf563a1a7546c1d5ac588"
},
{
"path": "references/repository-entry-and-visibility.md",
"sha256": "727d2ed32483a895237e6891b4ce78d79442d1c9e002bac4237e438fb9c4426d"
"sha256": "ee89ad297ea28e5a393b8a7e53de487883e64c720276f4055e368086d1c0ba65"
},
{
"path": "references/planning-artifact-reconciliation.md",
"sha256": "098c16b5f2f5d7a55211cefcc31bdfd8daaffad8433f0a32b34e8bdf0da0c611"
"sha256": "8676cb832199c4e11acc0f9f3abc649364a9ed6eec83d561ffd9c21bc556c3af"
},
{
"path": "references/aerosim-lessons-review.md",
-28
View File
@@ -1,32 +1,4 @@
[
{
"path": "references/task-delivery-gates.md",
"pattern": "^5\\. After local checks pass,.*$",
"hashes": [
"e4e6ae6f894fdb0b5dc1779b7037c39eb476ee80620f93a253c4a68ea4adabd1"
]
},
{
"path": "references/task-delivery-gates.md",
"pattern": "^6\\. (?:The active executor|Hermes main session) reviews.*$",
"hashes": [
"63acb91e7391daac3af378032e4842ef7da6d03ff1f1939016180f9fffb5f86c"
]
},
{
"path": "references/task-delivery-gates.md",
"pattern": "^2\\. Immediately before merge,.*$",
"hashes": [
"fb6968a7bea4662e945ca914c53988cc1d9d72b02681384f7041a89ad347c229"
]
},
{
"path": "references/task-delivery-gates.md",
"pattern": "^3\\. If conflict resolution,.*$",
"hashes": [
"6052be5ba307b088499acdc0abcecbea36719695f423e6e9b888027d85867e89"
]
},
{
"path": "references/task-delivery-gates.md",
"pattern": "^\\*\\*Exit gate:\\*\\* All required PR CI.*$",
+2 -2
View File
@@ -39,7 +39,7 @@ class LessonsContract(unittest.TestCase):
def test_contract_1(self):
text = (ROOT / 'SKILL.md').read_text()
self.assertIn('<code>-uat', text)
self.assertIn('version: 1.17.0', text)
self.assertIn('version: 1.18.0', text)
def test_stage_five_scope_and_authority(self):
text = (ROOT / "references/task-delivery-gates.md").read_text()
@@ -50,7 +50,7 @@ class LessonsContract(unittest.TestCase):
self.assertIn("If the project requires deployment before", stage)
self.assertNotIn("only if the Task explicitly includes", stage)
self.assertIn("image/container/Helm artifact validation", text)
self.assertIn("No implementation or review subagent", text)
self.assertIn("No second implementation worker", text)
if __name__ == "__main__":
+34
View File
@@ -0,0 +1,34 @@
"""Central executable policy follows the global exact-candidate gates."""
from pathlib import Path
import unittest
ROOT = Path(__file__).resolve().parents[1]
class GlobalGateAlignment(unittest.TestCase):
def test_review_before_substantive_push(self):
gates = (ROOT/'references/task-delivery-gates.md').read_text()
stage = gates.split('### Stage 3')[1].split('### Stage 4')[0]
self.assertLess(stage.index('5. Freeze'), stage.index('6. Obtain independent'))
self.assertLess(stage.index('6. Obtain independent'), stage.index('7. Push only'))
self.assertIn('before its next substantive push', stage)
self.assertIn('reviewer must not be the candidate implementer', stage)
self.assertIn('read-only reviewer', stage)
self.assertNotIn('push the new PR head, and review', gates)
self.assertNotIn('No implementation or review subagent', gates)
def test_any_base_change_invalidates_readiness(self):
gates = (ROOT/'references/task-delivery-gates.md').read_text()
self.assertIn('Any target-base SHA change invalidates merge readiness', gates)
self.assertIn('even when candidate head/tree is unchanged', gates)
self.assertNotIn('base drift is harmless', gates)
self.assertNotIn('push/readback, and review', gates)
def test_kickoff_and_cross_repository_scope(self):
entry = (ROOT/'references/repository-entry-and-visibility.md').read_text()
self.assertIn('no file/tree changes', entry)
self.assertIn('does not authorize a substantive push', entry)
gates = (ROOT/'references/task-delivery-gates.md').read_text()
self.assertIn('documentation claims/handoffs and GitOps candidates', gates)
def test_no_unresolved_policy_marker(self):
for path in [ROOT/'SKILL.md', *ROOT.glob('references/*.md')]:
text = path.read_text()
self.assertNotIn('Bounded unresolved A02/A04', text)
self.assertNotIn('A02/A04 review-order/base-drift remain bounded unresolved', text)
if __name__ == '__main__':
unittest.main()
+1 -1
View File
@@ -3,5 +3,5 @@ from pathlib import Path
import subprocess,sys
ROOT=Path(__file__).resolve().parents[1]
if __name__=='__main__':
print('Source-contract checks only; A02/A04/A17 and deferred helpers are not completion claims.',flush=True)
print('Source-contract checks only; A17 and deferred helpers are not completion claims.',flush=True)
subprocess.run([sys.executable,'-m','pytest','-q',str(Path(__file__).parent)],cwd=ROOT,check=True)