[skyeye-governance] Create SkyEye Governance Layer with full infrastructure, guards, scripts, workflow, and test run
Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/33ac7cc1-616d-426c-9b8f-6ad1a72df739
This commit is contained in:
parent
ffd450c361
commit
5af416d710
|
|
@ -0,0 +1,42 @@
|
||||||
|
name: "SkyEye Weekly Full Scan"
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 12 * * 6' # 20:00 CST (UTC+8) every Saturday
|
||||||
|
repository_dispatch:
|
||||||
|
types: [skyeye-full-scan] # 手动触发
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
weekly-scan:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: "🧐 Wake up SkyEye Core Brain"
|
||||||
|
run: echo "[SkyEye] Core brain awakened for weekly full scan at $(date -u '+%Y-%m-%dT%H:%M:%SZ')"
|
||||||
|
|
||||||
|
- name: "🔍 Phase 1 - Infrastructure Scan"
|
||||||
|
run: node skyeye/scripts/scan-engine.js --mode=full
|
||||||
|
|
||||||
|
- name: "💰 Phase 2 - Quota Audit"
|
||||||
|
run: node skyeye/scripts/quota-tracker.js --audit
|
||||||
|
|
||||||
|
- name: "⚙️ Phase 3 - Optimize Guards"
|
||||||
|
run: node skyeye/scripts/optimizer.js --apply
|
||||||
|
|
||||||
|
- name: "🩹 Phase 4 - Self-Heal"
|
||||||
|
run: node skyeye/scripts/self-healer.js
|
||||||
|
|
||||||
|
- name: "📝 Phase 5 - Generate Report"
|
||||||
|
run: node skyeye/scripts/weekly-scan.js --report
|
||||||
|
|
||||||
|
- name: "Commit scan results"
|
||||||
|
run: |
|
||||||
|
git config user.name "天眼 · SkyEye Core"
|
||||||
|
git config user.email "skyeye@guanghu.system"
|
||||||
|
git add skyeye/ buffer/config/
|
||||||
|
git diff --cached --quiet || git commit -m "[skyeye-weekly] $(date -u +%Y%m%d) full scan complete [skip ci]"
|
||||||
|
git push
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"last_scan": "2026-03-23T14:27:06.305Z",
|
"last_scan": "2026-03-23T14:30:07.186Z",
|
||||||
"last_scan_by": "skyeye-scan-engine",
|
"last_scan_by": "skyeye-scan-engine",
|
||||||
"infrastructure": {
|
"infrastructure": {
|
||||||
"github": {
|
"github": {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"optimize_id": "OPT-20260323",
|
||||||
|
"timestamp": "2026-03-23T14:30:16.154Z",
|
||||||
|
"mode": "apply",
|
||||||
|
"guards_checked": 5,
|
||||||
|
"adjustments": [],
|
||||||
|
"summary": {
|
||||||
|
"guards_checked": 5,
|
||||||
|
"total_adjustments": 0,
|
||||||
|
"applied": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
{
|
||||||
|
"audit_id": "AUDIT-20260323",
|
||||||
|
"timestamp": "2026-03-23T14:30:11.691Z",
|
||||||
|
"mode": "full",
|
||||||
|
"services": {
|
||||||
|
"github_actions": {
|
||||||
|
"service": "github_actions",
|
||||||
|
"status": "healthy",
|
||||||
|
"usage_percent": 0,
|
||||||
|
"alerts": [],
|
||||||
|
"recommendations": [
|
||||||
|
"日均可用预算: 250 分钟 (剩余 8 天)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"google_drive": {
|
||||||
|
"service": "google_drive",
|
||||||
|
"status": "healthy",
|
||||||
|
"usage_percent": 0,
|
||||||
|
"alerts": [],
|
||||||
|
"recommendations": []
|
||||||
|
},
|
||||||
|
"notion_api": {
|
||||||
|
"service": "notion_api",
|
||||||
|
"status": "healthy",
|
||||||
|
"usage_percent": 0,
|
||||||
|
"alerts": [],
|
||||||
|
"recommendations": []
|
||||||
|
},
|
||||||
|
"gemini": {
|
||||||
|
"service": "gemini",
|
||||||
|
"status": "healthy",
|
||||||
|
"usage_percent": 0,
|
||||||
|
"alerts": [],
|
||||||
|
"recommendations": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overall_status": "healthy",
|
||||||
|
"total_alerts": 0,
|
||||||
|
"recommendations": [
|
||||||
|
"日均可用预算: 250 分钟 (剩余 8 天)"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"scan_id": "SCAN-20260323",
|
"scan_id": "SCAN-20260323",
|
||||||
"mode": "full",
|
"mode": "full",
|
||||||
"timestamp": "2026-03-23T14:27:06.304Z",
|
"timestamp": "2026-03-23T14:30:07.185Z",
|
||||||
"guard_scan": {
|
"guard_scan": {
|
||||||
"total": 5,
|
"total": 5,
|
||||||
"valid": 5,
|
"valid": 5,
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
"missing_fields": []
|
"missing_fields": []
|
||||||
},
|
},
|
||||||
"workflow_scan": {
|
"workflow_scan": {
|
||||||
"total": 78,
|
"total": 79,
|
||||||
"files": [
|
"files": [
|
||||||
"agent-checkin.yml",
|
"agent-checkin.yml",
|
||||||
"auto-deploy-drive-bridge.yml",
|
"auto-deploy-drive-bridge.yml",
|
||||||
|
|
@ -65,6 +65,7 @@
|
||||||
"server-patrol.yml",
|
"server-patrol.yml",
|
||||||
"skyeye-checkin-audit.yml",
|
"skyeye-checkin-audit.yml",
|
||||||
"skyeye-checkin-receiver.yml",
|
"skyeye-checkin-receiver.yml",
|
||||||
|
"skyeye-weekly-scan.yml",
|
||||||
"staging-preview.yml",
|
"staging-preview.yml",
|
||||||
"sync-deploy-to-notion.yml",
|
"sync-deploy-to-notion.yml",
|
||||||
"sync-dev-status.yml",
|
"sync-dev-status.yml",
|
||||||
|
|
@ -118,7 +119,7 @@
|
||||||
"errors": 0,
|
"errors": 0,
|
||||||
"warnings": 0,
|
"warnings": 0,
|
||||||
"guards_healthy": "5/5",
|
"guards_healthy": "5/5",
|
||||||
"workflows_found": 78,
|
"workflows_found": 79,
|
||||||
"directories_ok": "14/14"
|
"directories_ok": "14/14"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"heal_id": "HEAL-20260323",
|
||||||
|
"timestamp": "2026-03-23T14:30:20.461Z",
|
||||||
|
"guard_repairs": {
|
||||||
|
"repaired": [],
|
||||||
|
"failed": []
|
||||||
|
},
|
||||||
|
"buffer_cleanup": {
|
||||||
|
"files_cleaned": 0,
|
||||||
|
"directories": [
|
||||||
|
{
|
||||||
|
"path": "buffer/processed",
|
||||||
|
"cleaned": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"log_cleanup": {
|
||||||
|
"files_cleaned": 0
|
||||||
|
},
|
||||||
|
"guard_restarts": {
|
||||||
|
"restarted": []
|
||||||
|
},
|
||||||
|
"directory_fixes": {
|
||||||
|
"created": []
|
||||||
|
},
|
||||||
|
"summary": {
|
||||||
|
"configs_repaired": 0,
|
||||||
|
"files_cleaned": 0,
|
||||||
|
"guards_restarted": 0,
|
||||||
|
"directories_created": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -38,6 +38,6 @@
|
||||||
"health_summary": {
|
"health_summary": {
|
||||||
"overall": "healthy",
|
"overall": "healthy",
|
||||||
"alerts": [],
|
"alerts": [],
|
||||||
"last_updated": "2026-03-23T12:00:00Z"
|
"last_updated": "2026-03-23T14:30:11.691Z"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
{
|
||||||
|
"report_id": "SKYEYE-SCAN-20260323",
|
||||||
|
"scan_time": "2026-03-23T14:30:25.666Z",
|
||||||
|
"scan_time_beijing": "2026/3/23 22:30:25",
|
||||||
|
"scan_duration_seconds": 0,
|
||||||
|
"infrastructure_status": {
|
||||||
|
"total_services": 5,
|
||||||
|
"healthy": 5,
|
||||||
|
"degraded": 0,
|
||||||
|
"down": 0
|
||||||
|
},
|
||||||
|
"quota_status": {
|
||||||
|
"github_actions": {
|
||||||
|
"used_percent": 0,
|
||||||
|
"remaining_minutes": 2000,
|
||||||
|
"trend": "stable",
|
||||||
|
"recommendation": "maintain_current_frequency"
|
||||||
|
},
|
||||||
|
"google_drive": {
|
||||||
|
"used_percent": 0,
|
||||||
|
"recommendation": "no_action_needed"
|
||||||
|
},
|
||||||
|
"notion_api": {
|
||||||
|
"status": "healthy",
|
||||||
|
"recommendation": "no_action_needed"
|
||||||
|
},
|
||||||
|
"gemini": {
|
||||||
|
"used_percent": 0,
|
||||||
|
"recommendation": "no_action_needed"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"guard_status": {
|
||||||
|
"total_guards": 5,
|
||||||
|
"active": 5,
|
||||||
|
"suspended": 0,
|
||||||
|
"adjustments_made": []
|
||||||
|
},
|
||||||
|
"self_heal_actions": {
|
||||||
|
"files_cleaned": 0,
|
||||||
|
"configs_repaired": 0,
|
||||||
|
"guards_restarted": 0
|
||||||
|
},
|
||||||
|
"phase_details": {
|
||||||
|
"phase1_scan": {
|
||||||
|
"total_issues": 0,
|
||||||
|
"errors": 0,
|
||||||
|
"warnings": 0,
|
||||||
|
"guards_healthy": "5/5",
|
||||||
|
"workflows_found": 79,
|
||||||
|
"directories_ok": "14/14"
|
||||||
|
},
|
||||||
|
"phase2_audit": "healthy",
|
||||||
|
"phase3_optimize": {
|
||||||
|
"guards_checked": 5,
|
||||||
|
"total_adjustments": 0,
|
||||||
|
"applied": true
|
||||||
|
},
|
||||||
|
"phase4_heal": {
|
||||||
|
"configs_repaired": 0,
|
||||||
|
"files_cleaned": 0,
|
||||||
|
"guards_restarted": 0,
|
||||||
|
"directories_created": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alerts": [],
|
||||||
|
"human_action_required": [],
|
||||||
|
"next_scan": "2026-03-28T12:00:00.000Z"
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue