test(scum): cover supported companion adapters

This commit is contained in:
npc0-hue
2026-07-29 16:15:01 +08:00
parent daa0f330a4
commit 9fafd17915
5 changed files with 272 additions and 14 deletions
@@ -30,8 +30,10 @@ Consequently these tasks remain open and blocked rather than simulated:
network, position, or vehicle data.
- 5.1 and 5.3: no documented, version-bound state-patch or reward-delivery
adapter exists.
- 5.5 and the remaining end-to-end portion of 6.2: the required adapter
coverage and isolated non-production SCUM fixtures do not exist.
- 6.2: controlled read-only migration fixtures and isolated Companion
typed-port coverage now exist for the supported configuration, notification,
and vehicle-spawn adapters, but no legitimate versioned producer exists for
the remaining player-history, reward, state-patch, or trajectory parity.
- 6.3: transitional SCUM APIs and models still have callers and cannot be
removed before the parity and rollback evidence required by 6.2.
- 6.4: final full verification is deferred until the blocked adapters and
@@ -33,7 +33,7 @@
- [ ] 5.3 Implement a `reward.deliver` adapter that freezes the approved revision, performs idempotent delivery, and reports delivered/failed/unknown without automatically retrying unknown results.
- [x] 5.4 Implement a separate `player.notify` adapter that never repeats item delivery after notification failure; verify server-scoped recipient identity and redact message transport details.
- [x] 5.5 Implement the explicitly enabled, version-bound `vehicle.spawn` adapter with a strict vehicle-code catalog, the fixed internal `#spawnvehicle <vehicleCode>` template, protected audit text, structured success/failure/unknown outcomes, Companion-local transport fixture, and fail-closed UI availability.
- [ ] 5.6 Add isolated non-production end-to-end tests for every supported adapter and ensure no raw SQL, unrestricted RCON, OCR, screenshots, keyboard/mouse injection, or direct game database write path exists.
- [x] 5.6 Add isolated non-production end-to-end tests for every supported adapter and ensure no raw SQL, unrestricted RCON, OCR, screenshots, keyboard/mouse injection, or direct game database write path exists.
## 6. Migrate transitional platform behavior safely
@@ -41,3 +41,7 @@
- [ ] 6.2 Verify plugin parity for configuration, player history, gifts, state-patch audits, and trajectories against controlled fixtures and an isolated Companion integration environment.
- [ ] 6.3 Remove SCUM-named platform APIs, models, services, routes, and frontend components only after no callers remain and migration/rollback evidence is recorded.
- [ ] 6.4 Run full platform, plugin, frontend, manifest, OpenSpec strict, structure, and isolated end-to-end verification; commit and push only the scoped migration files.
## Verification evidence
- 5.6: `cd plugins/examples/scum-server-plugin/companion && go test ./...` passed on 2026-07-29. The isolated typed-port fixture covers safe configuration read/patch, `player.notify`, and version-bound `vehicle.spawn` through claim/ack/registry/complete; it checks approval, binding, version/capability gating, idempotency, bounded outcomes, and redaction. A production-source test rejects raw SQL/direct database access, unrestricted command/RCON execution, OCR/screenshot/input automation, and direct socket paths.