Skip to content

chore(n8n): repoint ci-feedback webhook and token-rotation link to the M900 - #344

Merged
labgadget015-dotcom merged 1 commit into
mainfrom
fix/repoint-cloud-refs-to-m900
Oct 4, 2026
Merged

labgadget015-dotcom merged 1 commit into
mainfrom
fix/repoint-cloud-refs-to-m900

Conversation

@labgadget015-dotcom

Copy link
Copy Markdown
Owner

What

  • ai_agent_workflow.yml: the Notify DRC of CI result curl now posts to https://m900-homelab.tail8e0dcd.ts.net/n8n/webhook/ci-feedback (was n8n Cloud). Adds --max-time 15.
  • drc-token-rotation-alert.yml: the Slack "n8n Console" button links to the M900 n8n instead of Cloud.

After this, no workflow in .github/workflows/ references gadgetlab.app.n8n.cloud.

⚠️ Merge order

Do not merge until CI Feedback — Slack Alerter (1QPMbpEuY1MAKMSp) is active on the M900. It only exists on Cloud today, the M900 returns 404 for ci-feedback, and the curl is || true, so merging early would stop CI-failure alerts without any error.

🤖 Generated with Claude Code

…e M900

ai_agent_workflow.yml posted CI results to the n8n Cloud ci-feedback webhook;
drc-token-rotation-alert.yml linked its Slack button to the Cloud console.
Both now target the M900 (Funnel /n8n/). Adds --max-time to the curl.

Requires 'CI Feedback — Slack Alerter' (1QPMbpEuY1MAKMSp) to be active on
the M900 first, or CI alerts are dropped silently (the curl is || true).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

📊 Code Complexity Analysis

Summary:

  • Total Functions Analyzed: 871
  • Average Complexity: 3.63
  • High Complexity Functions: 31
  • Low Maintainability Files: 61

⚠️ High Complexity Functions

These functions exceed the complexity threshold and should be refactored:

File Function Complexity Line
core/risk_scorer.py score_pull_request 35 141
autopilot/autopilot.py generate_summary 24 195
.github/scripts/inline_pr_commenter.py _is_likely_safe_b608 19 252
.github/scripts/threshold_monitor.py _is_likely_safe_b608 19 169
autopilot/staleness_engine.py process_stale_prs 16 281
autopilot/ai_optimization/performance_monitor.py get_benchmark_stats 15 184
.github/scripts/weekly_digest.py build_blocks 15 38
.github/scripts/batch_scan_dependabot.py main 15 64
.github/scripts/prometheus_exporter.py collect_metrics 14 99
.github/scripts/self_healing_system.py analyze_failure_patterns 14 256

... and 21 more

Recommendations:

  • Break down large functions into smaller, focused units
  • Extract complex conditional logic into separate functions
  • Use early returns to reduce nesting

🔧 Low Maintainability Files

These files have low maintainability scores and may need refactoring:

File Score Status
.github/scripts/health_dashboard_generator.py 28.14 🔴
.github/scripts/threshold_monitor.py 32.4 🔴
.github/scripts/workflow_monitor.py 33.73 🔴
.github/scripts/ai_code_suggestor.py 33.76 🔴
.github/scripts/ai_workflow_optimizer.py 35.51 🔴
.github/scripts/inline_pr_commenter.py 35.51 🔴
.github/scripts/performance_benchmark.py 39.46 🔴
.github/scripts/self_healing_system.py 40.27 🔴
.github/scripts/parallel_code_analyzer_optimized.py 41.16 🔴
autopilot/tests/test_recommendation_contract.py 42.05 🔴
autopilot/autopilot.py 42.45 🔴
autopilot/ai_optimization/anomaly_detector.py 42.56 🔴
.github/scripts/refactoring_assistant.py 43.03 🔴
autopilot/ai_optimization/intelligent_cache.py 43.28 🔴
autopilot/ai_optimization/commit_summarizer.py 44.05 🔴
.github/scripts/async_parallel_analyzer.py 44.47 🔴
autopilot/ai_optimization/performance_monitor.py 44.69 🔴
.github/scripts/badge_generator.py 45.28 🔴
.github/scripts/copilot_integration.py 45.37 🔴
.github/scripts/distributed_monitoring.py 45.53 🔴
autopilot/dependency_graph.py 45.65 🔴
.github/scripts/elite_copilot.py 45.69 🔴
.github/scripts/issue_auto_creator.py 46.39 🔴
.github/scripts/cost_calculator.py 46.4 🔴
.github/scripts/complexity_reporter.py 46.78 🔴
.github/scripts/pr_triage.py 47.13 🔴
core/risk_scorer.py 48.15 🔴
autopilot/ai_optimization/nlp_relevance_filter.py 48.43 🔴
.github/scripts/pr_inline_commenter.py 48.47 🔴
.github/scripts/dependency_audit.py 48.7 🔴
autopilot/staleness_engine.py 48.73 🔴
.github/scripts/dependency_updater.py 48.91 🔴
.github/scripts/metrics_collector.py 48.91 🔴
autopilot/ai_optimization/ml_priority_scorer.py 49.53 🔴
.github/scripts/parallel_code_analyzer.py 49.96 🔴
autopilot/ai_optimization/api_optimizer.py 50.46 🟡
autopilot/recommendation_contract.py 51.32 🟡
.github/scripts/workflow_optimizer.py 51.67 🟡
.github/scripts/cot_selector.py 51.73 🟡
.github/scripts/release_manager.py 51.92 🟡
.github/scripts/check_quality.py 52.33 🟡
.github/scripts/auto_pr.py 52.72 🟡
.github/scripts/changelog_generator.py 53.13 🟡
.github/scripts/notification_manager.py 53.58 🟡
.github/scripts/prometheus_exporter.py 54.96 🟡
.github/scripts/weekly_digest.py 55.02 🟡
core/audit_logger.py 55.6 🟡
.github/scripts/llm_router.py 55.85 🟡
.github/scripts/batch_scan_dependabot.py 56.3 🟡
core/llm_provider.py 56.32 🟡
autopilot/decisions/ledger.py 56.33 🟡
.github/scripts/streaming_results.py 56.64 🟡
.github/scripts/setup_branch_protection.py 57.0 🟡
.github/scripts/gather_context.py 57.53 🟡
.github/scripts/optimized_github_client.py 58.27 🟡
agents/orchestrator_agent.py 59.02 🟡
core/incident_freeze.py 59.67 🟡
core/github_client.py 61.96 🟡
core/message_queue.py 63.22 🟡
core/agent_config.py 63.82 🟡
core/idempotency.py 64.45 🟡

Maintainability Index Guide:

  • 🟢 85-100: Excellent maintainability
  • 🟡 65-84: Good maintainability
  • 🟠 50-64: Moderate maintainability (consider refactoring)
  • 🔴 0-49: Poor maintainability (needs refactoring)

@github-actions github-actions Bot added the ci/cd label Oct 4, 2026
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🟡 Risk Assessment: MEDIUM (4.5/10)

Analysed 2 files, 3+ / 2− lines. Security-sensitive paths detected. Test coverage unchanged or improved.

Scoring breakdown

Factor Score
Sensitive paths — 2 security-relevant files +3.0
Risky extensions — 2 config/script files +1.0
Draft PR — marked as draft +0.5

⚠️ Security-sensitive paths modified

  • .github/workflows/ai_agent_workflow.yml
  • .github/workflows/drc-token-rotation-alert.yml

✅ Eligible for auto-merge (subject to CI passing).

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🤖 Elite AI Copilot Analysis

Elite AI Copilot Analysis Report

Generated: 2026-10-04 09:04:14
Session ID: copilot_1791104654
Repository: .

🎯 Health Score: 100.0/100

🚀 Top Recommendations

  1. ✅ Repository is in excellent shape - continue current practices

📊 Detailed Insights

Code Quality Baseline Established

  • Category: code_quality
  • Severity: info
  • Description: Repository code quality metrics captured
  • Suggested Action: Continue monitoring for regressions
  • Confidence: 90%

Security Scan Initiated

  • Category: security
  • Severity: info
  • Description: No critical vulnerabilities detected in initial scan
  • Suggested Action: Enable continuous security monitoring
  • Confidence: 85%

Repository Structure Analyzed

  • Category: architecture
  • Severity: info
  • Description: Well-organized modular structure detected
  • Suggested Action: Maintain separation of concerns
  • Confidence: 80%

Performance Baseline Captured

  • Category: performance
  • Severity: info
  • Description: Repository performance metrics recorded
  • Suggested Action: Monitor for performance regressions
  • Confidence: 75%

Documentation Structure Good

  • Category: documentation
  • Severity: info
  • Description: Comprehensive documentation files present
  • Suggested Action: Keep documentation in sync with code changes
  • Confidence: 90%

Powered by Elite AI Copilot v1.0

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Code Quality Analysis ❌ FAILED

Duration: 0.1s
Total Issues: 10

Tool Results

  • pylint: ❌
  • flake8: ❌
  • bandit: ❌
  • radon_cc: ❌
  • radon_mi: ❌
View detailed results
{
  "timestamp": "2026-10-04 09:04:17",
  "elapsed_seconds": 0.1,
  "summary": {
    "total_issues": 10,
    "critical": 0,
    "high": 0,
    "medium": 0,
    "low": 0
  },
  "tools": {
    "pylint": {
      "status": "failed",
      "output": "",
      "errors": "Pylint error: [Errno 2] No such file or directory: 'pylint'"
    },
    "flake8": {
      "status": "failed",
      "output": "",
      "errors": "Flake8 error: [Errno 2] No such file or directory: 'flake8'"
    },
    "bandit": {
      "status": "failed",
      "output": "",
      "errors": "Bandit error: [Errno 2] No such file or directory: 'bandit'"
    },
    "radon_cc": {
      "status": "failed",
      "output": "",
      "errors": "Radon error: [Errno 2] No such file or directory: 'radon'"
    },
    "radon_mi": {
      "status": "failed",
      "output": "",
      "errors": "Radon MI error: [Errno 2] No such file or directory: 'radon'"
    }
  },
  "passed": false
}

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🔒 Security Scan Results

🛡️ Bandit Security Scan

  • 🔴 HIGH: 0
  • 🟡 MEDIUM: 5
  • 🟢 LOW: 107

📦 Dependency Vulnerabilities

  • Total vulnerable dependencies: 61

Vulnerable Dependencies:

  • pygithub 2.10.0
  • aiohttp 3.14.3
  • multidict 6.9.1
  • yarl 1.25.1
  • pyyaml 6.0.3
  • ... and 56 more

Security scans run automatically on every PR. View detailed reports in the Actions tab.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🔍 Pre-commit Checks

✅ All pre-commit checks passed!

Your code follows the project style guidelines.


Pre-commit hooks help maintain code quality and consistency.

@labgadget015-dotcom

Copy link
Copy Markdown
Owner Author

🤖 DRC Agent Analysis

Recommendation: 🟠 P1 IMPORTANT

Summary: Abstracted Webhook Router via Repository Variable (Solution 3) as recommended by REALIST

Next steps:

  1. Step 1: Audit ai_agent_workflow.yml and drc-token-rotation-alert.yml — catalog every hardcoded n8n Cloud URL and any auth tokens with exact line numbers before touching any files
  2. Step 2: Create GitHub Actions repository variables N8N_CI_FEEDBACK_URL and N8N_CONSOLE_URL in repo Settings — initially set to current Cloud values so the PR is safe to merge immediately without breaking anything
  3. Step 3: Create GitHub Actions secret N8N_WEBHOOK_TOKEN if any auth is currently hardcoded in curl commands
  4. Step 4: Open PR updating ai_agent_workflow.yml and drc-token-rotation-alert.yml to use vars.N8N_CI_FEEDBACK_URL, vars.N8N_CONSOLE_URL, and secrets.N8N_WEBHOOK_TOKEN — this PR is immediately mergeable since variables still point to Cloud
  5. Step 5: Generate a Tailscale reusable ephemeral pre-auth key with 90-day expiry and store as TS_AUTH_KEY secret; add a GitHub issue milestone 85 days out as rotation reminder

Strategic fit: Consulting: high · Product: high · Tech debt: reduces


Analysed by GadgetLab DRC Agent (Dreamer → Realist → Critic) · Run run_1791104625073

@labgadget015-dotcom
labgadget015-dotcom marked this pull request as ready for review October 4, 2026 09:21
Copilot AI balanced review requested due to automatic review settings October 4, 2026 09:21
@labgadget015-dotcom
labgadget015-dotcom merged commit b945dce into main Oct 4, 2026
38 checks passed
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

📊 Code Complexity Analysis

Summary:

  • Total Functions Analyzed: 871
  • Average Complexity: 3.63
  • High Complexity Functions: 31
  • Low Maintainability Files: 61

⚠️ High Complexity Functions

These functions exceed the complexity threshold and should be refactored:

File Function Complexity Line
core/risk_scorer.py score_pull_request 35 141
autopilot/autopilot.py generate_summary 24 195
.github/scripts/inline_pr_commenter.py _is_likely_safe_b608 19 252
.github/scripts/threshold_monitor.py _is_likely_safe_b608 19 169
autopilot/staleness_engine.py process_stale_prs 16 281
autopilot/ai_optimization/performance_monitor.py get_benchmark_stats 15 184
.github/scripts/weekly_digest.py build_blocks 15 38
.github/scripts/batch_scan_dependabot.py main 15 64
.github/scripts/prometheus_exporter.py collect_metrics 14 99
.github/scripts/self_healing_system.py analyze_failure_patterns 14 256

... and 21 more

Recommendations:

  • Break down large functions into smaller, focused units
  • Extract complex conditional logic into separate functions
  • Use early returns to reduce nesting

🔧 Low Maintainability Files

These files have low maintainability scores and may need refactoring:

File Score Status
.github/scripts/health_dashboard_generator.py 28.14 🔴
.github/scripts/threshold_monitor.py 32.4 🔴
.github/scripts/workflow_monitor.py 33.73 🔴
.github/scripts/ai_code_suggestor.py 33.76 🔴
.github/scripts/ai_workflow_optimizer.py 35.51 🔴
.github/scripts/inline_pr_commenter.py 35.51 🔴
.github/scripts/performance_benchmark.py 39.46 🔴
.github/scripts/self_healing_system.py 40.27 🔴
.github/scripts/parallel_code_analyzer_optimized.py 41.16 🔴
autopilot/tests/test_recommendation_contract.py 42.05 🔴
autopilot/autopilot.py 42.45 🔴
autopilot/ai_optimization/anomaly_detector.py 42.56 🔴
.github/scripts/refactoring_assistant.py 43.03 🔴
autopilot/ai_optimization/intelligent_cache.py 43.28 🔴
autopilot/ai_optimization/commit_summarizer.py 44.05 🔴
.github/scripts/async_parallel_analyzer.py 44.47 🔴
autopilot/ai_optimization/performance_monitor.py 44.69 🔴
.github/scripts/badge_generator.py 45.28 🔴
.github/scripts/copilot_integration.py 45.37 🔴
.github/scripts/distributed_monitoring.py 45.53 🔴
autopilot/dependency_graph.py 45.65 🔴
.github/scripts/elite_copilot.py 45.69 🔴
.github/scripts/issue_auto_creator.py 46.39 🔴
.github/scripts/cost_calculator.py 46.4 🔴
.github/scripts/complexity_reporter.py 46.78 🔴
.github/scripts/pr_triage.py 47.13 🔴
core/risk_scorer.py 48.15 🔴
autopilot/ai_optimization/nlp_relevance_filter.py 48.43 🔴
.github/scripts/pr_inline_commenter.py 48.47 🔴
.github/scripts/dependency_audit.py 48.7 🔴
autopilot/staleness_engine.py 48.73 🔴
.github/scripts/dependency_updater.py 48.91 🔴
.github/scripts/metrics_collector.py 48.91 🔴
autopilot/ai_optimization/ml_priority_scorer.py 49.53 🔴
.github/scripts/parallel_code_analyzer.py 49.96 🔴
autopilot/ai_optimization/api_optimizer.py 50.46 🟡
autopilot/recommendation_contract.py 51.32 🟡
.github/scripts/workflow_optimizer.py 51.67 🟡
.github/scripts/cot_selector.py 51.73 🟡
.github/scripts/release_manager.py 51.92 🟡
.github/scripts/check_quality.py 52.33 🟡
.github/scripts/auto_pr.py 52.72 🟡
.github/scripts/changelog_generator.py 53.13 🟡
.github/scripts/notification_manager.py 53.58 🟡
.github/scripts/prometheus_exporter.py 54.96 🟡
.github/scripts/weekly_digest.py 55.02 🟡
core/audit_logger.py 55.6 🟡
.github/scripts/llm_router.py 55.85 🟡
.github/scripts/batch_scan_dependabot.py 56.3 🟡
core/llm_provider.py 56.32 🟡
autopilot/decisions/ledger.py 56.33 🟡
.github/scripts/streaming_results.py 56.64 🟡
.github/scripts/setup_branch_protection.py 57.0 🟡
.github/scripts/gather_context.py 57.53 🟡
.github/scripts/optimized_github_client.py 58.27 🟡
agents/orchestrator_agent.py 59.02 🟡
core/incident_freeze.py 59.67 🟡
core/github_client.py 61.96 🟡
core/message_queue.py 63.22 🟡
core/agent_config.py 63.82 🟡
core/idempotency.py 64.45 🟡

Maintainability Index Guide:

  • 🟢 85-100: Excellent maintainability
  • 🟡 65-84: Good maintainability
  • 🟠 50-64: Moderate maintainability (consider refactoring)
  • 🔴 0-49: Poor maintainability (needs refactoring)

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🟡 Risk Assessment: MEDIUM (4.0/10)

Analysed 2 files, 3+ / 2− lines. Security-sensitive paths detected. Test coverage unchanged or improved.

Scoring breakdown

Factor Score
Sensitive paths — 2 security-relevant files +3.0
Risky extensions — 2 config/script files +1.0

⚠️ Security-sensitive paths modified

  • .github/workflows/ai_agent_workflow.yml
  • .github/workflows/drc-token-rotation-alert.yml

✅ Eligible for auto-merge (subject to CI passing).

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🤖 Elite AI Copilot Analysis

Elite AI Copilot Analysis Report

Generated: 2026-10-04 09:22:15
Session ID: copilot_1791105735
Repository: .

🎯 Health Score: 100.0/100

🚀 Top Recommendations

  1. ✅ Repository is in excellent shape - continue current practices

📊 Detailed Insights

Code Quality Baseline Established

  • Category: code_quality
  • Severity: info
  • Description: Repository code quality metrics captured
  • Suggested Action: Continue monitoring for regressions
  • Confidence: 90%

Security Scan Initiated

  • Category: security
  • Severity: info
  • Description: No critical vulnerabilities detected in initial scan
  • Suggested Action: Enable continuous security monitoring
  • Confidence: 85%

Repository Structure Analyzed

  • Category: architecture
  • Severity: info
  • Description: Well-organized modular structure detected
  • Suggested Action: Maintain separation of concerns
  • Confidence: 80%

Performance Baseline Captured

  • Category: performance
  • Severity: info
  • Description: Repository performance metrics recorded
  • Suggested Action: Monitor for performance regressions
  • Confidence: 75%

Documentation Structure Good

  • Category: documentation
  • Severity: info
  • Description: Comprehensive documentation files present
  • Suggested Action: Keep documentation in sync with code changes
  • Confidence: 90%

Powered by Elite AI Copilot v1.0

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Code Quality Analysis ❌ FAILED

Duration: 0.02s
Total Issues: 10

Tool Results

  • pylint: ❌
  • flake8: ❌
  • bandit: ❌
  • radon_cc: ❌
  • radon_mi: ❌
View detailed results
{
  "timestamp": "2026-10-04 09:22:24",
  "elapsed_seconds": 0.02,
  "summary": {
    "total_issues": 10,
    "critical": 0,
    "high": 0,
    "medium": 0,
    "low": 0
  },
  "tools": {
    "pylint": {
      "status": "failed",
      "output": "",
      "errors": "Pylint error: [Errno 2] No such file or directory: 'pylint'"
    },
    "flake8": {
      "status": "failed",
      "output": "",
      "errors": "Flake8 error: [Errno 2] No such file or directory: 'flake8'"
    },
    "bandit": {
      "status": "failed",
      "output": "",
      "errors": "Bandit error: [Errno 2] No such file or directory: 'bandit'"
    },
    "radon_cc": {
      "status": "failed",
      "output": "",
      "errors": "Radon error: [Errno 2] No such file or directory: 'radon'"
    },
    "radon_mi": {
      "status": "failed",
      "output": "",
      "errors": "Radon MI error: [Errno 2] No such file or directory: 'radon'"
    }
  },
  "passed": false
}

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🔍 Pre-commit Checks

✅ All pre-commit checks passed!

Your code follows the project style guidelines.


Pre-commit hooks help maintain code quality and consistency.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🔒 Security Scan Results

🛡️ Bandit Security Scan

  • 🔴 HIGH: 0
  • 🟡 MEDIUM: 5
  • 🟢 LOW: 107

📦 Dependency Vulnerabilities

  • Total vulnerable dependencies: 61

Vulnerable Dependencies:

  • pygithub 2.10.0
  • aiohttp 3.14.3
  • multidict 6.9.1
  • yarl 1.25.1
  • pyyaml 6.0.3
  • ... and 56 more

Security scans run automatically on every PR. View detailed reports in the Actions tab.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

CI-feedback inventory documentation remains stale, and the required M900 workflow activation must be confirmed before merging.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Migrates CI-feedback notifications and the token-rotation console link from n8n Cloud to the M900-hosted n8n instance.

Changes:

  • Repoints CI feedback and adds a 15-second timeout.
  • Updates the Slack console button URL.
File Description
.github/​workflows/​ai_agent_workflow.yml Targets the M900 CI-feedback webhook.
.github/​workflows/​drc-token-rotation-alert.yml Links alerts to the M900 console.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/ai_agent_workflow.yml Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants