Files
BT411/scratchpad/night6/file_78limp.py
T

51 lines
3.3 KiB
Python

"""#78 visible-limp landed comment."""
import base64
import json
import subprocess
import urllib.request
REPO = r"C:\git\bt411"
BASE = "https://gitea.mysticmachines.com/api/v1/repos/VWE/BT411"
out = subprocess.run(["git", "credential", "fill"],
input="protocol=https\nhost=gitea.mysticmachines.com\n\n",
capture_output=True, text=True, cwd=REPO)
cred = dict(l.split("=", 1) for l in out.stdout.strip().splitlines() if "=" in l)
AUTH = "Basic " + base64.b64encode(
(cred["username"] + ":" + cred["password"]).encode()).decode()
def call(method, path, payload=None):
data = json.dumps(payload).encode() if payload is not None else None
r = urllib.request.Request(BASE + path, data=data, method=method)
r.add_header("Authorization", AUTH)
r.add_header("Content-Type", "application/json")
return json.load(urllib.request.urlopen(r))
def comment(n, body):
marker = body.strip().splitlines()[0][:60]
for c in call("GET", "/issues/%d/comments" % n):
if marker in c.get("body", ""):
print(" #%d already has this comment - skipped" % n)
return
call("POST", "/issues/%d/comments" % n, {"body": body})
print(" #%d commented" % n)
BODY = """**The VISIBLE limp is in** (`36f6871`, bench-verified).
The punchline: **there was never a jump-jet clip set.** The port had the binary's gimp gait machines (`FUN_004a5bf8`/`FUN_004a71f4`) fully reconstructed for weeks -- mislabeled `AdvanceBody/LegAnimationAirborne` and gated on "movementMode 3/4 && jumpCapable", believed dead because mechs never jump. The gate's `mech+0x40` is actually the **graphicAlarm level** (3 = left-leg gimp, 4 = right) and `+0x580` is **hasGimpClips** -- the flag the loader sets when the `wgl` probe finds the limp clip set. Renamed everything (`jump*` -> `gimp*`), pointed the gates at the real cell, and reconstructed the two missing transition machines (`GimpBodyClipFinished` @004a6344, `GimpLegClipFinished` @004a7970).
What the machine does (all decoded from the binary, [T1]):
- **Phase-correct limp entry**: left-gimp enters `wgl` only from a RIGHT step; right-gimp enters `wgr` from a LEFT step -- the machine forces one extra normal step if you're on the wrong foot. The limp always starts on the correct leg.
- **Limp cycles** `ggr` (left-gimp) / `ggl` (right-gimp) at the gimp cadence cap = the entry clip's stride; `gs*` exit transitions when you stop.
- **The authentic slowdown**: the leg callback clamps the LIVE mapper speedDemand to the gimped side's cap and the cycle cadence enforces it. The interim 0.5x demand multiply is retired (`BT_GIMP_SPEED` now defaults 1.0 = off).
- **Reverse-disabled is binary-proven**: the gimp machines have no standing->reverse entry at all. VGL Lynx's account checks out.
Bench (madcat, novice, `BT_SELF_DAMAGE=60 BT_SELF_DAMAGE_ZONE=16 BT_SELF_DAMAGE_TICKS=2`, auto-walk): right-leg crossing -> `wgr` entry from a left step -> **8,000+ frames stable in the `ggl` limp cycle** at cadence 14.77 (walk is 18.5, run 22+) with raw demand still 50. [T2]
Two port-glue bugs surfaced when the dead drivers first ran (null mapper read -> crash; missing state re-sync -> machine pinned) -- both fixed, written up as gotcha #24. Field verification: shoot a leg past half structure and watch them hobble."""
comment(78, BODY)