Skip to content

Add Wanderer as a mapper source - #61

Open
mogglemoss wants to merge 1 commit into
secondfry:masterfrom
mogglemoss:feature/wanderer-mapper
Open

mogglemoss wants to merge 1 commit into
secondfry:masterfrom
mogglemoss:feature/wanderer-mapper

Conversation

@mogglemoss

Copy link
Copy Markdown

Summary

Adds Wanderer as a third mapper implementation for the pluggable mapper architecture, alongside Tripwire and Eve Scout. Ported from the mogglemoss fork and rewritten onto the MapperSource/MapperRegistry interface.

Context

Wanderer is the actively developed mapper that many wormhole groups have migrated to. The modular mapper framework was built exactly for this kind of addition — this PR is the first new mapper to land on it since the architecture merged.

Approach

  • Model (wanderer.py): one GET per refresh against /api/maps/{slug}/signatures with a per-map bearer token — no session management needed, so it's simpler than Tripwire. Signatures of group Wormhole with a linked system become connections. The scanned side carries the hole type; the far side is inferred as K162, except when the type is unknown (no fabricated K162s). EOL and mass states come from Wanderer's custom_info JSON (time_status 2 = EOL; mass_status 2/3 = destab/critical); missing or malformed info defaults to stable, matching Wanderer's own UI for an unmarked hole.
  • Config: reuses the existing MapperConfig slots — map slug in user, bearer token in password (the slot the UI masks) — so the persisted JSON schema is unchanged and older binaries keep tolerating newer configs by skipping the unknown type.
  • UI: a WandererDialog following the TripwireDialog pattern (gui_wanderer.ui compiled with pyside6-uic, with the same package-relative resources_rc import fix as the other generated views). Add/Edit flows in MappersDialog dispatch on the new type.
  • Docs: MAPPER_MODULES.md gains a Wanderer section.

Testing

17 new tests in test_wanderer.py: config validation and URL normalization, the signature→connection translation (K162 inference, life/mass mapping, elapsed-time parsing, skipping unlinked/non-wormhole sigs), and the API failure modes (401/404/5xx, network errors, unexpected response shapes). SDE size lookups are pinned with mocks so the tests exercise translation logic, not database contents. Full suite: 101 passed.

Not covered: a live round trip against a real Wanderer instance (needs a map and an API token). The request/response handling is exercised against mocked API responses only.

Risks

Low — additive only. No existing mapper code paths change; the persisted config schema is untouched. The riskiest surface is Wanderer API drift, which fails soft (logged, -1 from augment_map, other mappers unaffected).

🤖 Generated with Claude Code

Wanderer (wanderer-industries/wanderer) is the actively developed mapper
many wormhole groups have moved to since Tripwire development slowed,
and it was the most-requested gap in the pluggable mapper architecture:
the framework shipped with only Tripwire and Eve Scout implementations.

Wanderer exposes a map's signatures over a REST API authenticated with a
per-map bearer token (Map Settings -> API), so unlike Tripwire there is
no session/login dance: one GET per refresh. Signatures of group
"Wormhole" that have a linked system become connections. The scanned
side carries the hole type and the far side is inferred as K162, except
when the type is unknown, where fabricating a K162 would claim knowledge
we don't have. EOL/mass flags live in Wanderer's custom_info JSON blob
(time_status 2 = EOL; mass_status 2/3 = destab/critical); missing or
malformed blobs are treated as stable, matching Wanderer's own UI
default for an unmarked hole.

Config reuses the existing MapperConfig slots rather than widening the
schema: the map slug goes in `user` and the bearer token in `password`,
which is also the slot the management UI masks. That keeps the persisted
JSON format unchanged, so configs written by this version don't break
older binaries (they already skip unknown mapper types).

The per-instance edit dialog follows the TripwireDialog pattern
(gui_wanderer.ui compiled with pyside6-uic, same hand-fix of the
resources_rc import to be package-relative as the other generated
views).

Tests pin the SDE size lookups with mocks so they exercise the
translation logic, not database contents.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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