Skip to content

Add reusable fleet observation service - #255

Merged
netniV merged 6 commits into
STFC-Mod:devfrom
Guffawaffle:feature/fleet-watch
Sep 5, 2026
Merged

netniV merged 6 commits into
STFC-Mod:devfrom
Guffawaffle:feature/fleet-watch

Conversation

@Guffawaffle

@Guffawaffle Guffawaffle commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add a reusable, process-lifetime fleet-state observation service
  • publish stable same-fleet state transitions to opt-in subscribers
  • let subscribers declare states that require bounded fast follow-through polling
  • share the existing ScreenManager.Update detour through a small callback dispatcher
  • start fleet scans only after the first subscriber registers
  • refresh the exposed FleetState values from the current client corpus

Scope boundary

This PR provides only the ability to observe fleet-state transitions. It intentionally contains no concrete watched behavior:

  • no arrival, destination, mining, depletion, docking, repair, or OPC policy
  • no system notification or audio delivery
  • no Fleet Watch TOML settings or localized example changes
  • no event catalog and no patch-table entry

Each watched condition and its presentation/delivery policy will be introduced in a follow-up PR using this subscription API.

Runtime model

With no subscribers, Fleet Watch performs no scans or IL2CPP work and emits no logs. The shared screen-update dispatcher executes an empty callback list from the existing hotkey detour.

The first subscriber joins that dispatcher. Initial fleet state is stabilized before transitions are published. A staggered manager probe checks one of ten slots every 250 ms, while subscriber-selected transient states receive bounded 250 ms follow-through polling before backing off to five seconds. Fleet Watch introduces no additional game-method detour.

Callbacks run synchronously on the game thread. The supplied FleetPlayerData* is callback-scoped; scalar before/after snapshots are safe to retain. Callback and predicate exceptions are contained, reentrant registration/dispatch is rejected, and observer state is committed before delivery.

Validation

  • exact head: 2586be15ad42b2b39500f79ed9772d6cc21f6897
  • review receipt: f7fbc971871ca86f775579dcbafae2342837ef8f4ccfddddf7c24fa2b6a59f5c
  • git diff --check
  • Windows release build and exact-head deploy/client cycle
  • release DLL SHA-256: 52CE6E2DAAC909CE59DDC0B874717ECFB2ED3D62D484EB151446F498468AF549
  • release boot: 24/27 expected patches, zero mod errors; after the stabilization interval there were no Fleet Watch lines without a subscriber
  • Windows releasedbg exact-head deploy/client cycle with opt-in STFC_MOD_FLEET_WATCH_PROBE=1
  • releasedbg DLL SHA-256: FFB396D14D7619F73AD81CE9E2A99D65F072E92E128E992AC3EAC758B5E966D7
  • active probe installed the subscriber and established a stable baseline for 7 fleet slots with zero mod errors
  • exact-head live sequence delivered one ordered callback per observed change for one stable slot/fleet: Docked → WarpCharging → Impulsing → IdleInSpace → Impulsing → IdleInSpace
  • three independent evidence-first review lanes found no confirmed source defect after corrections

Remaining evidence gaps

  • topology-change suppression was inspected statically but not induced during the exact-head runtime session
  • the live sequence proves ordered transition delivery, but does not independently timestamp the manager mutation needed to measure the claimed fast-poll latency

@netniV

netniV commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

This PR seems to combine a few different ideas together in one. We should split out those which can be applied independently so as to avoid the noise. For example, the sound alerts are already part of another PR, etc.

It may be that as the others are applied, this will be smaller once updated.

@Guffawaffle Guffawaffle changed the title Add efficient fleet transition notifications Add reusable fleet observation service Sep 4, 2026
@Guffawaffle

Copy link
Copy Markdown
Contributor Author

@netniV Agreed — I rebuilt this PR from dev as the reusable observation foundation only. It is now 7 files instead of the prior 38-file combined change, with no sound, notifications, event catalog, TOML settings, or concrete arrival/mining/OPC/etc. behavior. Those will be separate consumer PRs.

The foundation is also manager-polling-only through the shared ScreenManager.Update owner, so it adds no new game-method detour. Exact-head local release/releasedbg cycles and a live ordered fleet transition sequence pass; macOS arm64/x86_64 and packaging CI are green. The Windows GitHub runner is currently stuck in its configure step (local exact-head Windows release is clean), so I’m leaving that check visible rather than implying it passed.

@netniV
netniV merged commit 01ff59e into STFC-Mod:dev Sep 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants