mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-07 02:56:17 -10:00
Parity headline: a plain paragraph, no HTML markers
The website renders the "Project status" intro with its own markdown, which prints HTML comments as text: the block is now found by its first words. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
3082b36894
commit
fabb6d78ec
3 files changed
+16
-21
No files matched your search
@@ -128,9 +128,7 @@ It runs rustfmt, clippy with warnings denied, the tests of the crates you touche
|
||||
|
||||
## Project status
|
||||
|
||||
<!-- parity-gaps: tools/parity_gaps.py writes this block -->
|
||||
**Player-visible gaps: 833 open** of the 833 the [port ledger](tools/port_ledger.py) found, reading every vanilla 26.3 method against Horizon's code: vanilla behaviour a player would notice that Horizon doesn't have yet. By area: Screens, HUD and client packets [197](https://github.com/horizon-rust/horizon/issues/3518); Entity and block rendering, models [129](https://github.com/horizon-rust/horizon/issues/3519); Animals [110](https://github.com/horizon-rust/horizon/issues/3512); Server and players on the server [106](https://github.com/horizon-rust/horizon/issues/3520); Blocks, redstone and fluids [86](https://github.com/horizon-rust/horizon/issues/3516); Entities, projectiles, vehicles and decorations [64](https://github.com/horizon-rust/horizon/issues/3514); Monsters and bosses [53](https://github.com/horizon-rust/horizon/issues/3513); Mob AI, villagers and raids [35](https://github.com/horizon-rust/horizon/issues/3521); World, world generation and saves [32](https://github.com/horizon-rust/horizon/issues/3517); Items, enchantments and inventories [21](https://github.com/horizon-rust/horizon/issues/3515). This number goes down as gaps close; the harness results below say that what is tested matches.
|
||||
<!-- /parity-gaps -->
|
||||
**Player-visible gaps: 833 open** of the 833 the [port ledger](tools/port_ledger.py) found, reading every vanilla 26.3 method against Horizon's code: vanilla behaviour a player would notice that Horizon doesn't have yet. By area: Screens, HUD and client packets [197](https://github.com/horizon-rust/horizon/issues/3518); Entity and block rendering, models [129](https://github.com/horizon-rust/horizon/issues/3519); Animals [110](https://github.com/horizon-rust/horizon/issues/3512); Server and players on the server [106](https://github.com/horizon-rust/horizon/issues/3520); Blocks, redstone and fluids [86](https://github.com/horizon-rust/horizon/issues/3516); Entities, projectiles, vehicles and decorations [64](https://github.com/horizon-rust/horizon/issues/3514); Monsters and bosses [53](https://github.com/horizon-rust/horizon/issues/3513); Mob AI, villagers and raids [35](https://github.com/horizon-rust/horizon/issues/3521); World, world generation and saves [32](https://github.com/horizon-rust/horizon/issues/3517); Items, enchantments and inventories [21](https://github.com/horizon-rust/horizon/issues/3515). This number goes down as gaps close (`tools/parity_gaps.py`); the harness results below say that what is tested matches.
|
||||
|
||||
The table below is the project's own audit of each subsystem. Every subsystem now matches vanilla in every harness that compares it. 100% means 100% of what the harnesses compare, not proof that nothing else differs. The remaining known differences are listed below.
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@ class ReadmeTests(unittest.TestCase):
|
||||
"## Project status\n\nThe table.\n")
|
||||
once = pg.rewrite(text, pg.block(lists(7)), 7)
|
||||
self.assertIn("player--visible%20gaps-7%20open-", once)
|
||||
self.assertIn("## Project status\n\n" + pg.START, once)
|
||||
self.assertIn("## Project status\n\n**Player-visible gaps: 7 open**", once)
|
||||
twice = pg.rewrite(once, pg.block(lists(3)), 3)
|
||||
self.assertEqual(twice.count(pg.START), 1)
|
||||
self.assertEqual(twice.count("**Player-visible gaps:"), 1)
|
||||
self.assertIn("player--visible%20gaps-3%20open-", twice)
|
||||
self.assertEqual(pg.written(twice)[0], 3)
|
||||
|
||||
@@ -49,7 +49,8 @@ class ReadmeTests(unittest.TestCase):
|
||||
self.assertIsNotNone(badge, "the README's gap badge is missing")
|
||||
self.assertEqual(int(badge.group(2)), total, "the gap badge must match the block")
|
||||
status = text.split("## Project status", 1)[1]
|
||||
self.assertTrue(status.lstrip().startswith(pg.START), "the gaps come first under Project status")
|
||||
self.assertTrue(status.lstrip().startswith("**Player-visible gaps:"), "the gaps come first under Project status")
|
||||
self.assertNotIn("<!--", status.split("###", 1)[0], "the website prints HTML comments of this intro")
|
||||
self.assertTrue(re.search(r"^### Java parity: \d+%$", status, re.M), "the site still reads this heading")
|
||||
|
||||
|
||||
|
||||
+11
-15
@@ -24,7 +24,8 @@ README = ROOT / "README.md"
|
||||
REPO = "horizon-rust/horizon"
|
||||
# The gap lists, one per area, filed from the port ledger on 2026-10-28 (#3859 step 5).
|
||||
ISSUES = list(range(3512, 3522))
|
||||
START, END = "<!-- parity-gaps: tools/parity_gaps.py writes this block -->", "<!-- /parity-gaps -->"
|
||||
# The block is one paragraph, found by its first words: no HTML comment markers, which the website would print.
|
||||
LINE = re.compile(r"^\*\*Player-visible gaps: (\d+) open\*\*.*$", re.M)
|
||||
BADGE = re.compile(r"(https://img\.shields\.io/badge/player--visible%20gaps-)(\d+)(%20open-)")
|
||||
OPEN_ROW = re.compile(r"^\s*[-*] \[ \] ", re.M)
|
||||
DONE_ROW = re.compile(r"^\s*[-*] \[[xX]\] ", re.M)
|
||||
@@ -60,29 +61,24 @@ def block(lists: list[dict]) -> str:
|
||||
total = still + sum(l["closed"] for l in lists)
|
||||
parts = "; ".join(f"{l['area']} [{l['open']}](https://github.com/{REPO}/issues/{l['number']})"
|
||||
for l in sorted(lists, key=lambda l: -l["open"]))
|
||||
return "\n".join([
|
||||
START,
|
||||
f"**Player-visible gaps: {still} open** of the {total} the [port ledger](tools/port_ledger.py) found, "
|
||||
"reading every vanilla 26.3 method against Horizon's code: vanilla behaviour a player would notice that "
|
||||
f"Horizon doesn't have yet. By area: {parts}. This number goes down as gaps close; the harness results "
|
||||
"below say that what is tested matches.",
|
||||
END,
|
||||
])
|
||||
return (f"**Player-visible gaps: {still} open** of the {total} the [port ledger](tools/port_ledger.py) found, "
|
||||
"reading every vanilla 26.3 method against Horizon's code: vanilla behaviour a player would notice that "
|
||||
f"Horizon doesn't have yet. By area: {parts}. This number goes down as gaps close "
|
||||
"(`tools/parity_gaps.py`); the harness results below say that what is tested matches.")
|
||||
|
||||
|
||||
def written(text: str) -> tuple[int, list[int]] | None:
|
||||
"""(the open total, each area's number) of the README's block, or None without one."""
|
||||
m = re.search(re.escape(START) + r"\n(.*?)\n" + re.escape(END), text, re.S)
|
||||
m = LINE.search(text)
|
||||
if not m:
|
||||
return None
|
||||
total = re.search(r"\*\*Player-visible gaps: (\d+) open\*\*", m.group(1))
|
||||
counts = [int(x) for x in re.findall(r" \[(\d+)\]\(https://github\.com/[^)]+/issues/\d+\)", m.group(1))]
|
||||
return (int(total.group(1)) if total else -1), counts
|
||||
counts = [int(x) for x in re.findall(r" \[(\d+)\]\(https://github\.com/[^)]+/issues/\d+\)", m.group(0))]
|
||||
return int(m.group(1)), counts
|
||||
|
||||
|
||||
def rewrite(text: str, new_block: str, still: int) -> str:
|
||||
if START in text:
|
||||
text = re.sub(re.escape(START) + r".*?" + re.escape(END), lambda _: new_block, text, flags=re.S)
|
||||
if LINE.search(text):
|
||||
text = LINE.sub(lambda _: new_block, text, count=1)
|
||||
else:
|
||||
text = text.replace("## Project status\n\n", f"## Project status\n\n{new_block}\n\n", 1)
|
||||
if BADGE.search(text):
|
||||
|
||||
Reference in new issue
Block a user