refactor(scum): remove orphaned host panels

This commit is contained in:
npc0-hue
2026-07-29 16:26:19 +08:00
parent 9fafd17915
commit 03339fb3e8
18 changed files with 31 additions and 1185 deletions
@@ -41,3 +41,33 @@ Consequently these tasks remain open and blocked rather than simulated:
No fallback to raw RCON, credentials, SQL, direct game-database access, OCR,
screenshots, keyboard/mouse injection, or desktop automation is permitted.
## 6.3 frontend cleanup and rollback evidence (2026-07-29)
The generic `PluginPageHostPage` has no hard-coded SCUM import or `game.scum`
branch. Static `rg` call-graph audit found zero non-test callers for the
following former `platform_web` implementation, so this batch removed it with
its private tests, contracts, schemas, API-client methods/types, and map-only
styles:
- `ScumOperationsPanel`, `ScumFileConfigWorkbench`, and the private
`scumOperations` contract/schema;
- `GamePlayerIntelligencePanel` and `GameGiftCatalogPanel`;
- `ScumMapTrajectoryPanel`.
Their plugin-owned replacement is `features/page.ts`, with typed bridge reads
and commands in `features/api.ts`, and the read-only provenance adapters in
`features/migration.ts`. The replacement remains capability-gated: missing
login/position event producers and missing state-patch/reward-delivery
handlers render unavailable controls and never synthesize records or enable a
fallback execution path.
The platform-side `/game-players`, `/game-gifts`, and `/game-map-trajectories`
routes, DTO/domain/model/service/repository implementations, and their
fixtures remain intentionally. `plugins/tests/fixtures/scum-migration-parity.ts`
continues to consume their historical record shapes through allowlisted,
`transitional-read-only` migration records. Rollback therefore consists of
disabling the exact server/version plugin authority flag, leaving those prior
records visible and read-only; it does not restore any deleted host panel or
re-enable an unsafe execution route. Backend removal remains blocked until 6.2
parity and the required versioned event/operation protocols exist.
@@ -45,3 +45,4 @@
## 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.
- 6.3 preparation: `platform_web` static call-graph audit on 2026-07-29 found that the legacy SCUM operation/config/player/gift/trajectory panels, their private contracts/schemas, and their game-player/gift/map client calls had no non-test caller after generic plugin-page hosting. The orphan frontend implementation was removed; the backend historical routes/models/services/repositories remain read-only migration input as documented in `implementation-blockers.md`. `cd platform_web && pnpm test && pnpm build`, `cd plugins && pnpm test && pnpm typecheck && pnpm validate:manifest`, `openspec validate move-scum-feature-ownership-to-plugin --strict`, and `scripts/check-structure.sh` passed.