Compare commits
10 Commits
fix/s3-rob
...
ci-ai/pilo
| Author | SHA1 | Date | |
|---|---|---|---|
| de29ed5c99 | |||
| c4b7b52b69 | |||
| 7d9a8487cd | |||
| 56de7e210d | |||
| bb48e2ac1d | |||
| a8e4631ad1 | |||
| 5874bc8d05 | |||
| 5d343776a3 | |||
|
|
d3fc4ae056 | ||
| b67854645c |
34
.gitea/workflows/ai-review.yml
Normal file
34
.gitea/workflows/ai-review.yml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# Feature A — KI-PR-Review + Summary (ci-ai pilot).
|
||||||
|
# Pi-Runner (capacity 1, ~3-4 GB) -> Memory-Cap + schlankes python-Image, keine
|
||||||
|
# JS-Actions. ci-ai-Clone braucht ein Token (Instanz verweigert anon). Ohne
|
||||||
|
# ANTHROPIC_API_KEY überspringt das Skript den KI-Schritt sauber (Job grün).
|
||||||
|
name: AI PR Review
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch: {}
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
review:
|
||||||
|
runs-on: eulernest
|
||||||
|
container:
|
||||||
|
image: python:3.12-slim
|
||||||
|
options: "--memory=512m --memory-swap=768m"
|
||||||
|
steps:
|
||||||
|
- name: Tooling (git)
|
||||||
|
run: apt-get update -qq && apt-get install -y -qq --no-install-recommends git ca-certificates
|
||||||
|
|
||||||
|
- name: ci-ai-Skripte holen (Token, da Instanz anon verweigert)
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ github.token }}
|
||||||
|
run: git clone --depth 1 "https://x-access-token:${GITEA_TOKEN}@git.eulernest.eu/user2595/ci-ai.git" /opt/ci-ai
|
||||||
|
|
||||||
|
- name: KI-Review (überspringt sauber ohne Key)
|
||||||
|
env:
|
||||||
|
AI_PROVIDER: anthropic
|
||||||
|
AI_MODEL: claude-3-5-haiku-latest
|
||||||
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
|
GITEA_TOKEN: ${{ github.token }}
|
||||||
|
GITEA_API: https://git.eulernest.eu/api/v1
|
||||||
|
run: python /opt/ci-ai/scripts/ai_review.py
|
||||||
76
.gitea/workflows/security.yml
Normal file
76
.gitea/workflows/security.yml
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
# Feature B (+C) — Security-Scan (HART blockierend) + KI-Klartext-Erklärung.
|
||||||
|
# Pilot: läuft auf Push zum Branch ci-ai/pilot (Validierung) und auf PRs.
|
||||||
|
# python:3.12-slim (Debian: bash) + Memory-Cap (Pi-Runner). ⚠ ARM64-Binaries!
|
||||||
|
# Scanner-Schritte: continue-on-error + Exit-Code ohne Pipe abgefangen -> der
|
||||||
|
# Gate-Schritt entscheidet ALLEIN hart. Clones brauchen ein Token (anon verboten).
|
||||||
|
name: Security
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch: {}
|
||||||
|
push:
|
||||||
|
branches: ["ci-ai/pilot"]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
env:
|
||||||
|
GITLEAKS_VERSION: "8.18.4"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
scan:
|
||||||
|
runs-on: eulernest
|
||||||
|
container:
|
||||||
|
image: python:3.12-slim
|
||||||
|
options: "--memory=768m --memory-swap=1024m"
|
||||||
|
steps:
|
||||||
|
- name: Tooling
|
||||||
|
run: apt-get update -qq && apt-get install -y -qq --no-install-recommends git curl ca-certificates tar
|
||||||
|
|
||||||
|
- name: Repo auschecken (Auto-Token; LAN via Runner-add-host)
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ github.token }}
|
||||||
|
run: git clone --depth 1 "https://x-access-token:${GITEA_TOKEN}@git.eulernest.eu/${GITHUB_REPOSITORY}.git" src
|
||||||
|
|
||||||
|
- name: Gitleaks (Secret-Scan, ARM64)
|
||||||
|
id: gl
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
set +e
|
||||||
|
curl -sSL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_arm64.tar.gz" \
|
||||||
|
| tar -xz -C /usr/local/bin gitleaks
|
||||||
|
cd src
|
||||||
|
gitleaks detect --no-git --source . --redact > /tmp/gl.log 2>&1
|
||||||
|
echo "code=$?" >> "$GITHUB_OUTPUT"
|
||||||
|
tail -n 3 /tmp/gl.log; cat /tmp/gl.log >> /tmp/scan.log
|
||||||
|
|
||||||
|
- name: Trivy (IaC/config, leicht)
|
||||||
|
id: tv
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
set +e
|
||||||
|
curl -sSL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh \
|
||||||
|
| sh -s -- -b /usr/local/bin
|
||||||
|
cd src
|
||||||
|
trivy config --severity HIGH,CRITICAL --exit-code 1 . > /tmp/tv.log 2>&1
|
||||||
|
echo "code=$?" >> "$GITHUB_OUTPUT"
|
||||||
|
tail -n 8 /tmp/tv.log; cat /tmp/tv.log >> /tmp/scan.log
|
||||||
|
|
||||||
|
- name: Gate — hart blockieren bei Funden
|
||||||
|
run: |
|
||||||
|
echo "gitleaks=${{ steps.gl.outputs.code }} trivy=${{ steps.tv.outputs.code }}"
|
||||||
|
if [ "${{ steps.gl.outputs.code }}" != "0" ] || [ "${{ steps.tv.outputs.code }}" != "0" ]; then
|
||||||
|
echo "Security-Funde -> Check schlägt fehl (hart blockierend)."; exit 1
|
||||||
|
fi
|
||||||
|
echo "Keine HIGH/CRITICAL-Funde."
|
||||||
|
|
||||||
|
- name: KI erklärt die Funde (nur bei Fehler; braucht ci-ai-Zugriff + Key)
|
||||||
|
if: failure()
|
||||||
|
continue-on-error: true
|
||||||
|
env:
|
||||||
|
AI_PROVIDER: anthropic
|
||||||
|
AI_MODEL: claude-3-5-haiku-latest
|
||||||
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
|
GITEA_TOKEN: ${{ github.token }}
|
||||||
|
GITEA_API: https://git.eulernest.eu/api/v1
|
||||||
|
run: |
|
||||||
|
git clone --depth 1 "https://x-access-token:${GITEA_TOKEN}@git.eulernest.eu/user2595/ci-ai.git" /opt/ci-ai \
|
||||||
|
&& python3 /opt/ci-ai/scripts/ai_explain.py security /tmp/scan.log \
|
||||||
|
|| echo "AI-Erklärung übersprungen (ci-ai-Zugriff/Key noch offen)."
|
||||||
@@ -283,8 +283,8 @@ inline void save_result_xml(
|
|||||||
/// 3. A line containing `<DOFVector` must carry the `>` character (tag
|
/// 3. A line containing `<DOFVector` must carry the `>` character (tag
|
||||||
/// open) on the same line.
|
/// open) on the same line.
|
||||||
/// 4. The `<DOFVector` element must be present and must produce a
|
/// 4. The `<DOFVector` element must be present and must produce a
|
||||||
/// non-empty doubles list (a missing DOFVector silently returns an
|
/// non-empty doubles list (a missing DOFVector element causes a
|
||||||
/// empty x, which is incorrect for any mesh with at least one DOF).
|
/// `std::runtime_error` — enforced after the parse loop).
|
||||||
inline std::vector<double> load_result_xml(
|
inline std::vector<double> load_result_xml(
|
||||||
const std::string& path,
|
const std::string& path,
|
||||||
NewtonResult* res = nullptr,
|
NewtonResult* res = nullptr,
|
||||||
@@ -386,6 +386,13 @@ inline std::vector<double> load_result_xml(
|
|||||||
" Only the format written by save_result_xml is supported.");
|
" Only the format written by save_result_xml is supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// V5 rule 4: <DOFVector> must be present in every well-formed ConformalResult.
|
||||||
|
if (found_root && !found_dofvector)
|
||||||
|
throw std::runtime_error(
|
||||||
|
"conformallab: XML strict-subset violation in " + path
|
||||||
|
+ ": <DOFVector> element not found. Only the format written by"
|
||||||
|
" save_result_xml is supported.");
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -126,19 +126,18 @@ CGAL result types (`Conformal_map_result`, `Hyper_ideal_map_result`,
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### ✅ S3 — Robustness & test-gap closure (DONE, 2026-06-01, Sonnet impl)
|
### ✅ S3 — Robustness & test-gap closure (DONE, 2026-06-01, Sonnet impl + Opus review)
|
||||||
Branch `fix/s3-robustness-gaps`, 2 commits (`833f9e7`, `2e6c4d7`), 313/313 CGAL tests green.
|
Implementation shipped in commit `135bcf0` (included in P1 merge `bd613a6`).
|
||||||
|
Follow-up commit closes the doc-tracker gap and fixes dead `found_dofvector` variable
|
||||||
|
(V5 rule 4: `<DOFVector>` missing now throws instead of silently returning empty `x`).
|
||||||
- **H3** — `enforce_gauss_bonnet` returns `|deficit|` (both overloads); 3 new tests.
|
- **H3** — `enforce_gauss_bonnet` returns `|deficit|` (both overloads); 3 new tests.
|
||||||
- **H4** — `ReduceToFD_ThrowsForRealAxisBoundary` covers `Im(τ)==0.0` exact boundary.
|
- **H4** — `ReduceToFD_ThrowsForRealAxisBoundary` covers `Im(τ)==0.0` exact boundary.
|
||||||
- **H5** — 2 new integration tests: sliver triangle (no crash/NaN, no LinearSolverFailed)
|
- **H5** — 2 integration tests: sliver triangle (no crash/NaN) + exact-degenerate collinear.
|
||||||
and exact-degenerate triangle (no crash, meaningful failure status documented).
|
- **V5** — `load_result_xml` rejects non-conforming XML (3 strict-subset checks); canonical
|
||||||
- **V5** — `load_result_xml` now explicitly rejects non-conforming XML (3 strict-subset
|
round-trip regression test passes. V5 rule 4 (`<DOFVector>` must be present) now enforced.
|
||||||
checks: `geometry=` on same line, `>` on same line as DOFVector, root element present);
|
- **V6** — `check_dof_vector_size(x, expected, context)` throws on mismatch; 3 new tests.
|
||||||
3 new tests (reject reformatted root, reject reformatted DOFVector, canonical still works).
|
- **🔍 Opus review:** CHANGES-REQUESTED resolved — implementation correct; code commits
|
||||||
- **V6** — `check_dof_vector_size(x, expected, context)` helper added to
|
were redundant with `135bcf0` on main; doc follow-up applied on `chore/s3-followup`.
|
||||||
`serialization.hpp`; 3 new tests (throws on mismatch, passes on match, message content).
|
|
||||||
- **PR:** https://git.eulernest.eu/conformallab/ConformalLabpp/pulls/45
|
|
||||||
- **🔍 Opus review:** pending.
|
|
||||||
|
|
||||||
### ⬜ S4 — Documentation & citations (Haiku → 🔍 Opus)
|
### ⬜ S4 — Documentation & citations (Haiku → 🔍 Opus)
|
||||||
- **N2** — `doc/math/tolerances.md`: every numerical threshold, its role, and
|
- **N2** — `doc/math/tolerances.md`: every numerical threshold, its role, and
|
||||||
|
|||||||
Reference in New Issue
Block a user