Skip to content

Merge phase 4 into main#3

Merged
harmandeeppal merged 12 commits into
mainfrom
feature/phase-4
Jan 9, 2026
Merged

Merge phase 4 into main#3
harmandeeppal merged 12 commits into
mainfrom
feature/phase-4

Conversation

@harmandeeppal
Copy link
Copy Markdown
Owner

No description provided.

Your Name added 12 commits January 8, 2026 19:41
Step 3.1: Client Simulation Loop
- Implemented deterministic client fixed-step simulation with accumulator (60Hz) and spiral guard (MAX_TICKS_PER_FRAME = 10).
- Fixed accumulator edge-case: compute whole ticks via floor+EPS and snap tiny residuals to zero to avoid one-tick loss during backlog processing.
- Preserve residual accumulator after clamping (backlog processed on subsequent frames).
- Added zero-allocation hot-path patterns (InputBatch reuse, pre-allocated RingBuffer access).

Step 3.2: Test Quality & Negative Tests
- Added dedicated negative tests file: Assets/Tests/Editor/Phase3EditModeNegativeTests.cs (spiral/backlog boundary test).
- Added Phase 1 & Phase 2 negative test suites: Phase1EditModeNegativeTests.cs, Phase2EditModeNegativeTests.cs (ghost-data, wrap handling, numeric stability, field preservation).
- Moved negative tests out of positive suite and documented them in AgenticDevelopment/TEST_REGISTRY.md.
- Added naming convention note for negative/boundary tests to AgenticDevelopment/.cursorrules.

Step 3.3: Docs & Standards
- Updated AgenticDevelopment/TEST_REGISTRY.md and .cursorrules to reflect test organization and naming conventions.
- Added comments in Phase3EditModeTests.cs pointing to negative tests file.

Testing & Validation
- EditMode tests: 26/26 passing locally (Phase 1–3 positive + negative suites).
- Zero-GC per-tick test passed (Editor-only profiler check).
- No compile errors or warnings observed.

Performance
- Hot-path changes preserve zero-alloc expectations (InputBatch reuse, pre-sized RingBuffer and lists).

Notes / Next Steps
- Ready to commit and push. CI run on GitHub Actions requires the UNITY_LICENSE repo secret for Unity activation — ensure it is present before pushing to trigger full CI.
- Recommend pushing to a feature branch, then opening PR for final review & CI validation.

CHECKPOINT 3: All Phase 3 acceptance criteria met. Ready for push  CI  merge.
- Add UNITY_EMAIL and UNITY_PASSWORD environment variables to test runner
- Update diagnostic step to check for email/password or license file
- Supports Unity Personal license activation via Unity ID credentials
- Remove UNITY_LICENSE from environment variables
- Use only UNITY_EMAIL and UNITY_PASSWORD for Personal license
- Update diagnostic check to match
- Use game-ci/unity-activate@v2 before running tests
- Activates Unity using UNITY_EMAIL and UNITY_PASSWORD
- Generates license file for test-runner to use
- Change runs-on from ubuntu-latest to self-hosted
- Remove Unity activation steps (not needed on self-hosted)
- Remove game-ci actions (use direct Unity.exe calls)
- Use PowerShell to invoke Unity 6000.3.2f1 directly
- Run EditMode and PlayMode tests in batch mode
- Add self-hosted runner setup documentation
- Change shell from pwsh to powershell
- Windows PowerShell is available by default
- pwsh (PowerShell Core) not in PATH on self-hosted runner
Step 5.1: ServerEntity Base  - Implemented ServerEntity.cs MonoBehaviour with 60Hz accumulator, MAX_TICKS_PER_FRAME=10, ServerInputBuffer and lastConfirmedInputTick tracking

Step 5.2: Input Reception  - Subscribes to FakeNetworkPipe.OnInputBatchReceived, validates tick range, stores inputs, updates lastConfirmedInputTick

Step 5.3: Server Simulation Loop  - UpdateWithDelta, prediction (repeat-last/zero), SimulationMath.Integrate, piggyback confirmedInputTick, FakeNetworkPipe.SendState, spiral guard preserved

Step 5.4: WelcomePacket  - GenerateWelcomePacket returns startTick and startState

Testing & Validation  - 9/9 Phase 4 tests passing (5 core + 4 negative); COMPLIANCE_VERIFICATION done and consolidated into COMPLIANCE_LOG.md per SOP

Performance  - Zero-GC verified per-tick

CHECKPOINT 4: CI pending on self-hosted runner; on success, proceed to PHASE 5 kickoff.
@harmandeeppal harmandeeppal merged commit 7d64e74 into main Jan 9, 2026
1 of 2 checks passed
@harmandeeppal harmandeeppal deleted the feature/phase-4 branch January 9, 2026 06:24
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.

1 participant