Skip to content

Commit f9f4fc2

Browse files
Merge branch 'main' into chore/pysdk-000-claude-doc-review
2 parents 719c59c + 45a4ef7 commit f9f4fc2

99 files changed

Lines changed: 16318 additions & 15364 deletions

File tree

Some content is hidden

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

.github/CLAUDE.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The Aignostics Python SDK uses a **sophisticated multi-stage CI/CD pipeline** bu
7070

7171
| Workflow | Triggers | Purpose | Calls |
7272
|----------|----------|---------|-------|
73-
| **ci-cd.yml** | push(main), PR, release, tag | Main CI/CD pipeline | _lint, _audit, _test, _codeql, _ketryx, _package-publish, _docker-publish |
73+
| **ci-cd.yml** | push(main), PR, release, tag | Main CI/CD pipeline | _lint,_audit, _test,_codeql, _ketryx,_package-publish, _docker-publish |
7474
| **build-native-only.yml** | push, PR, release (if msg contains `build:native:only`) | Native executable builds | _build-native-only |
7575
| **claude-code-interactive.yml** | workflow_dispatch (manual) | Manual Claude sessions | _claude-code (interactive) |
7676
| **claude-code-automation-pr-review.yml** | PR opened/sync (excludes bots) | Automated PR reviews | _claude-code (automation) |
@@ -334,30 +334,32 @@ uv run pytest -m "(scheduled or scheduled_only)" -v
334334
1. Unit Tests (3 min)
335335
├─ Python 3.11 ─┐
336336
├─ Python 3.12 ─┼─ Parallel execution
337-
└─ Python 3.13 ─┘
337+
├─ Python 3.13 ─┤
338+
└─ Python 3.14 ─┘
338339
339340
2. Integration Tests (5 min)
340341
├─ Python 3.11 ─┐
341342
├─ Python 3.12 ─┼─ Parallel execution
342-
└─ Python 3.13 ─┘
343+
├─ Python 3.13 ─┤
344+
└─ Python 3.14 ─┘
343345
344346
3. E2E Regular (7 min)
345347
├─ Python 3.11 ─┐
346348
├─ Python 3.12 ─┼─ Parallel execution
347-
└─ Python 3.13 ─┘
349+
├─ Python 3.13 ─┤
350+
└─ Python 3.14 ─┘
348351
349352
4. Long Running (if not skipped)
350-
└─ Python 3.13 only (single version)
353+
└─ Python 3.14 only (single version)
351354
352355
5. Very Long Running (if explicitly enabled)
353-
└─ Python 3.13 only (single version)
356+
└─ Python 3.14 only (single version)
354357
```
355358

356359
**Matrix Testing**:
357360

358-
* Unit, Integration, E2E run on **all 3 Python versions** (3.11, 3.12, 3.13)
359-
* Long running and very long running run on **Python 3.13 only** to save CI time
360-
* Windows ARM excludes Python 3.12.12 due to instability
361+
* Unit, Integration, E2E run on **all four Python versions** (3.11, 3.12, 3.13, 3.14)
362+
* Long running and very long running run on **Python 3.14 only** to save CI time
361363

362364
### Skip Markers System
363365

@@ -509,7 +511,6 @@ Claude Code is integrated into the CI/CD pipeline for:
509511
# Inputs:
510512
# - prompt: "Your task description"
511513
# - max_turns: 200 (default)
512-
# - platform_environment: staging (default) or production
513514
```
514515

515516
#### 2. Automation Mode
@@ -526,21 +527,20 @@ Claude Code is integrated into the CI/CD pipeline for:
526527
**Inputs**:
527528

528529
```yaml
529-
platform_environment: 'staging' | 'production' # Default: staging
530530
mode: 'interactive' | 'automation' # Required
531531
prompt: 'string' # For automation mode
532532
max_turns: '200' # Default: 200
533533
allowed_tools: 'comma,separated,list' # Default: Read,Write,Edit,Glob,Grep,Bash(git:*),Bash(uv:*),Bash(make:*)
534534
```
535535

536-
**Environment Setup** (same as test environment):
536+
**Environment Setup**:
537537

538538
1. Installs `uv` package manager
539539
2. Installs dev tools (`.github/workflows/_install_dev_tools.bash`)
540540
3. Syncs Python dependencies (`uv sync --all-extras`)
541541
4. Sets up headless display (for GUI tests)
542-
5. Creates `.env` with Aignostics credentials (staging or production)
543-
6. Configures GCP credentials for bucket access
542+
543+
**Note**: Claude Code workflows intentionally do NOT have access to Aignostics platform credentials or GCP credentials to prevent accidental credential leakage.
544544

545545
**Claude Configuration**:
546546

@@ -555,10 +555,7 @@ claude \
555555

556556
**Secrets Required**:
557557

558-
* `ANTHROPIC_API_KEY` - For Claude Code
559-
* `AIGNOSTICS_CLIENT_ID_DEVICE_{STAGING|PRODUCTION}`
560-
* `AIGNOSTICS_REFRESH_TOKEN_{STAGING|PRODUCTION}`
561-
* `GCP_CREDENTIALS_{STAGING|PRODUCTION}`
558+
* `ANTHROPIC_API_KEY` - For Claude Code (only secret available to Claude Code workflows)
562559

563560
### Automated PR Review (claude-code-automation-pr-review.yml)
564561

@@ -600,7 +597,6 @@ and adherence to CLAUDE.md guidelines.
600597

601598
* `prompt`: What you want Claude to work on
602599
* `max_turns`: How many iterations (default 200)
603-
* `platform_environment`: staging (default) or production
604600

605601
**Example Use Cases**:
606602

@@ -618,16 +614,15 @@ and adherence to CLAUDE.md guidelines.
618614
* ✅ Use `--system-prompt` referencing CLAUDE.md
619615
* ✅ Limit tool access (`--allowed-tools`)
620616
* ✅ Set reasonable `--max-turns`
621-
* ✅ Use staging environment for development
622617
* ✅ Review Claude's changes before merging
623618
* ✅ Let Claude explore workflows and test strategies
624619

625620
**DON'T**:
626621

627622
* ❌ Grant unrestricted tool access
628623
* ❌ Skip CLAUDE.md system prompt
629-
* ❌ Test against production without approval
630624
* ❌ Merge without human review
625+
* ❌ Add platform/GCP credentials to Claude Code workflows (security risk)
631626

632627
## Scheduled Jobs
633628

@@ -1013,14 +1008,18 @@ make dist_native
10131008

10141009
1. Ensure `main` branch is clean and all tests pass
10151010
2. Run version bump:
1011+
10161012
```bash
10171013
make bump patch # or minor, major
10181014
```
1015+
10191016
3. This creates a commit and git tag
10201017
4. Push with tags:
1018+
10211019
```bash
10221020
git push --follow-tags
10231021
```
1022+
10241023
5. CI detects tag and triggers:
10251024
* Full CI pipeline (lint, audit, test, CodeQL)
10261025
* Package build and publish to PyPI

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ CLI and GUI layers depend on Service layer, never on each other.
7777
make install # Install dev deps + pre-commit hooks
7878
make all # Full CI pipeline (lint, test, docs, audit)
7979
make test # Run tests with coverage (85% minimum)
80-
make test 3.12 # Run on specific Python version
80+
make test 3.14 # Run on specific Python version
8181
make lint # Ruff formatting + MyPy type checking
8282
```
8383

.github/workflows/_audit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
packages: read
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
16+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
1717
with:
1818
fetch-depth: 0
1919

.github/workflows/_build-native-only.yml

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

4040
steps:
4141
- name: Checkout
42-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
42+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4343
with:
4444
fetch-depth: 0
4545

.github/workflows/_claude-code.yml

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ name: "> Claude Code"
33
on:
44
workflow_call:
55
inputs:
6-
platform_environment:
7-
description: 'Environment to use, that is staging or production'
8-
required: false
9-
default: 'staging'
10-
type: string
116
mode:
127
description: 'Mode: interactive or automation'
138
required: true
@@ -31,21 +26,14 @@ on:
3126
required: false
3227
default: true
3328
type: boolean
29+
use_sticky_comment:
30+
description: 'Use just one comment to deliver PR comments (only applies for pull_request event workflows)'
31+
required: false
32+
default: false
33+
type: boolean
3434
secrets:
3535
ANTHROPIC_API_KEY:
3636
required: true
37-
AIGNOSTICS_CLIENT_ID_DEVICE_STAGING:
38-
required: false
39-
AIGNOSTICS_REFRESH_TOKEN_STAGING:
40-
required: false
41-
GCP_CREDENTIALS_STAGING:
42-
required: false
43-
AIGNOSTICS_CLIENT_ID_DEVICE_PRODUCTION:
44-
required: false
45-
AIGNOSTICS_REFRESH_TOKEN_PRODUCTION:
46-
required: false
47-
GCP_CREDENTIALS_PRODUCTION:
48-
required: false
4937

5038
jobs:
5139
claude-code:
@@ -58,7 +46,7 @@ jobs:
5846
actions: read # Required for Claude to read CI results on PRs
5947
steps:
6048
- name: Checkout repository
61-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
49+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
6250
with:
6351
fetch-depth: ${{ inputs.mode == 'interactive' && 0 || 1 }}
6452

@@ -80,23 +68,6 @@ jobs:
8068
- name: Setup display
8169
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
8270

83-
- name: Create .env file
84-
uses: SpicyPizza/create-envfile@ace6d4f5d7802b600276c23ca417e669f1a06f6f # v2.0.3
85-
with:
86-
# The following 3 lines are correct even if vscode complains
87-
envkey_AIGNOSTICS_API_ROOT: ${{ inputs.platform_environment == 'staging' && 'https://platform-staging.aignostics.com' || 'https://platform.aignostics.com' }}
88-
envkey_AIGNOSTICS_CLIENT_ID_DEVICE: ${{ inputs.platform_environment == 'staging' && secrets.AIGNOSTICS_CLIENT_ID_DEVICE_STAGING || secrets.AIGNOSTICS_CLIENT_ID_DEVICE_PRODUCTION }}
89-
envkey_AIGNOSTICS_REFRESH_TOKEN: ${{ inputs.platform_environment == 'staging' && secrets.AIGNOSTICS_REFRESH_TOKEN_STAGING || secrets.AIGNOSTICS_REFRESH_TOKEN_PRODUCTION }}
90-
fail_on_empty: false
91-
92-
- name: Set up GCP credentials for bucket access
93-
shell: bash
94-
env:
95-
GCP_CREDENTIALS: ${{ inputs.platform_environment == 'staging' && secrets.GCP_CREDENTIALS_STAGING || secrets.GCP_CREDENTIALS_PRODUCTION }}
96-
run: |
97-
echo "$GCP_CREDENTIALS" | base64 -d > credentials.json
98-
echo "GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/credentials.json" >> $GITHUB_ENV
99-
10071
- name: Print development version info
10172
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
10273
shell: bash
@@ -119,13 +90,15 @@ jobs:
11990
--model claude-sonnet-4-5-20250929
12091
--allowed-tools "${{ inputs.allowed_tools }}"
12192
--system-prompt "Read the CLAUDE.md file in the root folder of this repository and explicitely acknowledge you will apply **all** guidance therein and in **all** linked documents."
93+
12294
- name: Run Claude Code (Automation Mode)
12395
if: inputs.mode == 'automation'
124-
uses: anthropics/claude-code-action@v1.0.15
96+
uses: anthropics/claude-code-action@v1.0.22
12597
with:
12698
github_token: ${{ secrets.GITHUB_TOKEN }}
12799
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
128100
track_progress: ${{ inputs.track_progress }}
101+
use_sticky_comment: ${{ inputs.use_sticky_comment }}
129102
additional_permissions: |
130103
actions: read
131104
allowed_bots: "dependabot[bot],renovate[bot]"

.github/workflows/_codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
4141
steps:
4242
- name: Checkout repository
43-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
43+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4444

4545
# Add any setup steps before running the `github/codeql-action/init` action.
4646
# This includes steps like installing compilers or runtimes (`actions/setup-node`

.github/workflows/_docker-publish.yml

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

2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
27+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2828

2929
- name: Install dev tools
3030
shell: bash

.github/workflows/_install_dev_tools.bash

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set -o pipefail # Return value of a pipeline is the value of the last command t
66
# Log function for better debugging
77
log() {
88
echo "[$(date +'%Y-%m-%dT%H:%M:%S%z')] $*"
9+
return 0
910
}
1011

1112
log "Starting installation of development tools..."
@@ -14,13 +15,16 @@ log "Starting installation of development tools..."
1415
sudo rm -f /var/lib/man-db/auto-update
1516

1617
# Install APT packages
17-
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
18-
echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/trivy.list
18+
# Use signed-by to add GPG key securely (apt-key is deprecated)
19+
mkdir -p /etc/apt/keyrings
20+
wget --secure-protocol=TLSv1_2 --max-redirect=0 -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | gpg --dearmor | sudo tee /etc/apt/keyrings/trivy.gpg > /dev/null
21+
echo "deb [signed-by=/etc/apt/keyrings/trivy.gpg] https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/trivy.list
1922
sudo apt-get update
2023
sudo apt-get install --no-install-recommends -y curl gnupg2 jq trivy xsltproc
2124

2225
# Install further tools not project specific
23-
curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION="2.57.0" sh
26+
# Download Sentry CLI securely: enforce HTTPS, disable redirects
27+
wget --secure-protocol=TLSv1_2 --max-redirect=0 -qO - https://sentry.io/get-cli/ | SENTRY_CLI_VERSION="2.57.0" sh
2428

2529
# Install project specific tools
2630
.github/workflows/_install_dev_tools_project.bash

.github/workflows/_ketryx_report_and_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
packages: read
3030
steps:
3131
- name: Checkout
32-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
32+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3333
with:
3434
fetch-depth: 0
3535

.github/workflows/_lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
packages: read
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
16+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
1717
with:
1818
fetch-depth: 0
1919

0 commit comments

Comments
 (0)