diff --git a/.github/workflows/02.1.intelligent_link_cleaner.yml b/.github/workflows/02.1.intelligent_link_cleaner.yml index 638834f5..ad31620d 100644 --- a/.github/workflows/02.1.intelligent_link_cleaner.yml +++ b/.github/workflows/02.1.intelligent_link_cleaner.yml @@ -51,6 +51,17 @@ jobs: if: steps.playwright-cache.outputs.cache-hit != 'true' run: playwright install chromium --with-deps + - name: Restore Link Checker Cache + uses: actions/cache/restore@v4 + id: link-checker-cache + with: + path: | + shard_result.json + triage_report.md + key: link-cleaner-results-${{ github.run_id }}-${{ github.run_attempt }} + restore-keys: | + link-cleaner-results-${{ github.run_id }}- + - name: Global Intelligent Cleaning Execution (Sequential Fast-Track) env: GEMINI_API_KEY_1: ${{ secrets.GEMINI_API_KEY_1 }} @@ -60,7 +71,11 @@ jobs: PYTHONPATH: ${{ github.workspace }} PYTHONUNBUFFERED: 1 run: | - python src/intelligent_health_checker.py + if [ -f shard_result.json ]; then + echo "shard_result.json found in cache/restored files. Skipping health checker execution." + else + python src/intelligent_health_checker.py + fi - name: Run Inventory Reducer & Apply Changes env: @@ -79,9 +94,23 @@ jobs: EXISTING_ISSUE=$(gh issue list --search "$ISSUE_TITLE" --state open --json number --jq '.[0].number') if [ -z "$EXISTING_ISSUE" ]; then - gh issue create --title "$ISSUE_TITLE" --body-file triage_report.md --label "triage, automated-report" + gh issue create --title "$ISSUE_TITLE" --body-file triage_report.md --label "triage, automated-report" || gh issue create --title "$ISSUE_TITLE" --body-file triage_report.md else echo "A triage issue already exists (#$EXISTING_ISSUE). Updating with new report..." gh issue comment $EXISTING_ISSUE --body-file triage_report.md fi fi + + - name: Ensure Cache Files Exist + if: always() + run: | + touch shard_result.json triage_report.md + + - name: Save Link Checker Cache + if: always() + uses: actions/cache/save@v4 + with: + path: | + shard_result.json + triage_report.md + key: link-cleaner-results-${{ github.run_id }}-${{ github.run_attempt }} diff --git a/README.md b/README.md index 6a05b176..5c25eeea 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ Additionally, as of May 2026, Nubenetes has reached the **Platinum Operational T | :--- | :--- | | **Total Technical Resources (Links)** | **18659+** | | **Specialized MD Pages** | **162** | -| **Total Commits** | **6613+** | +| **Total Commits** | **6615+** | | **Primary AI Engine** | **Google Gemini (Agentic)** | @@ -180,7 +180,7 @@ The growth of Nubenetes reflects the acceleration of the Cloud Native ecosystem. | 6 | 2023 | 30 | 123 | Maintenance & Refinement | | 7 | 2024 | 53 | 218 | Curation Strategy Pivot | | 8 | 2025 | 5 | 20 | Stability & Research Phase | -| 9 | 2026 | 3054 | 12,613 | **Agentic AI Surge** (May 2026 Inception) | +| 9 | 2026 | 3056 | 12,621 | **Agentic AI Surge** (May 2026 Inception) | @@ -196,8 +196,8 @@ xychart-beta title "Nubenetes Annual Growth Metrics (2018–2026)" x-axis ["2018", "2019", "2020", "2021", "2022", "2023", "2024", "2025", "2026"] y-axis "Volume (Commits / Estimated New Refs)" 0 --> 13000 - bar [1445, 586, 8449, 2193, 1660, 123, 218, 20, 12613] - bar [350, 142, 2046, 531, 402, 30, 53, 5, 3054] + bar [1445, 586, 8449, 2193, 1660, 123, 218, 20, 12621] + bar [350, 142, 2046, 531, 402, 30, 53, 5, 3056] ``` @@ -208,7 +208,7 @@ xychart-beta | 2026-04 | 25 | 103 | Active Curation | | 2026-05 | 2101 | 8,677 | **Agentic Inception (Gemini Era)** | | 2026-06 | 849 | 3,506 | Active Curation | -| 2026-07 | 79 | 326 | Active Curation | +| 2026-07 | 81 | 334 | Active Curation | ### 2.4. Content Distribution and Semantic Clustering diff --git a/src/gitops_manager.py b/src/gitops_manager.py index 364bec01..e75a368b 100644 --- a/src/gitops_manager.py +++ b/src/gitops_manager.py @@ -151,12 +151,24 @@ class RepositoryController: pr_body += f"{ai_intel}\n\n{mermaid}\n{source_md}\n{gems_md}\n---\n**Audit Matrix and Logs follow in successive comments.**\n" - pr = self.repository.create_pull( - title=f"💎 Knowledge Update & Optimization: {datetime.now().strftime('%d %b %Y')}", - body=pr_body[:65000], - head=branch_name, - base=self.default_branch_name - ) + try: + pr = self.repository.create_pull( + title=f"💎 Knowledge Update & Optimization: {datetime.now().strftime('%d %b %Y')}", + body=pr_body[:65000], + head=branch_name, + base=self.default_branch_name + ) + except Exception as e: + if "pull request already exists" in str(e).lower() or "422" in str(e): + print(f"[INFO] Pull request already exists for branch {branch_name}. Fetching existing one...") + pulls = self.repository.get_pulls(state='open', head=f"{self.repository.owner.login}:{branch_name}") + if pulls.totalCount > 0: + pr = pulls[0] + pr.edit(body=pr_body[:65000]) + else: + raise e + else: + raise e # 1. Safety Report (if huge) if not safety_in_body: