# Manager Online Stress Report - 2026-07-02

## Scope

This report records the online manager stress tests run after the round/continue and squad changes.

The tests used isolated temporary copies of `code/` and did not write to the live `.state.json`, `.manager.log`, or `.manager-saves/`.

## Code Checks

- `php -l code/api.php`: passed
- `node --check code/assets/js/app.js`: passed

## 3 Users, 3 Seasons

Users:

- `jdc`
- `adam`
- `bodin`

Teams:

- `barrow`
- `carlisle-united`
- `boston-united`

Result:

- Created online manager invite through the API.
- All users accepted and entered the same online season.
- Simulated seasons 2026, 2027, and 2028 through real API calls.
- Injury blocks occurred but were resolved by swapping injured starters with healthy bench players.
- No API errors, no online vote deadlock, and no broken current-season routing were seen.

Final 2028 user results:

- `adam`: rank 1, 46 played, 27-12-7, 93 pts, promoted
- `jdc`: rank 11, 46 played, 17-11-18, 62 pts, stayed
- `bodin`: rank 24, 46 played, 5-8-33, 23 pts, stayed

Observed log counts:

- `manager_injury`: 28
- `sim_season`: 3
- `apply_progression`: 3
- `continue_season`: 2
- `invite_started`: 1

## 15 Users Online Stress

Users:

- `u01` through `u15`

Teams:

- `afc-fylde`
- `aldershot-town`
- `altrincham`
- `barrow`
- `boreham-wood`
- `boston-united`
- `carlisle-united`
- `eastleigh`
- `fc-halifax-town`
- `forest-green-rovers`
- `gateshead`
- `harrogate-town`
- `hartlepool-united`
- `hornchurch`
- `kidderminster-harriers`

Temporary state:

- `/tmp/ysp_online15_09d7deb1`

The run was stopped intentionally after the user said the coverage was enough. No temp PHP server process was left running.

### Completed Seasons

2026 National League:

- Season id: `s58ee52f433`
- Humans: 15
- Fixtures: 778 played, 0 pending
- Attempts: 25
- Injury swaps: 39
- Top human: `u01` rank 1, 93 pts
- Bottom human: `u09` rank 24, 31 pts
- Promoted humans: `u01`, `u04`

Continue split after 2026:

- `s6d4561416b`: League Two 2027, users `u01`, `u04`
- `sb984e3d927`: National League 2027, remaining 13 users

2027 League Two:

- Season id: `s6d4561416b`
- Humans: 2
- Fixtures: 893 played, 0 pending
- Outcome: `u01` stayed, `u04` stayed

2027 National League:

- Season id: `sb984e3d927`
- Humans: 13
- Fixtures: 778 played, 0 pending
- Attempts: 23
- Injury swaps: 34
- Top human: `u14` rank 5, 82 pts
- Bottom human: `u09` rank 24, 8 pts
- Promoted humans: none

Continue split after 2027:

- `se16f5c2f56`: League Two 2028, users `u01`, `u04`
- `s430f3e2d99`: National League 2028, remaining 13 users

2028 League Two:

- Season id: `se16f5c2f56`
- Humans: 2
- Fixtures: 893 played, 0 pending
- Attempts: 4
- Injury swaps: 3
- Top human: `u04` rank 23, 11 pts
- Bottom human: `u01` rank 24, 8 pts
- Promoted humans: none

2028 National League at stop time:

- Season id: `s430f3e2d99`
- Humans: 13
- Fixtures: 436 played, 332 pending
- Status: active

## Findings

- Online invite creation and invite acceptance worked with 15 users.
- Current-season routing worked after promotion split; promoted users moved to League Two and the others stayed in National League.
- `continueManagerSeason` created the correct next-season groups after both 2026 and 2027.
- Season simulation votes worked across multi-user groups.
- Injury blocking was frequent in large online groups, but every observed block was resolvable through normal squad swaps.
- No API 500s, bad CSRF errors, lost sessions, or broken manager-current mappings were observed from the app.
- A first test harness died from PHP client memory while reading huge JSON responses. That was a test-client issue, not an app error. The resumed harness avoided keeping large responses in memory.

## Not Fully Proven

- The full 15-user, 10-season target was intentionally stopped early.
- This primarily validates the online season-sim path. It does not replace a dedicated browser/manual smoke test of watched head-to-head match screens.

## Recommendation

Keep the current online season/continue logic. If this area is touched again, rerun a smaller fast test first:

- 3 users, 3 seasons, full completion.

Then rerun a larger stress test:

- 15 users until at least one promotion split and one following continue cycle.
