Skip to content

Commit 95a816d

Browse files
CopilotDaveSkender
andauthored
test: Test infrastructure cleanup (general) (#1723)
Signed-off-by: Dave Skender <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: DaveSkender <[email protected]>
1 parent 0a7af1a commit 95a816d

File tree

192 files changed

+2069
-2704
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+2069
-2704
lines changed

.coderabbit.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ reviews:
2222
estimate_code_review_effort: false
2323
poem: false
2424

25-
related_issues: false
26-
related_prs: false
25+
related_issues: true
26+
related_prs: true
2727

2828
suggested_labels: false
2929
auto_apply_labels: false

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"ghcr.io/devcontainers/features/github-cli:1": {
2222
"version": "latest"
2323
},
24-
"ghcr.io/devcontainers/features/node:1": {
25-
"version": "24.10.0"
24+
"ghcr.io/devcontainers-extra/features/angular-cli:2": {
25+
"version": "latest"
2626
},
2727
"ghcr.io/devcontainers/features/ruby:1": {
2828
"version": "3.3"

.devcontainer/startup.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,10 @@ fi
1919
# Apply to current session
2020
eval "$TOOLS_PATH_LINE"
2121

22-
# Verify Node.js and npm are available
23-
echo "🔍 Verifying Node.js environment..."
24-
node --version
25-
npm install --global npm@latest
26-
npm --version
27-
2822
# Verify .NET is available
2923
echo "🔍 Verifying .NET environment..."
3024
dotnet --version
3125

32-
# Restore global tools
33-
echo "🧰 Installing NPM-based tools..."
34-
npm install --global @angular/cli
35-
npm list --global
36-
3726
echo "🧰 Installing .NET-based tools..."
3827
dotnet tool install --global dotnet-format
3928
dotnet tool install --global roslynator.dotnet.cli

.github/agents/streamhub-testing.agent.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Every StreamHub QuoteObserver test MUST cover these scenarios:
7777

7878
```csharp
7979
[TestMethod]
80-
public void QuoteObserver()
80+
public void QuoteObserver_WithWarmupLateArrivalAndRemoval_MatchesSeriesExactly()
8181
{
8282
IQuoteProvider<IQuote> quotes = GetQuotesProvider();
8383

@@ -215,7 +215,7 @@ public void Standard()
215215

216216
```csharp
217217
[TestMethod]
218-
public void QuoteObserver()
218+
public void QuoteObserver_WithWarmupLateArrivalAndRemoval_MatchesSeriesExactly()
219219
{
220220
// Warmup + stream + duplicates + Insert + Remove + parity check
221221
// (See canonical pattern above)
@@ -298,7 +298,7 @@ public void CustomToString()
298298

299299
### Interface methods - based on provider pattern
300300

301-
- `QuoteObserver()` - If implementing ITestQuoteObserver
301+
- `QuoteObserver_WithWarmupLateArrivalAndRemoval_MatchesSeriesExactly()` - If implementing ITestQuoteObserver
302302
- `ChainObserver()` - If implementing ITestChainObserver
303303
- `ChainProvider()` - If implementing ITestChainProvider
304304
- `PairsObserver()` - If implementing ITestPairsObserver

.github/instructions/codacy.instructions.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Configuration for AI behavior when interacting with Codacy's MCP Server
1515
- repository: Stock.Indicators
1616
- Avoid calling `git remote -v` unless really necessary
1717

18-
## CRITICAL: After ANY successful `edit_file` or `reapply` operation
18+
## After ANY successful `edit_file` or `reapply` operation
1919

2020
- For complex or significant file changes run the `codacy_cli_analyze` tool from Codacy's MCP Server for each file that was edited before finishing your turn, with:
2121
- `rootPath`: set to the workspace path
@@ -26,12 +26,10 @@ Configuration for AI behavior when interacting with Codacy's MCP Server
2626

2727
## When you tried to run the `codacy_cli_analyze` tool and the Codacy CLI is not installed
2828

29-
- Check if the project has `@codacy/codacy-mcp` NPM package installed in `package.json` devDependencies
30-
- If the NPM package is installed but CLI is not available, recommend running `npm install` to ensure dependencies are installed
31-
- If the NPM package is not installed, ask the user 'Codacy CLI is not available. This project uses NPM packages for Codacy. Would you like me to add the @codacy/codacy-mcp package to devDependencies?'
32-
- If the user responds with "yes", run `npm install --save-dev @codacy/codacy-mcp` and then continue with the original task
33-
- If the user responds with "no", instruct the user that they can disable automatic analysis in the extension settings
34-
- Wait for the user to respond before proceeding with any other actions
29+
- Simply use `npx @codacy/codacy-mcp` to invoke the Codacy CLI directly
30+
- npx will automatically download and run the tool without requiring installation
31+
- Do not ask the user to install anything
32+
- Continue with the analysis using the npx command
3533

3634
## After every response
3735

@@ -51,12 +49,11 @@ Configuration for AI behavior when interacting with Codacy's MCP Server
5149
## CRITICAL: Dependencies and Security Checks
5250

5351
- IMMEDIATELY after ANY of these actions:
54-
- Running npm/yarn/pnpm install
55-
- Adding dependencies to package.json
56-
- Adding requirements to requirements.txt
52+
- Adding dependencies to requirements.txt
5753
- Adding dependencies to pom.xml
5854
- Adding dependencies to build.gradle
59-
- Any other package manager operations
55+
- Adding dependencies to .csproj files
56+
- Any other package manager operations (excluding npm/yarn/pnpm as this project does not use Node.js packages)
6057
- You MUST run the `codacy_cli_analyze` tool with:
6158
- `rootPath`: set to the workspace path
6259
- `tool`: set to "trivy"
@@ -65,10 +62,6 @@ Configuration for AI behavior when interacting with Codacy's MCP Server
6562
- Stop all other operations
6663
- Propose and apply fixes for the security issues
6764
- Only continue with the original task after security issues are resolved
68-
- EXAMPLE:
69-
- After: npm install react-markdown
70-
- Do: Run codacy_cli_analyze with trivy
71-
- Before: Continuing with any other tasks
7265

7366
## General
7467

@@ -78,7 +71,7 @@ Configuration for AI behavior when interacting with Codacy's MCP Server
7871
- Do not run `codacy_cli_analyze` looking for changes in duplicated code or code complexity metrics.
7972
- Complexity metrics are different from complexity issues. When trying to fix complexity in a repository or file, focus on solving the complexity issues and ignore the complexity metric.
8073
- Do not run `codacy_cli_analyze` looking for changes in code coverage.
81-
- The Codacy CLI is available through the `@codacy/codacy-mcp` NPM package installed in this project's devDependencies.
74+
- The Codacy CLI can be invoked via `npx @codacy/codacy-mcp` when needed.
8275
- When calling `codacy_cli_analyze`, only send provider, organization and repository if the project is a git repository.
8376

8477
## Whenever a call to a Codacy tool that uses `repository` or `organization` as a parameter returns a 404 error
@@ -89,4 +82,4 @@ Configuration for AI behavior when interacting with Codacy's MCP Server
8982
- After setup, immediately retry the action that failed (only retry once)
9083

9184
---
92-
Last updated: October 12, 2025
85+
Last updated: November 5, 2025

.github/instructions/indicator-stream.instructions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,14 +396,14 @@ public class CorrelationHub : StreamHubTestBase, ITestPairsObserver
396396

397397
#### ITestQuoteObserver interface
398398

399-
The `ITestQuoteObserver` interface is required for all indicators that support direct quote provider observation. It replaces the need to override `QuoteObserver()` in the test class. Implement this interface and provide a `QuoteObserver()` method to test hub compatibility with quote providers. See `Ema.StreamHub.Tests.cs` for a reference implementation.
399+
The `ITestQuoteObserver` interface is required for all indicators that support direct quote provider observation. It replaces the need to override `QuoteObserver_WithWarmupLateArrivalAndRemoval_MatchesSeriesExactly()` in the test class. Implement this interface and provide a `QuoteObserver_WithWarmupLateArrivalAndRemoval_MatchesSeriesExactly()` method to test hub compatibility with quote providers. See `Ema.StreamHub.Tests.cs` for a reference implementation.
400400

401401
**When to use:**
402402

403403
- All indicators that can be observed directly from a quote provider (e.g., EMA, SMA, Renko, etc.)
404404
- Not required for dual-stream (pairs) indicators
405405

406-
**Do not override `QuoteObserver()` in the test class; implement `ITestQuoteObserver` instead.**
406+
**Do not override `QuoteObserver_WithWarmupLateArrivalAndRemoval_MatchesSeriesExactly()` in the test class; implement `ITestQuoteObserver` instead.**
407407

408408
### Comprehensive rollback validation (required)
409409

@@ -420,7 +420,7 @@ These scenarios replace the need for a separate rollback-specific interface.
420420

421421
### Provider history (Insert/Remove) testing
422422

423-
Provider history mutations are required and are part of the “Comprehensive rollback validation” section above (see EMA hub tests for the canonical pattern). Use `ProviderHistoryTesting()` in `StreamHubTestBase` as needed for indicator-specific logic.
423+
Provider history mutations are required and are part of the “Comprehensive rollback validation” section above (see EMA hub tests for the canonical pattern). Use `AssertProviderHistoryIntegrity()` in `StreamHubTestBase` as needed for indicator-specific logic.
424424

425425
### Performance benchmarking
426426

.github/instructions/source-code-completion.instructions.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ These instructions apply to all files in the `src/` and `tests/` folders and cov
3636

3737
- Run `dotnet restore` (or the **Restore: .NET Packages** task).
3838
- Run `dotnet format` to auto-correct stylistic issues.
39-
- Run `npm run lint:md:fix` whenever documentation changed.
40-
- If tooling changed, delete `package-lock.json` and `node_modules/`, then run `npm install` to regenerate the lock file.
39+
- Run `npx markdownlint-cli2 --fix` (or the **Fix: Markdown files** task) whenever documentation changed.
40+
- If linting configuration changed, verify `npx markdownlint-cli2` still works correctly.
4141

4242
### Step 2 – Formatting and analyzer checks
4343

@@ -79,10 +79,10 @@ These instructions apply to all files in the `src/` and `tests/` folders and cov
7979
8080
### Step 2 – Lint markdown documentation
8181

82-
- Run `npm run lint:md:fix` to auto-correct basic issues.
83-
- Run `npm run lint:md` (or the **Lint: Markdown Files** task) and fix remaining warnings.
82+
- Run `npx markdownlint-cli2 --fix` (or the **Fix: Markdown files** task) to auto-correct basic issues.
83+
- Run `npx markdownlint-cli2` (or the **Lint: Markdown Files** task) and fix remaining warnings.
8484

85-
> **Verification**: `npm run lint:md` exits with zero warnings.
85+
> **Verification**: `npx markdownlint-cli2` exits with zero warnings.
8686
8787
### Step 3 – Final verification: Perform a full clean sweep
8888

@@ -92,7 +92,7 @@ Run this sequence and confirm each command completes successfully.
9292
dotnet format --verify-no-changes
9393
dotnet build "Stock.Indicators.sln" -v minimal --nologo
9494
dotnet test "Stock.Indicators.sln" --no-build --nologo
95-
npm run lint:md
95+
npx markdownlint-cli2
9696
```
9797

9898
If any command fails, fix the issue and restart this step from the top.
@@ -121,7 +121,7 @@ chmod +x codacy-analysis-cli
121121
Run the following sequence to detect hidden state issues.
122122

123123
```bash
124-
npm run clean
124+
bash tools/scripts/clean.sh
125125
dotnet restore
126126
dotnet build "Stock.Indicators.sln" -v minimal --nologo
127127
dotnet test "Stock.Indicators.sln" --no-build --nologo

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ jobs:
3232
bundler-cache: true
3333
working-directory: docs
3434

35-
- name: Setup Node.js
36-
uses: actions/setup-node@v6
37-
with:
38-
node-version: ">=24.10.0"
39-
cache: "npm"
40-
cache-dependency-path: package-lock.json
41-
continue-on-error: true
42-
4335
- name: Setup .NET SDK
4436
uses: actions/setup-dotnet@v5
4537
with:
@@ -68,7 +60,7 @@ jobs:
6860

6961
- name: Restore packages
7062
run: |
71-
dotnet restore && npm ci
63+
dotnet restore
7264
continue-on-error: true
7365

7466
- name: Build .NET Solution

.github/workflows/test-website-a11y.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656

5757
- name: Test accessibility
5858
run: >
59-
pa11y-ci
59+
npx pa11y-ci
6060
--sitemap http://127.0.0.1:4000/sitemap.xml
6161
--config ./.pa11yci
6262

0 commit comments

Comments
 (0)