Skip to content

Commit 5dd9811

Browse files
authored
Merge pull request #24 from simsteward/feature/test-selection-redesign
feat: redesign test selection cards with expand/collapse and badges
2 parents 80dac36 + 8a62599 commit 5dd9811

File tree

12 files changed

+2453
-398
lines changed

12 files changed

+2453
-398
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Claude Fix Failed Tests
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Tests"]
6+
types: [completed]
7+
8+
jobs:
9+
fix-tests:
10+
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.head_branch != 'main' }}
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
issues: write
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.event.workflow_run.head_branch }}
21+
fetch-depth: 1
22+
23+
- name: Download test results
24+
uses: actions/download-artifact@v4
25+
with:
26+
name: test-results
27+
path: TestResults/
28+
run-id: ${{ github.event.workflow_run.id }}
29+
github-token: ${{ secrets.GITHUB_TOKEN }}
30+
continue-on-error: true
31+
32+
- uses: anthropics/claude-code-action@v1
33+
with:
34+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
35+
prompt: |
36+
The CI tests failed on branch ${{ github.event.workflow_run.head_branch }}.
37+
38+
1. Check TestResults/ for .trx files with failure details
39+
2. If no artifacts, run: dotnet test src/SimSteward.Plugin.Tests/SimSteward.Plugin.Tests.csproj -c Release -v normal
40+
3. Analyze the root cause of each failure
41+
4. Fix the failing tests or the code they test
42+
5. Verify fixes by running the tests again
43+
44+
Do NOT modify tests just to make them pass — fix the underlying code unless the test itself is wrong.

.github/workflows/claude.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,3 @@ jobs:
3939
# This is an optional setting that allows Claude to read CI results on PRs
4040
additional_permissions: |
4141
actions: read
42-
43-
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44-
# prompt: 'Update the pull request description to include a summary of changes.'
45-
46-
# Optional: Add claude_args to customize behavior and configuration
47-
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48-
# or https://code.claude.com/docs/en/cli-reference for available options
49-
# claude_args: '--allowed-tools Bash(gh pr:*)'
50-

.github/workflows/secrets-scan.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

observability/local/.env.observability.example

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ GRAFANA_STORAGE_PATH=
99
# Example (PowerShell): [Convert]::ToBase64String((1..48 | ForEach-Object { Get-Random -Maximum 256 }))
1010
LOKI_PUSH_TOKEN=
1111

12-
# Path to the SimHub plugin data directory on the host. Alloy tails plugin-structured.jsonl from here.
13-
# Example Windows: C:/Users/<your_username>/AppData/Local/SimHubWpf/PluginsData/SimSteward
14-
SIMSTEWARD_DATA_PATH=
15-
1612
# Grafana login (compose substitutes into GF_SECURITY_ADMIN_*). Used only when Grafana has no DB yet.
1713
# If you forgot the password, stop the stack, wipe the Grafana volume (npm run obs:wipe -- -Force -Grafana), then up again.
1814
GRAFANA_ADMIN_USER=admin

observability/local/config.alloy

Lines changed: 9 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,9 @@
1-
// Grafana Alloy — tail plugin-structured.jsonl → Loki
2-
// Docs: https://grafana.com/docs/alloy/latest/
3-
4-
local.file_match "simsteward_structured" {
5-
path_targets = [{"__path__" = "/var/log/simsteward/plugin-structured.jsonl"}]
6-
sync_period = "5s"
7-
}
8-
9-
loki.source.file "simsteward_structured" {
10-
targets = local.file_match.simsteward_structured.targets
11-
forward_to = [loki.process.simsteward.receiver]
12-
13-
tail_from_end = true
14-
}
15-
16-
loki.process "simsteward" {
17-
forward_to = [loki.write.local.receiver]
18-
19-
// Extract low-cardinality labels from JSON; everything else stays in the log line.
20-
stage.json {
21-
expressions = {
22-
level = "level",
23-
component = "component",
24-
event = "event",
25-
domain = "domain",
26-
}
27-
}
28-
29-
stage.labels {
30-
values = {
31-
level = "",
32-
component = "",
33-
event = "",
34-
domain = "",
35-
}
36-
}
37-
}
38-
39-
loki.write "local" {
40-
endpoint {
41-
url = "http://loki:3100/loki/api/v1/push"
42-
}
43-
}
1+
// RETIRED — Alloy is no longer part of the observability stack.
2+
//
3+
// The SimHub plugin (PluginLogger.cs) now pushes plugin-structured.jsonl entries directly
4+
// to Loki via LokiPushClient at flush time (~500ms batches), replacing this file-tail pipeline.
5+
//
6+
// Claude Code token metrics are pushed directly from ~/.claude/hooks/loki-log.js at session-end.
7+
//
8+
// This file is kept for reference only. Remove the alloy service from docker-compose.yml
9+
// before starting the stack.

observability/local/docker-compose.yml

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -32,45 +32,11 @@ services:
3232
timeout: 5s
3333
retries: 10
3434

35-
otel-collector:
36-
image: otel/opentelemetry-collector-contrib:0.115.1
37-
command: ["--config=/etc/otel-collector-config.yaml"]
38-
volumes:
39-
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml:ro
40-
ports:
41-
- "4317:4317"
42-
- "4318:4318"
43-
# Host 18889 avoids conflict with other tools binding Windows :8889; Prometheus still scrapes otel-collector:8889 on the Docker network.
44-
- "18889:8889"
45-
- "13133:13133"
46-
47-
prometheus:
48-
image: prom/prometheus:v2.55.1
49-
depends_on:
50-
- otel-collector
51-
command:
52-
- "--config.file=/etc/prometheus/prometheus.yml"
53-
- "--storage.tsdb.path=/prometheus"
54-
- "--storage.tsdb.retention.time=15d"
55-
- "--web.enable-lifecycle"
56-
ports:
57-
- "9090:9090"
58-
volumes:
59-
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
60-
- ${GRAFANA_STORAGE_PATH:-S:/sim-steward-grafana-storage}/prometheus:/prometheus
61-
healthcheck:
62-
test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:9090/-/healthy"]
63-
interval: 10s
64-
timeout: 5s
65-
retries: 10
66-
6735
grafana:
6836
image: grafana/grafana:11.2.0
6937
depends_on:
7038
loki:
7139
condition: service_healthy
72-
prometheus:
73-
condition: service_healthy
7440
ports:
7541
- "3000:3000"
7642
environment:
@@ -81,17 +47,6 @@ services:
8147
- ${GRAFANA_STORAGE_PATH:-S:/sim-steward-grafana-storage}/grafana:/var/lib/grafana
8248
- ./grafana/provisioning:/etc/grafana/provisioning:ro
8349

84-
alloy:
85-
image: grafana/alloy:v1.5.1
86-
depends_on:
87-
loki:
88-
condition: service_healthy
89-
volumes:
90-
- ./config.alloy:/etc/alloy/config.alloy:ro
91-
- ${SIMSTEWARD_DATA_PATH}:/var/log/simsteward:ro
92-
- ${GRAFANA_STORAGE_PATH:-S:/sim-steward-grafana-storage}/alloy:/tmp/positions
93-
command: ["run", "/etc/alloy/config.alloy", "--storage.path=/tmp/positions"]
94-
9550
data-api:
9651
build: ./data-api
9752
ports:

0 commit comments

Comments
 (0)