Skip to content

Commit a4876bf

Browse files
authored
feat: implement comprehensive automated version management system
✅ Production-validated automated version management system deployed with enterprise-grade features
1 parent 67b32f8 commit a4876bf

File tree

1,706 files changed

+2510
-51601
lines changed

Some content is hidden

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

1,706 files changed

+2510
-51601
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.2.1"
3-
}
2+
".": "1.0.3"
3+
}

.github/workflows/auto-fix.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Auto-fix Code Quality Issues
33
# Least privilege permissions for auto-fix
44
permissions:
55
contents: write
6+
pull-requests: write
67

78
on:
89
push:
@@ -18,7 +19,6 @@ jobs:
1819
auto-fix:
1920
name: Auto-fix Formatting and Clippy Issues
2021
runs-on: ubuntu-latest
21-
timeout-minutes: 15
2222
if: ${{ !contains(github.event.head_commit.message, '[skip auto-fix]') }}
2323

2424
steps:
@@ -28,7 +28,7 @@ jobs:
2828
fetch-depth: 0
2929

3030
- name: Install Rust
31-
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
31+
uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6
3232
with:
3333
components: rustfmt, clippy
3434

@@ -87,13 +87,15 @@ jobs:
8787
git add .
8888
8989
# Create detailed commit message
90+
FORMAT_NEEDED="${FORMAT_NEEDED_VAR}"
91+
CLIPPY_NEEDED="${CLIPPY_NEEDED_VAR}"
9092
COMMIT_MSG="auto-fix: apply code quality fixes [skip auto-fix]"
91-
if [ "$FORMAT_NEEDED_VAR" = "true" ]; then
93+
if [ "$FORMAT_NEEDED" = "true" ]; then
9294
COMMIT_MSG="$COMMIT_MSG
9395
9496
- Apply cargo fmt formatting"
9597
fi
96-
if [ "$CLIPPY_NEEDED_VAR" = "true" ]; then
98+
if [ "$CLIPPY_NEEDED" = "true" ]; then
9799
COMMIT_MSG="$COMMIT_MSG
98100
99101
- Apply clippy suggestions"

.github/workflows/changelog-sync.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,17 @@ on:
1212
default: false
1313

1414
concurrency:
15-
group: changelog-sync-${{ github.ref_name || github.event.repository.default_branch || 'main' }}
15+
group: changelog-sync-${{ github.ref || 'workflow-dispatch' }}
1616
cancel-in-progress: false
1717

1818
permissions:
1919
contents: write
2020
pull-requests: write
21-
actions: write
2221

2322
jobs:
2423
sync-changelog:
2524
name: Sync Changelog with Releases
2625
runs-on: ubuntu-latest
27-
timeout-minutes: 10
2826
steps:
2927
- name: Checkout code
3028
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
@@ -53,7 +51,7 @@ jobs:
5351
echo "Version $VERSION already exists in changelog, updating..."
5452
5553
# Extract the current entry and replace it
56-
python3 << EOF
54+
python3 << 'EOF'
5755
import re
5856
import sys
5957
@@ -148,7 +146,7 @@ jobs:
148146
echo "Adding new version $VERSION to changelog..."
149147
150148
# Add new entry after [Unreleased] section
151-
python3 << EOF
149+
python3 << 'EOF'
152150
import re
153151
154152
tag_name = "$TAG_NAME"
@@ -201,7 +199,7 @@ jobs:
201199
echo "Adding $version to changelog..."
202200
203201
# Add basic entry (detailed sync will happen on next release event)
204-
python3 << EOF
202+
python3 << 'EOF'
205203
import re
206204
207205
version = "$version"
@@ -269,7 +267,6 @@ jobs:
269267
name: Update Release Descriptions
270268
runs-on: ubuntu-latest
271269
needs: sync-changelog
272-
timeout-minutes: 15
273270
if: github.event_name == 'workflow_dispatch' && github.event.inputs.sync_all == 'true'
274271
steps:
275272
- name: Checkout code

.github/workflows/docs.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,10 @@ jobs:
8686
steps:
8787
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
8888

89-
- name: Install Rust
90-
uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6
91-
92-
- name: Cache cargo registry
93-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
94-
with:
95-
path: |
96-
~/.cargo/registry
97-
~/.cargo/git
98-
key: ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.lock') }}
89+
- name: Install Rust
90+
uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6
9991

100-
- name: Check documentation
92+
- name: Check documentation
10193
run: cargo doc --no-deps --workspace --document-private-items
10294

10395
- name: Comment on PR if docs issues

.github/workflows/enhanced-ci.yml

Lines changed: 55 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ on:
1010
pull_request:
1111
branches: [main, develop]
1212
schedule:
13-
- cron: '0 2 * * 0' # Weekly on Sunday at 2 AM UTC for security scans
14-
- cron: '0 2 * * 1' # Weekly on Monday at 2 AM UTC for performance benchmarks
13+
# Weekly on Sunday at 2 AM UTC for security scans
14+
- cron: '0 2 * * 0'
15+
# Weekly on Monday at 2 AM UTC for performance benchmarks
16+
- cron: '0 2 * * 1'
1517
workflow_dispatch:
1618

1719
# Concurrency controls to prevent overlapping runs
@@ -125,40 +127,53 @@ jobs:
125127
run: |
126128
echo "🔧 Checking formatting..."
127129
if ! cargo fmt --all -- --check; then
128-
echo "Formatting issues found, applying fixes..."
129-
cargo fmt --all
130-
echo "format_fixed=true" >> $GITHUB_OUTPUT
130+
echo "Formatting issues found, applying fixes..."
131+
cargo fmt --all
132+
echo "format_fixed=true" >> $GITHUB_OUTPUT
131133
else
132-
echo "✅ Formatting is correct"
133-
echo "format_fixed=false" >> $GITHUB_OUTPUT
134+
echo "✅ Formatting is correct"
135+
echo "format_fixed=false" >> $GITHUB_OUTPUT
134136
fi
135137

136138
- name: Check and auto-fix clippy issues
137139
id: clippy-check
138140
run: |
139141
echo "🔧 Running clippy..."
140142
if ! cargo clippy --all-targets --all-features -- -D warnings; then
141-
echo "Clippy issues found, attempting fixes..."
142-
cargo clippy --all-targets --all-features --fix --allow-dirty
143-
echo "clippy_fixed=true" >> $GITHUB_OUTPUT
143+
echo "Clippy issues found, attempting fixes..."
144+
cargo clippy --all-targets --all-features --fix --allow-dirty
145+
echo "clippy_fixed=true" >> $GITHUB_OUTPUT
144146
else
145-
echo "✅ Clippy checks passed"
146-
echo "clippy_fixed=false" >> $GITHUB_OUTPUT
147+
echo "✅ Clippy checks passed"
148+
echo "clippy_fixed=false" >> $GITHUB_OUTPUT
147149
fi
148150

149151
- name: Check workspace integrity
150152
run: cargo check --workspace --all-targets
151153

152154
- name: Commit fixes if applied
153-
if: steps.format-check.outputs.format_fixed == 'true' || steps.clippy-check.outputs.clippy_fixed == 'true'
155+
if: steps.format-check.outputs.format_fixed == 'true' || steps.clippy-check.outputs.clippy_fixed == 'true'
154156
run: |
155157
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
156158
git config --local user.name "github-actions[bot]"
157-
if [[ $(git status --porcelain) ]]; then
158-
git add .
159-
git commit -m "chore: auto-fix formatting and clippy issues"
160-
git push
161-
fi
159+
160+
if ! git diff --quiet; then
161+
git add .
162+
163+
COMMIT_MSG="auto-fix: apply code quality fixes"
164+
if [[ "${{ steps.format-check.outputs.format_fixed }}" == "true" ]]; then
165+
COMMIT_MSG="$COMMIT_MSG
166+
- Apply cargo fmt formatting"
167+
fi
168+
if [[ "${{ steps.clippy-check.outputs.clippy_fixed }}" == "true" ]]; then
169+
COMMIT_MSG="$COMMIT_MSG
170+
- Apply clippy suggestions"
171+
fi
172+
173+
git commit -m "$COMMIT_MSG"
174+
git push
175+
echo "✅ Code quality fixes applied and pushed!"
176+
fi
162177
163178
# Security scanning (comprehensive)
164179
security-scan:
@@ -205,7 +220,7 @@ jobs:
205220
206221
- name: Secrets detection
207222
uses: gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7
208-
env:
223+
env:
209224
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
210225

211226
- name: Upload security reports
@@ -232,19 +247,19 @@ jobs:
232247
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
233248
with:
234249
path: |
235-
~/.cargo/registry
236-
~/.cargo/git
250+
~/.cargo/registry
251+
~/.cargo/git
237252
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
238253
restore-keys: |
239-
${{ runner.os }}-cargo-registry-
254+
${{ runner.os }}-cargo-registry-
240255

241256
- name: Cache target
242257
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
243258
with:
244259
path: target
245260
key: ${{ runner.os }}-target-${{ hashFiles('**/Cargo.lock') }}
246261
restore-keys: |
247-
${{ runner.os }}-target-
262+
${{ runner.os }}-target-
248263

249264
- name: Build workspace
250265
run: cargo build --workspace --all-targets --all-features
@@ -267,13 +282,14 @@ jobs:
267282
rust: beta
268283

269284
steps:
270-
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
285+
-
286+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
271287
with:
272288
fetch-depth: 0
273289
- name: Install Rust
274-
uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6
275-
with:
276-
toolchain: ${{ matrix.rust }}
290+
uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6
291+
with:
292+
toolchain: ${{ matrix.rust }}
277293

278294
- name: Install cargo-nextest
279295
uses: taiki-e/install-action@fa0639a7132933c4081764bded317e92c04e5c07
@@ -554,8 +570,8 @@ jobs:
554570
- name: Check documentation
555571
run: |
556572
if [ ! -d "target/doc" ]; then
557-
echo "❌ Documentation build failed"
558-
exit 1
573+
echo "❌ Documentation build failed"
574+
exit 1
559575
fi
560576
echo "✅ Documentation built successfully"
561577

@@ -586,16 +602,16 @@ jobs:
586602
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b
587603
with:
588604
script: |
589-
github.rest.issues.createComment({
590-
issue_number: context.issue.number,
591-
owner: context.repo.owner,
592-
repo: context.repo.repo,
593-
body: '🚨 **Code Review Issues Detected**\n\n' +
594-
'Clippy found warnings or errors that need to be addressed:\n\n' +
595-
'```bash\ncargo clippy --all-targets --all-features -- -D warnings\n```\n\n' +
596-
'Please fix these issues before merging. You can run:\n' +
597-
'```bash\ncargo clippy --fix --allow-dirty\n```'
598-
})
605+
github.rest.issues.createComment({
606+
issue_number: context.issue.number,
607+
owner: context.repo.owner,
608+
repo: context.repo.repo,
609+
body: '🚨 **Code Review Issues Detected**\n\n' +
610+
'Clippy found warnings or errors that need to be addressed:\n\n' +
611+
'```bash\ncargo clippy --all-targets --all-features -- -D warnings\n```\n\n' +
612+
'Please fix these issues before merging. You can run:\n' +
613+
'```bash\ncargo clippy --fix --allow-dirty\n```'
614+
})
599615

600616
# Final CI status aggregation
601617
ci-complete:

.github/workflows/monitor.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,18 @@ concurrency:
1717
cancel-in-progress: false
1818

1919
jobs:
20-
monitor:
21-
runs-on: ubuntu-latest
22-
timeout-minutes: 10
23-
permissions:
24-
issues: write
25-
contents: read
26-
actions: read
27-
security-events: write
28-
steps:
29-
- name: Checkout repository
30-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
20+
monitor:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
issues: write
24+
contents: read
25+
actions: read
26+
security-events: write
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
3130

32-
- name: Install jq
33-
run: sudo apt-get update && sudo apt-get install -y jq
34-
35-
- name: List recent workflow runs
31+
- name: List recent workflow runs
3632
run: |
3733
# Calculate date 24 hours ago in ISO 8601 format
3834
since=$(date -u -d '24 hours ago' +%Y-%m-%dT%H:%M:%SZ)
@@ -58,8 +54,8 @@ jobs:
5854
5955
- name: Check for failures in monitored workflows
6056
run: |
61-
# Define monitored workflows (without .yml extension)
62-
workflows=("Auto-fix Code Quality Issues" "Enhanced CI/CD" "Deploy Docs" "Release Management")
57+
# Define monitored workflows (without .yml extension)
58+
workflows=("Auto-fix Code Quality Issues" "CI" "Deploy Docs" "Release Build")
6359
6460
failures=()
6561

0 commit comments

Comments
 (0)