CSV RGW gateways now work correctly when inferring traceability and modifying them on VC26-SP1 and beyond - #345
Merged
Merged
Conversation
Two RGW problems, both reproduced against real gateways. 1. 2026sp1 split requirements_gateway/settings.json into gateway_settings.json (current_gateway) plus csv_settings.json, and renamed the CSV source key from csv.csv_path to import_csv_path. The extension only read the old file, so on sp1+ gateways the source path always came back null: saving edits and inferring traceability failed with "this RGW's source is not a CSV", and RGWs generated by the extension itself were silently locked read-only, because the origin.json fallback (temp-looking source CSV => generated by us) could no longer see the path. 2026sp2's panreq writes the new layout and still writes no origin.json, so every freshly generated RGW hit that second path. Read both layouts, file by file rather than as one unit. Migration leaves the original settings.json behind where it goes stale, so a split file wins wherever it exists -- but it can also write gateway_settings.json without writing csv_settings.json, leaving settings.json the only record of the path, so the two are read independently. Treating the split layout as all-or-nothing broke a real half-migrated gateway. 2. Inferring traceability required a CSV-backed gateway, which ruled out DOORS, Polarion and Jama entirely. panreq reads an RGW directly as its source and needs no source format flag to do it, so pass the gateway as both source and target. Verified against a gateway hand-configured as polarion (current_gateway set to polarion, no csv settings, requirements under a "[Polarion - <project>]" group key, the format polarion_gateway.get_group_name produces) -- no Polarion server was involved: all four requirements were traced, where the same call previously threw before reaching panreq. Verified by creating CSV gateways with VectorCAST 25 and 26 (single file) and 26.sp2 (split), migrating a 26 gateway with 26.sp2, and running the real read, save and infer paths headless against each. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #345 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 9 10 +1
Lines 1729 1776 +47
Branches 216 227 +11
=========================================
+ Hits 1729 1776 +47
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
I removed some unused imports + prettier, otherwise LGTM. |
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



The layout of the CSV gateway settings changed. This PR makes looking up the relevant settings robust across both layouts.