Files
BT411/scratchpad/night6/file_78voice.py
T

50 lines
3.2 KiB
Python

"""#78 reverse-disabled voice landed comment (corrects the earlier verdict)."""
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 = """**CORRECTION + the voice landed** (`1671b7d`): my earlier "no reverse-disabled voice exists" verdict was **wrong** -- the testers and old-timers were right, and the pushback found it. I had audited the control mapper, MFD text, and the ANIMATION-state audio triggers. The voice rides the **SIMULATION-state** triggers: the authored mech audio has state watchers on `Entity.SimulationState == 3/4` -- the binary's one-cell `mech+0x40`, which IS the gimp level -- starting a sequence that plays notes 29, 16, then **40**: two klaxon hits, then Warnings01 zone 8 (`Warnings01_z7.wav`, identified by ear) = **"reverse disabled."**
It never played in the port because of the same split-brain that hid the limp animation: the port carries the binary's one cell as two (graphicAlarm vs engine simulationState), and the audio watches the half the gimp system never wrote. Fixes:
- the damage handler now mirrors gimp 3/4 into the engine cell at the leg-half crossing (guarded against stomping disabled/fall/dead states);
- replication records captured pre-gimp no longer stomp the cell back (gimp is monotonic per life);
- bench-verified end-to-end: `SetupPatch bank2 patch113 note=40 -> Warnings01_z7.wav`.
So the full authored experience now: leg crosses half -> klaxon-klaxon-"reverse disabled" + the strained-servo limp foley + the visible limp + reverse refusal.
**Open follow-up**: an unidentified RAW writer (bypasses every SetState path; proven by an indicator-level trap that never fired while the value changed) resets the cell between damage events. Under a 1 Hz bench harness this restarted the warning before the 1.8 s voice note; sporadic real-play damage is unaffected (one wound -> one full announcement). Needs a cdb write-watchpoint session -- filed as the next audio dig.
Also mapped en route: the AnimationState triggers on limp entry/stop play `EngineShiftRev01` -- the gear-downshift foley, a separate working layer, not the voice (my earlier mis-ID)."""
comment(78, BODY)