Address review pass 3: verifier bundle list, method descriptions, proposed match
- Contract step 4 again says a new bundle joins the verifier's BUNDLES list. - v0.15.0 notes describe the earlier method descriptions accurately, and the v0.17.0 intro says what the shared commit means. - tests/test_release_status.py counts "proposed" only directly beside a published tag, since the documents also name RelayView's proposed owner rules, and drops a redundant heading loop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
319314924c
commit
bdf6b47e8e
3 files changed
+13
-11
No files matched your search
@@ -12,10 +12,13 @@ from tests.test_overriding import CONTRACT, ROOT, codes, section, table_rows
|
||||
|
||||
PUBLISHED = ("v0.15.0", "v0.16.0", "v0.17.0", "v0.18.0")
|
||||
DOCUMENTS = ("README.md", "OVERRIDING.md", "RELEASE-NOTES.md", "docs/authoritative/instruction-package-contract.md")
|
||||
# An unpublished marker within this many characters of a published tag, in
|
||||
# either order, describes that tag as unpublished.
|
||||
# "Not yet tagged" or "not yet published" within this many characters of a
|
||||
# published tag, in either order, describes that tag as unpublished.
|
||||
# "Proposed" also names RelayView's proposed owner rules, so it counts only
|
||||
# directly beside the tag ("proposed `v0.17.0`", "`v0.18.0`, proposed").
|
||||
NEARBY = 40
|
||||
UNPUBLISHED = r"not[- ]yet[- ](?:tagged|published)|proposed"
|
||||
UNPUBLISHED = r"not[- ]yet[- ](?:tagged|published)"
|
||||
ADJACENT = r"[\s`,]{0,3}"
|
||||
# Any text within one sentence or table cell: a period ends the span only
|
||||
# when it ends a sentence, so other version strings may sit in between.
|
||||
SPAN = rf"(?:(?!\. )[^;|]){{0,{NEARBY}}}"
|
||||
@@ -44,7 +47,8 @@ class ReleaseStatusTests(unittest.TestCase):
|
||||
text = flat_document(document)
|
||||
for tag in PUBLISHED:
|
||||
escaped = re.escape(tag)
|
||||
pattern = rf"(?:{UNPUBLISHED}){SPAN}{escaped}|{escaped}{SPAN}(?:{UNPUBLISHED})"
|
||||
pattern = (rf"(?:{UNPUBLISHED}){SPAN}{escaped}|{escaped}{SPAN}(?:{UNPUBLISHED})"
|
||||
rf"|proposed{ADJACENT}{escaped}|{escaped}{ADJACENT}proposed")
|
||||
with self.subTest(document=document, tag=tag):
|
||||
self.assertIsNone(re.search(pattern, text, re.I))
|
||||
|
||||
@@ -74,10 +78,6 @@ class ReleaseStatusTests(unittest.TestCase):
|
||||
with self.subTest(tag=tag):
|
||||
self.assertIn(tag, headings)
|
||||
self.assertEqual(headings, sorted(headings, key=lambda tag: tuple(map(int, tag[1:].split("."))), reverse=True))
|
||||
for heading in re.findall(r"^## (.+)$", notes, re.M):
|
||||
if heading.split(" ")[0] in PUBLISHED:
|
||||
with self.subTest(heading=heading):
|
||||
self.assertIn(heading, PUBLISHED)
|
||||
|
||||
|
||||
class DesignerAdoptionTests(unittest.TestCase):
|
||||
@@ -103,6 +103,7 @@ class DesignerAdoptionTests(unittest.TestCase):
|
||||
adoption = flat(contract_section("RelayView adoption of the Tester and Coordinator pairs"))
|
||||
self.assertIn("its `v0.15.0` bundle holds only the Designer packages", adoption)
|
||||
self.assertIn("Before RelayView bundles a package declaring either pair", adoption)
|
||||
self.assertIn("add a new bundle to `BUNDLES` in `scripts/verify-first-party-skills-source.py`", adoption)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in new issue
Block a user