Commit Graph
12 Commits
Author SHA1 Message Date
CydandClaude Fable 5 e0a3c72370 Console: survive a launcher-dropped connection during product installs
The launcher drops RPC sessions idle >30s (easily hit while the operator sits
in the install dialogs), but a dropped socket still reports Connected until an
I/O fails. InstallProductWorker then skipped its reopen, streamed the archive
on the fresh out-of-band connection, and died on the first progress poll —
and the install-completed handler registered launch entries without checking
e.Error, so AddApp's disconnected-guard exception crashed the whole console.

- PodInfo.EnsureConnectionAlive: probe an "open" connection with a Ping and
  reconnect when it is dead; used by the install and uninstall workers.
- SiteManagement.PodInfo_InstallProductCompleted: register launch entries only
  on success, and surface registration failures as the row's Install Failed
  state instead of an unhandled exception.
- Regression test pins the premise + recovery against vPOD's launcher server
  (stale socket reports open, Ping exposes it, reconnect restores service).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 21:40:14 -05:00
CydandClaude Fable 5 1daaf4af78 vPOD: virtual launcher — test Site Management / product deploys without a cockpit
vPOD now also impersonates the pod's TeslaLauncher service, so the console's
Manage Site works against it unmodified:

- LauncherRpcServer: ILauncherService over OFB + framed JSON on TCP 53290,
  mirroring TeslaLauncherService (concurrent sessions, out-of-band install
  zip on a second connection, the 99%-not-100 completion convention).
  Packages extract to %LocalAppData%\vPOD\Games; postinstall.bat is logged
  but never executed.
- PodProvisioning: pod side of SecureConfig (RQST beacon, RPLY decrypt, RSA
  session-key exchange), display-only — never touches the NIC/registry. The
  console's Configure flow mints the key exactly as for a real pod; console
  Reconfigure (ClearStore) drops the key and re-enters beacon mode.
- VirtualLauncher: installed-app registry (persisted), simulated launch PIDs,
  volume, install progress; console Shutdown/Restart power-cycles the pod.
- Form gets a Launcher/Site Management column (passcode display, RPC status,
  install progress, app list, Reprovision); Power Off darkens the launcher
  side too; new -nomanage flag disables it.

vPOD references the shared Tesla.Contract/Tesla.SecureConfig projects (server
side of the existing contract only, no new RPCs). Loopback tests drive the
real PodManagerConnection and PodConfigurationServer against the new code
(VPodLauncherServerTests, VPodProvisioningTests) — suite now 99 green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 20:45:33 -05:00
CydandClaude Fable 5 3fd637c58a Add vPOD: a virtual pod / game-client stand-in for testing the consoles
vPOD impersonates a Tesla game client (rpl4opt.exe / btl4.exe) so the Red
Planet and BattleTech operator consoles can be exercised without real cockpit
hardware. New net48 WinForms project under Console\vPOD:

- MungaPodServer: the server half of the Munga control protocol (TCP 1501).
  The vendored MungaSocket is client-only, so this reimplements the identical
  framing ([16-byte header][12-byte base + body], dispatched by
  ClientID+MessageID) for the listening side, reusing the vendored message
  classes' WriteTo/BinaryReader serialization.
- PodSimulator: the ApplicationState machine driven by the console's messages -
  answers StateQuery, reassembles the streamed egg and acknowledges it, and
  walks WaitingForEgg -> LoadingMission -> WaitingForLaunch -> RunningMission
  and back on Run/Stop/Abort/Suspend/Resume.
- VPodForm: live display of listening/connection status, the colour-coded
  ApplicationState, an egg viewer (fields + summary), and a newest-first
  protocol log. A Red Planet / BattleTech toggle changes which ApplicationID
  the pod reports, live, so one vPOD stands in for either game.
- PodArguments: parses the real client's launch flags (-net/-app/-lc/-mr/
  -host/-res).

Deployable from Manage Site -> Install Product: a catalog product in
RedPlanet\Apps.xml (Game Client / Live Camera / Mission Review entries) plus
pack.ps1, which builds dist\vPOD.zip laying out vPOD\vPOD.exe for the launcher
to extract to C:\Games\vPOD. CatalogTests updated to 5 products / 11 entries
with the four vPOD entry assertions (88/88 pass). TeslaConsole.csproj excludes
vPOD\** from its **/*.cs glob; the project is added to the solution.

Verified end-to-end over real TCP: a console-role client using the vendored
MungaSocket drives connect -> WaitingForEgg -> stream egg -> (ack) ->
WaitingForLaunch -> Run -> RunningMission -> Stop -> WaitingForEgg, with vPOD
reporting the correct state at each step. MungaGame (what the console's game
windows use) is a thin wrapper over MungaSocket, so this exercises the exact
wire behaviour.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 09:34:53 -05:00
CydandClaude Fable 5 18d787bdd5 BattleTech results printing, defaults dialog, and BT411 catalog (BT port phase 4)
Completes the BattleTech console feature to parity with Red Planet:

- BTPrintDocument: the per-pilot landscape score sheet (mech portrait,
  placing, kill/death/damage stats, randomized mission-highlights narrative,
  pilot-vs-pilot damage matrix, place-over-time chart), mirroring
  RPPrintDocument minus the football/lap/boost/score-zone concepts. Wired into
  BTGame (Auto Print checkbox + Print Last Mission button) and the shell's File
  menu (BT Mission Print Preview / Print BT Mission, loading .btm files).
- BTStrings(.xml): the BT mission-highlight narrative pools (damage tiers,
  kill, death-without-honor, recap), loaded from BattleTech\BTStrings.xml like
  RPStrings.
- BTDefaultsDialog: two-column (Free For All / No Return) editor for the BT
  operator defaults, reachable from Settings (Change/Import/Export BattleTech
  Defaults). Verified via UI Automation: opens with all 18 option combos
  populated.
- Apps.xml: the BattleTech 4.11 product (btl4.exe on the shared RP411 engine,
  same -net/-res/-lc/-mr command line; deploys to C:\Games\BT411) with Game
  Client / Live Camera / Mission Review launch entries. CatalogTests updated to
  4 products / 8 entries plus the three new BT entry assertions.

Role model spelling corrected to "noreturn": the Mac Console.ini tag and the
game's BTL4.RES role resource are dfltrole/NoReturn; the 4.10 console's eggs
emitted a broken "noretun" that cannot resolve against the RES. BTGoldenEggTests
and BTConfig.xml updated accordingly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 23:04:03 -05:00
CydandClaude Fable 5 9148ce2cca BattleTech egg builder, catalog, and golden-egg DiffTests (BT port phases 1-2)
New TeslaConsole.BattleTech namespace mirroring TeslaConsole.RedPlanet's
mission layer: BTMission/BTFreeForAllMission (egg serializer; RP wire framing
and ordinal bitmaps reused verbatim), BTParticipant/BTPlayer/BTCamera (BT
participant fields: advancedDamage, experience, vehicleValue, patch, role),
and the BTConfig/BTScenario/BTMap/BTVehicle/BTWeather/BTRole catalog loaded
from BattleTech\BTConfig.xml (reconstructed from the Mac Console 4.10 ini BT
tree). Free For All and No Return share one mission class - both send
scenario=freeforall; the mode is the role assigned to each pilot.

BTGoldenEggTests (7 tests, recovered-only) diff the generated egg
field-by-field against two eggs captured from the original consoles
(cavern.egg, TESTARN.EGG): order-independent per-section compare with
font-rendered bitmap pixel rows excluded, ordinal art byte-exact vs
TESTARN.EGG, EggFileMessage framing reassembly, role de-dup, No Return role
semantics, and shipped-catalog contents. Invoker gains BTEggString/
BTEggFraming reflection cases.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 22:28:07 -05:00
CydandClaude Opus 4.8 09e3d769d7 Remove redundant "BattleTech Firestorm LC" product from catalog
Firestorm selects game vs. Live Cam behavior from its assigned IP address, so a
separate LC product entry is unnecessary. Drop it from Apps.xml and update the
catalog tests (now 3 products / 5 entries; removed FirestormLC_Matches_Original).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 22:53:08 -05:00
CydandClaude Opus 4.8 4c15197b34 Console/launcher-managed RIOJoy + real product uninstall
RIOJoy lifecycle is now owned by the console + launcher (the auto-start Run entry
was removed on the RioJoy side): Apps.xml autoRestart false -> true, so the
launcher starts RIOJoy and keeps it alive. Safe with uninstall — the watcher only
relaunches a still-tracked process, and uninstall's kill untracks it first.

Uninstall now physically removes the product (was unregister-only):
- Agent CmdUninstallApp: after kill + unregister, reports the product's
  C:\Games\<dir> to clean up — but only if no remaining registered launch entry
  still uses that folder (orphan check keeps multi-entry products like Red Planet's
  GameClient/LC/MR intact until the last entry is removed).
- Service (SYSTEM): on UninstallApp, runs <dir>\pre-uninstall.bat if present
  (RIOJoy's removes ViGEmBus + config) then deletes the directory, on a background
  thread so it can't trip the Console's RPC timeout. Path-guarded to only ever
  delete a proper subdirectory of C:\Games. Logged to podconf.log.

74 tests green; the cleanup path is pod-behavior, not unit-tested here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 18:53:09 -05:00
CydandClaude Opus 4.8 ce094535fa Add RIOJoy to the product catalog
RIOJoy (the cockpit RIO → virtual-gamepad feeder; separate net48 repo) is now an
installable/launchable product in Console/RedPlanet/Apps.xml. Its dist zip is
already TeslaConsole-shaped (postinstall.bat + RIOJoy\ → extracts to C:\Games, the
launcher runs postinstall.bat as SYSTEM to install ViGEmBus + register auto-start),
so this is the only change needed on the TeslaSuite side.

- Launch entry exe C:\Games\RIOJoy\app\RioJoy.Tray.exe, autoRestart=false (the
  postinstall HKLM Run entry owns startup; the catalog entry is for registration +
  manual restart from the console).
- CatalogTests: bumped the count guard to 4 products / 6 entries and added a
  byte-exact LaunchData check for the RIOJoy entry. 74 tests green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 14:13:36 -05:00
CydandClaude Opus 4.8 d5c4be26ce Docs: bring READMEs in line with current state (net48, JSON wire)
- Root README: launcher is .NET Framework 4.8 (was .NET 6/x86); RPC is framed
  JSON (was BinaryFormatter); added Contract/ + SecureConfig/; dropped the
  now-resolved "known duplication" warning; corrected the lib/*.dll note
  (TeslaConsoleLaunchLib/TeslaSecureConfiguration are source-built, kept only as
  test baselines); added a short history section.
- Console README: Contract is net48-only; Launcher targets net48.
- Launcher README: net48 framework-dependent (was net8/x64 self-contained);
  needs .NET Framework 4.8 (built into Windows), no bundled runtime.
- DiffTests README: original 4.11.3.37076 vs recovered 4.11.4.x (no longer share
  identity); noted version-insensitive comparison + the new protocol/crypto guards.
- Removed Launcher/assets/MEMORY.md (stale leftover dev-notes, superseded by the
  README and now-moot post-BinaryFormatter).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 13:44:06 -05:00
CydandClaude Opus 4.8 78bf297824 Bump version to 4.11.4.1; show version in Agent tray menu
- Console AssemblyVersion/AssemblyFileVersion 4.11.3.37076 -> 4.11.4.1. The
  recovered console is no longer a byte-faithful copy of the original baseline;
  it is the modernized 4.11.4.x line.
- Launcher Service + Agent Version -> 4.11.4.1 (unified suite version). The Agent
  tray menu header now shows the running version ("Tesla Launcher Agent  v4.11.4.1").
- Differential tests: the identity guard now expects the original at 4.11.3.37076
  and the recovered at 4.11.4.1 (not identical); the public-member surface check
  strips Version= stamps before comparing, since generic-argument signatures embed
  the assembly version (we compare type names, not versions). 73 tests green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 10:02:39 -05:00
CydandClaude Opus 4.8 b9d8027cf6 Extract shared contract, drop BinaryFormatter wire, modernize to net8/x64
Make the Console<->Launcher system source-built and modern now that the console
is under our control and the WinXP-era pods are gone.

Contract extraction (Contract/Tesla.Contract.csproj):
- One multi-targeted (net48;net8.0-windows) source project for the RPC contract,
  replacing the vendored TeslaConsoleLaunchLib.dll and the hand-synced Tesla.Net
  replica in Launcher/LaunchModels_Shared.cs. Emits assembly TeslaConsoleLaunchLib.

SecureConfig extraction (SecureConfig/Tesla.SecureConfig.csproj):
- net48 source of the first-boot provisioning protocol (UDP beacons, OFB crypto,
  RSA key exchange), replacing the vendored TeslaSecureConfiguration.dll.

Remove BinaryFormatter from the wire (RCE sink + the reason net6 was pinned):
- Console<->Launcher RPC is now length-prefixed System.Text.Json frames
  (Contract/PodRpcProtocol.cs) over the unchanged OFB transport; dispatch by
  method name. Deleted the SerializationBinder / MethodInfoProxy machinery.
- Console-local BinaryFormatter (Site config, mission replays) intentionally
  retained: local net48 file I/O, not the network surface.

Runtime modernization:
- Launcher Service + Agent: net6 -> net8, win-x86 -> win-x64 (all pods are
  64-bit Win10). Kept the SHA1-default PBKDF2 (Console key-derivation compat)
  with SYSLIB0041 suppressed and documented.

Tests: differential suite now 73 green. Added SecureConfigCompatTests (OFB
ciphertext byte-identical to the vendored DLL) and PodRpcProtocolTests (JSON
round-trip of every request/response shape); removed the now-obsolete
BinaryFormatter byte-identity guard.

Build hygiene: per-project obj dirs (Launcher/Directory.Build.props) fix a
NuGet restore collision between the two Launcher projects sharing one folder.

NOT runtime-verified against a live pod.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 08:15:17 -05:00
CydandClaude Opus 4.8 548550b312 Initial commit: TeslaSuite monorepo (TeslaConsole + TeslaLauncher)
Co-locate the two cockpit-pod projects into a single repository:

- Console/  : TeslaConsole, the net48 WinForms operator console (decompiled
              reconstruction) plus its differential + catalog test suite.
- Launcher/ : TeslaLauncher, the net6 pod-side Service + Agent rewrite.

Adds a combined TeslaSuite.sln, root README documenting the shared wire
contract (and its current duplication, the main follow-up), and a root
.gitignore. Histories were not preserved per request; this is a fresh start
from the current working state of both projects.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 14:43:28 -05:00