Expose recent Reqs2X flags, add delta test generation, wire up the nele provider - #344
Open
ThisCakeIsALie wants to merge 5 commits into
Open
Expose recent Reqs2X flags, add delta test generation, wire up the nele provider#344ThisCakeIsALie wants to merge 5 commits into
ThisCakeIsALie wants to merge 5 commits into
Conversation
Three independent gaps against the current Reqs2X CLI:
- The `nele` provider was supported by the CLI but not selectable in the
extension. Adds the enum entry and the four settings feeding
VCAST_REQS2X_NELE_{API_KEY,BASE_URL,MODEL_NAME} plus the optional
reasoning model name.
- ProgressTracker only handled `progress` and `problem` events, silently
dropping `info` and `notice`. `info` already fires on the
--only-untraced path the extension uses, so inferring traceability on a
fully-traced RGW completed with no user-visible output at all. `notice`
carries the Vector Subscription nudge; phase 1 renders as information and
later phases as a warning, matching the CLI.
- The `reqs2x.reorder` setting passed --no-reorder to code2reqs and
reqs2tests, but no released CLI has ever accepted that flag, so turning
the setting off made both tools exit non-zero with an argparse error.
Setting and both call sites removed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds settings for --batch-size, --fast, --deduplicate, --allow-partial, --max-test-examples and --test-examples-sources, and a second command for --only-delta. --allow-partial was previously hardcoded on with no way to disable it. Reqs2X ships with VectorCAST and is versioned independently of the extension, so every flag newer than the currently shipped build has to be guarded. panreqSupportsOnlyUntraced was a bespoke single-flag cache; replaced with reqs2xSupportsFlag/reqs2xSupportedFlags, which cache one --help per binary so any number of flags cost a single subprocess. Probing only works for flags that appear in --help. argparse.SUPPRESS hides --json-events and --no-test-examples, which the shipped build does accept, so those stay unconditional -- verified by invoking the shipped binary directly. Confirmed rejected there and therefore guarded: --fast, --max-test-examples, --test-examples-sources, --only-delta. --only-delta is a command rather than a setting because it expresses per-run intent, and its menu entry is gated on a context key so it stays hidden when the installed Reqs2X predates the flag. Two consequences of delta runs are handled: the target .tst is removed up front and its absence tolerated afterwards, since a run with nothing to do returns before writing anything and would otherwise leave the previous run's script to be re-imported; and the completion message notes that tests written earlier for changed requirements are kept and may need pruning. noTestExamples is deprecated in favour of maxTestExamples: 0 rather than removed, so settings already in the wild keep working; while explicitly enabled it still wins. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The CCAST_.CFG watcher fires several times a second while clicast is active, and each event logged a line to the requirements output channel, drowning out everything else. The reason string existed only for that line, so it goes too. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Enabling fast mode against a Reqs2X that predates --fast dropped the flag and generated normally, leaving the setting reading as on with no indication. Settings cannot be gated on a context key the way the delta command is, so the only honest option is to say so at generation time. Warns per generation, listing the settings rather than the flags, and only for values the user actually chose: an untouched default loses nothing when the flag is missing, because the CLI default matches it. maxTestExamples: 0 is likewise never reported, since it maps to --no-test-examples, which is old enough to always be present. reqs2xSupportedFlags no longer logs the missing flags itself. It knew what was absent but not what was wanted, so it named all three on every run of a shipped build while saying nothing useful about intent. 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 #344 +/- ##
=======================================
Coverage 96.70% 96.70%
=======================================
Files 9 9
Lines 1729 1729
Branches 194 194
=======================================
Hits 1672 1672
Misses 57 57
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:
|
|
Den1552
approved these changes
Jul 31, 2026
Den1552
left a comment
Contributor
There was a problem hiding this comment.
I only had format the ts files with prettier but otherwise LGTM. Tests also pass.
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.



Catches the extension up with flags and events the Reqs2X CLI has gained.
Settings —
batchSize,fastMode,deduplicateTests,allowPartialTests,maxTestExamples,testExampleSources.--allow-partialwas hardcoded on with no way to disable it.noTestExamplesis deprecated in favour ofmaxTestExamples: 0rather than removed, so existing configs keep working (note VS Code hides deprecated settings unless they have a value).Delta generation — second command, Generate Tests from Requirements (Untested or Changed Only), for
--only-delta. A command rather than a setting because it is per-run intent. Its menu entry is gated on a context key so it stays hidden when the installed Reqs2X predates the flag. A delta run with nothing to do writes no.tst, so the target is removed up front and its absence tolerated afterwards — otherwise the previous run's script gets re-imported.nele provider — was supported by the CLI but not selectable.
Event handling —
ProgressTrackerdroppedinfoandnotice.infoalready fires on the--only-untracedpath we use, so inferring traceability on a fully-traced RGW finished with no visible output.noticecarries the subscription nudge.--no-reorderremoved — no released CLI has ever accepted it, so turning thereordersetting off made code2reqs and reqs2tests exit non-zero.Version skew —
panreqSupportsOnlyUntracedwas a bespoke single-flag cache; nowreqs2xSupportsFlag/reqs2xSupportedFlagsover one cached--helpper binary. Recent flags are probed and dropped when absent; because settings cannot be gated on a context key the way a command can, generation warns when a setting the user actually chose was dropped.Also drops the per-event log line from the availability refresh, which the
CCAST_.CFGwatcher was emitting several times a second while clicast was active.