This repository was archived by the owner on Oct 11, 2026. It is now read-only.
Repository navigation
feat(ei): add bounded WvW V2 process adapter - #343
Merged
Merged
Conversation
Add EiV2ProcessAdapter, the process-infrastructure side of the parser boundary: it invokes a configured Elite Insights CLI with the certified V2 settings, isolates each invocation in its own temporary workspace, requires exactly one fresh _wvw_export_v2.json output, and validates it with the certified gw2_core WvwExportV2 contract. Failures are typed (configuration, workspace, timeout, non-zero exit, missing/ambiguous output, malformed JSON, contract violation) with metadata-safe diagnostics, and workspaces are cleaned on success and failure. The adapter is not wired into production ingestion; the legacy parser adapter remains the only production parse path. Tests use a fake EI executable, so no private corpus, database, or real EI build is required. Signed-off-by: Roland Salardon <r.salardon@gmail.com>
Reject valid-looking V2 exports produced by an unexpected EI parser version via a typed EiProcessVersionError, defaulting to the certified candidate's 3.26.0.0. Because the certified exporter writes source_commit=null, the guard verifies the certified parser version, not the exact Git commit of the producing build. Wrap the adapter-owned config write and export read so material workspace filesystem failures surface as EiProcessWorkspaceError instead of a raw OSError, and require a positive finite timeout (rejecting +/-inf and NaN). Focused tests cover version acceptance/rejection, the extended timeout matrix, and both wrapped filesystem failures; all 25 pre-existing adapter tests keep passing. Signed-off-by: Roland Salardon <r.salardon@gmail.com>
Resolve the EI executable to an absolute, symlink-stable path at construction time so a later working-directory change cannot alter which binary a stored command invokes. Surface undecodable export bytes (UnicodeDecodeError as well as JSONDecodeError) through the typed EiProcessOutputFormatError with the original exception chained, and wrap workspace-enumeration OSError in EiProcessWorkspaceError so the typed filesystem contract is internally consistent. Cleanup, version/provenance policy, and all other adapter properties are unchanged; focused tests cover relative-path stability, symlink resolution, adversarial invalid-UTF-8 bytes, and enumeration failure. Signed-off-by: Roland Salardon <r.salardon@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the bounded Elite Insights WvwExportV2 process adapter prototype on top of the certified V2 contract merged in #342.
Authoritative candidate:
bb2a17da60161933ddb7f7de7d3635037ea27625Base main:
7d24ed65a5937e7ea176034e652bc6bf6d8b4987Certified Elite Insights V2 reference:
445eeb80e373b4597b0b38f9fbf90099c475fefc(
parser_version = 3.26.0.0)Independent review:
PASS — READY_FOR_PROCESS_ADAPTER_PRScope
This PR adds only:
apps/api/src/gw2analytics_api/services/ei_v2_process_adapter.pytests/scripts/test_ei_v2_process_adapter.pyKey properties
WvwExportV2model3.26.0.0)Validation
Independent final review:
PASS — READY_FOR_PROCESS_ADAPTER_PRFocused adapter tests:
Also validated:
git diff --checkKnown bounded limitations
source_commit = null, so the adapter verifiesparser_version, not exact producing Git commit identityExplicitly out of scope
This PR does NOT:
parser_adapter