feat(client): sprint 11 combine — OQ-07 + WRONG button captures #40

Closed
jpmschweitzer wants to merge 0 commits from client into main
Owner

Summary

Sprint 11: Combine — client team deliverables.

  • #522 (OQ-07 resolution): Insert-off behavior resolved as option (a) — cursor shape still changes (body orients to targets), verb labels and interaction prompts suppressed when insert_active == false. D-056 and D-057 amended with resolution notes.
  • #507 (WRONG button full captures): Upgrades F12 bug capture from single-tick MVP to 60-tick rolling history. Pre-allocated ring buffers for inputs and snapshots. Outputs inputs.jsonl (replay-compatible), snapshots.jsonl, and seed.txt. Inter-frame input accumulation ensures no inputs lost between server ticks at 60fps/10tps.
  • 33 new tests: 17 for ring buffer (capacity, overwrite, JSONL format, seed fallback), 16 for insert-off behavior (diegetic test, cursor transitions, cross-system consistency).

Server dependency

seed.txt writes "unavailable" — server needs to add rng_seed: u64 field to ObserverSnapshot for deterministic replay. Client-side parsing is wired and ready.

Test plan

  • 16/16 insert-off behavior tests pass
  • 17/17 ring buffer tests pass
  • 536/536 Rust tests pass
  • Existing cursor state tests pass (no regression)
  • Architecture review by Tyre (conditional pass → fix applied)
  • make pre-pr blocked by pre-existing cargo fmt failure on sprint-10 server code (not from this PR)
## Summary Sprint 11: Combine — client team deliverables. - **#522 (OQ-07 resolution):** Insert-off behavior resolved as option (a) — cursor shape still changes (body orients to targets), verb labels and interaction prompts suppressed when `insert_active == false`. D-056 and D-057 amended with resolution notes. - **#507 (WRONG button full captures):** Upgrades F12 bug capture from single-tick MVP to 60-tick rolling history. Pre-allocated ring buffers for inputs and snapshots. Outputs `inputs.jsonl` (replay-compatible), `snapshots.jsonl`, and `seed.txt`. Inter-frame input accumulation ensures no inputs lost between server ticks at 60fps/10tps. - **33 new tests:** 17 for ring buffer (capacity, overwrite, JSONL format, seed fallback), 16 for insert-off behavior (diegetic test, cursor transitions, cross-system consistency). ## Server dependency `seed.txt` writes "unavailable" — server needs to add `rng_seed: u64` field to `ObserverSnapshot` for deterministic replay. Client-side parsing is wired and ready. ## Test plan - [x] 16/16 insert-off behavior tests pass - [x] 17/17 ring buffer tests pass - [x] 536/536 Rust tests pass - [x] Existing cursor state tests pass (no regression) - [x] Architecture review by Tyre (conditional pass → fix applied) - [ ] `make pre-pr` blocked by pre-existing `cargo fmt` failure on sprint-10 server code (not from this PR)
jpmschweitzer added 4 commits 2026-02-19 12:06:23 +01:00
Option (a): cursor shape still changes (body orients to targets), but
verb labels and interaction prompts are suppressed when insert_active
is false. Amends D-056 and D-057 with resolution note.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Upgrades bug_report_dialog.gd from single-tick MVP to 60-tick rolling
history. Pre-allocated ring buffers for inputs and snapshots. Outputs
inputs.jsonl (replay-compatible), snapshots.jsonl, and seed.txt on F12.
Inter-frame input accumulation ensures no inputs lost between server ticks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
33 tests: 17 for ring buffer (capacity, overwrite, JSONL format, seed),
16 for insert-off behavior (diegetic test, cursor transitions, cross-system).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test plan for #507/#522, preliminary review of #522, and final
combine test report. All tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Owner

Review: client -> main (PR #40)

Hoshe (Code Quality): APPROVE

6 suggestions.

# File:line Severity Issue
1 main.gd:118 suggestion _insert underscore prefix on used variable — rename to insert_state.
2 test_bug_report_ring_buffer.gd suggestion No after_each — GameState mutations leak on assertion failure. Add after_each() to reset modified fields.
3 test_insert_off_behavior.gd:363 suggestion Sprint stance restore skipped on null early-return — move restore into after_each().
4 test_bug_report_ring_buffer.gd:271 suggestion Assertion message says "unknown" but code returns "unavailable". Fix message.
5 bug_report_dialog.gd:_save_report suggestion Document memory ceiling of 60 full JSON snapshots in ring buffer.
6 bug_report_dialog.gd:_get_current_seed suggestion rng_seed as u64 loses precision via JSON float — consider string encoding when field lands.

Tyre (Architecture): APPROVE

7 suggestions, all clean.

# File:line Severity Issue
1 bug_report_dialog.gd:150 suggestion SimBridge._action_enum_to_wire() — private method access across scripts. Consider public alias.
2 bug_report_dialog.gd:39-44 suggestion Parallel ring buffer state (6 vars) — extract RingBuffer class if a third buffer is ever needed.
3 main.gd:86-92 suggestion Insert-active propagation to 3 nodes inline — consider signal if >3 consumers.
4 game_state.gd suggestion insert_active defaults to true — document assumption for future no-insert characters.
5 bug_report_dialog.gd:72-73 suggestion Unused _tick parameter — add @warning_ignore or remove.
6 Cargo.lock suggestion Version bump 0.1.9→0.1.10 — verify aligns with sprint convention.
7 perception.md OQ-07 suggestion Dense single-line amendment — consider bullet-point structure.

Architecture: D-020 ✓, D-010 ✓, D-030 ✓, D-048/D-056/D-057/D-058 ✓. State management clean, no autoload coupling.

Verdict: APPROVED (with suggestions)

All suggestions are refinement-level. Please address the after_each test isolation items (Hoshe #2, #3) and the variable naming (#1) as quick wins. The rest are at your discretion.

## Review: client -> main (PR #40) ### Hoshe (Code Quality): APPROVE 6 suggestions. | # | File:line | Severity | Issue | |---|-----------|----------|-------| | 1 | `main.gd:118` | suggestion | `_insert` underscore prefix on used variable — rename to `insert_state`. | | 2 | `test_bug_report_ring_buffer.gd` | suggestion | No `after_each` — GameState mutations leak on assertion failure. Add `after_each()` to reset modified fields. | | 3 | `test_insert_off_behavior.gd:363` | suggestion | Sprint stance restore skipped on null early-return — move restore into `after_each()`. | | 4 | `test_bug_report_ring_buffer.gd:271` | suggestion | Assertion message says "unknown" but code returns "unavailable". Fix message. | | 5 | `bug_report_dialog.gd:_save_report` | suggestion | Document memory ceiling of 60 full JSON snapshots in ring buffer. | | 6 | `bug_report_dialog.gd:_get_current_seed` | suggestion | `rng_seed` as u64 loses precision via JSON float — consider string encoding when field lands. | ### Tyre (Architecture): APPROVE 7 suggestions, all clean. | # | File:line | Severity | Issue | |---|-----------|----------|-------| | 1 | `bug_report_dialog.gd:150` | suggestion | `SimBridge._action_enum_to_wire()` — private method access across scripts. Consider public alias. | | 2 | `bug_report_dialog.gd:39-44` | suggestion | Parallel ring buffer state (6 vars) — extract `RingBuffer` class if a third buffer is ever needed. | | 3 | `main.gd:86-92` | suggestion | Insert-active propagation to 3 nodes inline — consider signal if >3 consumers. | | 4 | `game_state.gd` | suggestion | `insert_active` defaults to `true` — document assumption for future no-insert characters. | | 5 | `bug_report_dialog.gd:72-73` | suggestion | Unused `_tick` parameter — add `@warning_ignore` or remove. | | 6 | `Cargo.lock` | suggestion | Version bump 0.1.9→0.1.10 — verify aligns with sprint convention. | | 7 | `perception.md` OQ-07 | suggestion | Dense single-line amendment — consider bullet-point structure. | Architecture: D-020 ✓, D-010 ✓, D-030 ✓, D-048/D-056/D-057/D-058 ✓. State management clean, no autoload coupling. ### Verdict: APPROVED (with suggestions) All suggestions are refinement-level. Please address the `after_each` test isolation items (Hoshe #2, #3) and the variable naming (#1) as quick wins. The rest are at your discretion.
jpmschweitzer added 1 commit 2026-02-19 12:19:47 +01:00
- Rename _insert to insert_state in main.gd (Hoshe #1)
- Add after_each() to test_bug_report_ring_buffer.gd for GameState
  cleanup on assertion failure (Hoshe #2)
- Add after_each() to test_insert_off_behavior.gd for stance/interaction
  restore on assertion failure (Hoshe #3)
- Fix assertion message: "unknown" → "unavailable" (Hoshe #4)
- Document memory ceiling of 60 JSON snapshots in ring buffer (Hoshe #5)
- Add precision warning for u64 rng_seed via JSON float (Hoshe #6)
- Promote _action_enum_to_wire to public action_enum_to_wire (Tyre #1)
- Add @warning_ignore for unused _tick parameter (Tyre #5)
- Document insert_active assumption for future no-insert characters (Tyre #4)
- Restructure OQ-07 decision amendments as bullet points (Tyre #7)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Owner

Re-Review: client -> main (PR #40) — Round 2

Hoshe (Code Quality): APPROVE

All 6 suggestions addressed. 1 new minor suggestion: restore rationale comment on _tick param alongside @warning_ignore. Does not block merge.

Tyre (Architecture): APPROVE

All 7 suggestions addressed. Clean rename across 9 files, test isolation fixed, decision docs reformatted.

Verdict: APPROVED — ready to merge.

## Re-Review: client -> main (PR #40) — Round 2 ### Hoshe (Code Quality): APPROVE All 6 suggestions addressed. 1 new minor suggestion: restore rationale comment on `_tick` param alongside `@warning_ignore`. Does not block merge. ### Tyre (Architecture): APPROVE All 7 suggestions addressed. Clean rename across 9 files, test isolation fixed, decision docs reformatted. ### Verdict: APPROVED — ready to merge.
jpmschweitzer closed this pull request 2026-02-19 12:37:36 +01:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jpmschweitzer/settled-reach#40