VisibleEntity now carries relationship (D-033 entity color) and observation (Visible vs Remembered) fields
compute_observer_snapshot queries the player's KnowledgeGraph to overlay relationship state on visible entities and include remembered (not-in-LOS) entities as fog ghosts at their last known position
New fields use #[serde(default)] for backward-compatible deserialization of old fixtures
Regenerated all msgpack fixtures with new wire format
## Summary
- **VisibleEntity** now carries `relationship` (D-033 entity color) and `observation` (Visible vs Remembered) fields
- **compute_observer_snapshot** queries the player's KnowledgeGraph to overlay relationship state on visible entities and include remembered (not-in-LOS) entities as fog ghosts at their last known position
- New fields use `#[serde(default)]` for backward-compatible deserialization of old fixtures
- Regenerated all msgpack fixtures with new wire format
## Tickets
- Closes #366 — Observer snapshot knowledge integration
## Test plan
- [x] `visible_npc_has_relationship_from_knowledge` — visible NPC carries Hostile relationship from knowledge graph
- [x] `remembered_entity_appears_as_ghost` — not-in-LOS NPC appears as Remembered entity at last known position with correct confidence/age
- [x] `direct_confidence_not_shown_as_remembered` — Direct-confidence entities excluded from ghost list (transient inconsistency guard)
- [x] All 115 existing tests pass (fixtures deserialize with new fields via serde default)
- [x] Regenerated msgpack fixtures
🤖 Generated with [Claude Code](https://claude.com/claude-code)
VisibleEntity now carries relationship state (D-033 entity color) and
observation type (Visible vs Remembered). compute_observer_snapshot
queries the player's KnowledgeGraph to overlay relationship data on
visible entities and include remembered (not-in-LOS) entities as fog
ghosts at their last known position. Regenerated msgpack fixtures.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remembered entities from the knowledge graph are now overlaid onto the observer snapshot. Good use of #[serde(default)] for backward compat.
#
File
Severity
Issue
1
server/src/perception/observer.rs ~Step 6
warning
Remembered entity position could collide with a visible entity's tile. No dedup check on (x, y, z) — client may render two sprites on the same tile
2
server/src/perception/observer.rs ~Step 6
warning
No z-level filter for remembered entities — visible entities are filtered to player_z but remembered entities use last_known_position which could be on a different z-level
3
server/src/perception/observer.rs
suggestion
Missing test coverage for remembered entity integration, edge cases (entity in both visible + remembered, stale knowledge, no position)
Tyre (Architecture): REQUEST_CHANGES
Overall the integration is clean and follows D-041 patterns.
#
File
Severity
Issue
1
server/src/perception/observer.rs ~Step 6
warning
Same z-level concern as Hoshe — remembered entities should respect z-level filtering
2
server/src/bridge/types.rs
suggestion
ObserverSnapshot version is still 2 — consider bumping to 3 since wire format changed (though #[serde(default)] provides compat)
Note: Tyre also flagged EntityVisibility missing Default and a "phase ordering bug" for Direct confidence skip — both are false positives. The code already has impl Default for EntityVisibility and the Direct confidence skip is intentional with explanatory comments.
Verdict: CHANGES REQUESTED
The z-level filter for remembered entities is the most substantive issue — it could cause entities from other floors to appear in the snapshot. Position collision is a real edge case worth addressing too.
## Dual-Agent Review: server -> main (PR #12)
**Branch:** `server` — `feat(simulation): knowledge graph snapshot integration (#366)`
### Hoshe (Code Quality): REQUEST_CHANGES
Remembered entities from the knowledge graph are now overlaid onto the observer snapshot. Good use of `#[serde(default)]` for backward compat.
| # | File | Severity | Issue |
|---|------|----------|-------|
| 1 | `server/src/perception/observer.rs` ~Step 6 | warning | Remembered entity position could collide with a visible entity's tile. No dedup check on `(x, y, z)` — client may render two sprites on the same tile |
| 2 | `server/src/perception/observer.rs` ~Step 6 | warning | No z-level filter for remembered entities — visible entities are filtered to `player_z` but remembered entities use `last_known_position` which could be on a different z-level |
| 3 | `server/src/perception/observer.rs` | suggestion | Missing test coverage for remembered entity integration, edge cases (entity in both visible + remembered, stale knowledge, no position) |
### Tyre (Architecture): REQUEST_CHANGES
Overall the integration is clean and follows D-041 patterns.
| # | File | Severity | Issue |
|---|------|----------|-------|
| 1 | `server/src/perception/observer.rs` ~Step 6 | warning | Same z-level concern as Hoshe — remembered entities should respect z-level filtering |
| 2 | `server/src/bridge/types.rs` | suggestion | ObserverSnapshot `version` is still 2 — consider bumping to 3 since wire format changed (though `#[serde(default)]` provides compat) |
Note: Tyre also flagged `EntityVisibility` missing `Default` and a "phase ordering bug" for Direct confidence skip — both are **false positives**. The code already has `impl Default for EntityVisibility` and the Direct confidence skip is intentional with explanatory comments.
### Verdict: CHANGES REQUESTED
The z-level filter for remembered entities is the most substantive issue — it could cause entities from other floors to appear in the snapshot. Position collision is a real edge case worth addressing too.
- Filter remembered entities by z-level (Hoshe + Tyre warning)
- Skip remembered ghosts on currently visible tiles (Hoshe warning)
- Bump ObserverSnapshot version to 3 (Tyre suggestion)
- Add edge case tests: visible tile collision, different z-level,
knowledge without position (Hoshe suggestion)
- Regenerate msgpack fixtures for v3
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All review items addressed in 22de6c7. Z-level filter added, ghosts on visible tiles suppressed, version bumped to v3, 3 new edge case tests. 118/118 pass.
All review items addressed in 22de6c7. Z-level filter added, ghosts on visible tiles suppressed, version bumped to v3, 3 new edge case tests. 118/118 pass.
All 4 previously flagged issues fixed. 13 observer tests cover all edge cases including z-level filtering, visible tile dedup, Direct confidence skip, and no-position entities. 116 tests pass. Implementation is correct with defensive programming throughout.
Tyre (Architecture): APPROVE
D-020/D-033/D-041 compliant. Knowledge graph integration respects client-server boundary — ObserverSnapshot remains the sole wire-crossing structure. #[serde(default)] on new fields provides backward compat. Version bumped to 3. Performance within D-041 budget. Architecture extensible for Sprint 3 (gossip, contradiction detection, Stale state).
Verdict: APPROVED
## Dual-Agent Review: server -> main (PR #12, re-review)
**Branch:** `server` — `feat(simulation): knowledge graph snapshot integration (#366)`
### Hoshe (Code Quality): APPROVE
All 4 previously flagged issues fixed. 13 observer tests cover all edge cases including z-level filtering, visible tile dedup, Direct confidence skip, and no-position entities. 116 tests pass. Implementation is correct with defensive programming throughout.
### Tyre (Architecture): APPROVE
D-020/D-033/D-041 compliant. Knowledge graph integration respects client-server boundary — `ObserverSnapshot` remains the sole wire-crossing structure. `#[serde(default)]` on new fields provides backward compat. Version bumped to 3. Performance within D-041 budget. Architecture extensible for Sprint 3 (gossip, contradiction detection, Stale state).
### Verdict: APPROVED
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
relationship(D-033 entity color) andobservation(Visible vs Remembered) fields#[serde(default)]for backward-compatible deserialization of old fixturesTickets
Test plan
visible_npc_has_relationship_from_knowledge— visible NPC carries Hostile relationship from knowledge graphremembered_entity_appears_as_ghost— not-in-LOS NPC appears as Remembered entity at last known position with correct confidence/agedirect_confidence_not_shown_as_remembered— Direct-confidence entities excluded from ghost list (transient inconsistency guard)🤖 Generated with Claude Code
Dual-Agent Review: server -> main (PR #12)
Branch:
server—feat(simulation): knowledge graph snapshot integration (#366)Hoshe (Code Quality): REQUEST_CHANGES
Remembered entities from the knowledge graph are now overlaid onto the observer snapshot. Good use of
#[serde(default)]for backward compat.server/src/perception/observer.rs~Step 6(x, y, z)— client may render two sprites on the same tileserver/src/perception/observer.rs~Step 6player_zbut remembered entities uselast_known_positionwhich could be on a different z-levelserver/src/perception/observer.rsTyre (Architecture): REQUEST_CHANGES
Overall the integration is clean and follows D-041 patterns.
server/src/perception/observer.rs~Step 6server/src/bridge/types.rsversionis still 2 — consider bumping to 3 since wire format changed (though#[serde(default)]provides compat)Note: Tyre also flagged
EntityVisibilitymissingDefaultand a "phase ordering bug" for Direct confidence skip — both are false positives. The code already hasimpl Default for EntityVisibilityand the Direct confidence skip is intentional with explanatory comments.Verdict: CHANGES REQUESTED
The z-level filter for remembered entities is the most substantive issue — it could cause entities from other floors to appear in the snapshot. Position collision is a real edge case worth addressing too.
All review items addressed in
22de6c7. Z-level filter added, ghosts on visible tiles suppressed, version bumped to v3, 3 new edge case tests. 118/118 pass.Dual-Agent Review: server -> main (PR #12, re-review)
Branch:
server—feat(simulation): knowledge graph snapshot integration (#366)Hoshe (Code Quality): APPROVE
All 4 previously flagged issues fixed. 13 observer tests cover all edge cases including z-level filtering, visible tile dedup, Direct confidence skip, and no-position entities. 116 tests pass. Implementation is correct with defensive programming throughout.
Tyre (Architecture): APPROVE
D-020/D-033/D-041 compliant. Knowledge graph integration respects client-server boundary —
ObserverSnapshotremains the sole wire-crossing structure.#[serde(default)]on new fields provides backward compat. Version bumped to 3. Performance within D-041 budget. Architecture extensible for Sprint 3 (gossip, contradiction detection, Stale state).Verdict: APPROVED
Pull request closed