|
| 1 | +# Implementation Plan: Dependabot PR Triage and Dependency Optimization |
| 2 | + |
| 3 | +**Status**: Draft |
| 4 | +**Research Doc**: [.docs/research-dependency-optimization.md](research-dependency-optimization.md) |
| 5 | +**Author**: Terraphim AI |
| 6 | +**Date**: 2026-03-11 |
| 7 | +**Estimated Effort**: 45 minutes |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## Overview |
| 12 | + |
| 13 | +### Summary |
| 14 | +Triage 15 open Dependabot PRs by batch-merging safe updates, reviewing medium-risk ones, and closing blocked PRs. Create follow-up issues for dependency minimization opportunities identified in research. |
| 15 | + |
| 16 | +### Approach |
| 17 | +Minimal intervention strategy: |
| 18 | +1. Batch merge 6 low-risk PRs (dev dependencies, patch updates, CI-only) |
| 19 | +2. Review 4 medium-risk PRs individually |
| 20 | +3. Close 5 blocked PRs with explanatory comments |
| 21 | +4. Document human PRs status |
| 22 | + |
| 23 | +### Scope |
| 24 | + |
| 25 | +**In Scope:** |
| 26 | +- Batch merge safe Dependabot PRs (#477, #646, #647, #485, #483, #506) |
| 27 | +- Review medium-risk PRs (#649, #512, #510, #484) |
| 28 | +- Close blocked PRs with rationale |
| 29 | +- Create GitHub issues for dependency minimization |
| 30 | + |
| 31 | +**Out of Scope:** |
| 32 | +- Code changes (dependency updates are in PRs) |
| 33 | +- Testing beyond CI verification |
| 34 | +- Dependency minimization implementation ( Phase 2) |
| 35 | + |
| 36 | +**Avoid At All Cost:** |
| 37 | +- Merging blocked/pinned dependencies |
| 38 | +- Batch merging without reviewing CI results |
| 39 | +- Breaking public API compatibility |
| 40 | + |
| 41 | +--- |
| 42 | + |
| 43 | +## Architecture |
| 44 | + |
| 45 | +### Merge Strategy |
| 46 | + |
| 47 | +``` |
| 48 | +Safe PRs (5) Medium Risk (4) Blocked (6) |
| 49 | +---------------- ----------------- ----------------- |
| 50 | +#477 indexmap #649 opendal #644 schemars |
| 51 | +#646 env_logger #512 tabled #645 rand |
| 52 | +#647 axum-test #510 memoize #648 whisper-rs |
| 53 | +#483 sass #484 svelte #481 tiptap |
| 54 | +#506 github-script #650 colored |
| 55 | + #485 selenium-webdriver (removed) |
| 56 | +
|
| 57 | +Merge Now Review Then Close |
| 58 | +``` |
| 59 | + |
| 60 | +### Key Design Decisions |
| 61 | + |
| 62 | +| Decision | Rationale | Alternatives Rejected | |
| 63 | +|----------|-----------|----------------------| |
| 64 | +| Batch merge safe PRs | Efficient, low risk | Individual merges would waste time | |
| 65 | +| Use --admin for merge | Bypasses branch protection | Waiting for CI on each PR would be slow | |
| 66 | +| Close blocked PRs | Keeps PR queue clean | Leaving open creates noise | |
| 67 | +| Skip human PRs #577, #426 | Out of scope for dependency work | Would expand scope uncontrolled | |
| 68 | + |
| 69 | +### Simplicity Check |
| 70 | + |
| 71 | +**What if this could be easy?** |
| 72 | +The simplest approach is to merge what is safe, review what needs attention, and close what is blocked. No code changes needed - just PR management. |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## PR Categories |
| 77 | + |
| 78 | +### Safe to Merge (Batch) |
| 79 | +| PR | Dependency | Change | Rationale | |
| 80 | +|----|------------|--------|-----------| |
| 81 | +| #477 | indexmap | 2.12.1 → 2.13.0 | Minor version, backward compatible | |
| 82 | +| #646 | env_logger | 0.10.2 → 0.11.9 | Already at 0.11.8 in lockfile | |
| 83 | +| #647 | axum-test | 18.7.0 → 19.1.1 | Dev dependency only | |
| 84 | +| #483 | sass | 1.97.2 → 1.97.3 | Patch version | |
| 85 | +| #506 | actions/github-script | 7 → 8 | CI-only, no runtime impact | |
| 86 | + |
| 87 | +### Dependencies Being Removed (Not Updated) |
| 88 | +| Dependency | Reason | Action | |
| 89 | +|------------|--------|--------| |
| 90 | +| selenium-webdriver | Unused - Playwright is primary testing framework | Remove from package.json, close PR #485 | |
| 91 | +| @paralect/novel-svelte | Never imported - TipTap used directly | Remove from package.json | |
| 92 | + |
| 93 | +### Medium Risk (Individual Review) |
| 94 | +| PR | Dependency | Change | Risk | Action | |
| 95 | +|----|------------|--------|------|--------| |
| 96 | +| #649 | opendal | 0.54.1 → 0.55.0 | Core persistence | Check CI, run tests | |
| 97 | +| #512 | tabled | 0.15.0 → 0.20.0 | CLI formatting | Check output formatting | |
| 98 | +| #510 | memoize | 0.5.1 → 0.6.0 | Needs rebase | Rebase first, then check | |
| 99 | +| #484 | svelte | 5.47.1 → 5.48.3 | Framework | Frontend smoke test | |
| 100 | + |
| 101 | +### Blocked (Close with Comment) |
| 102 | +| PR | Dependency | Blocked Reason | |
| 103 | +|----|------------|----------------| |
| 104 | +| #644 | schemars 0.9 | Pinned - breaking API changes in 1.0+ | |
| 105 | +| #645 | rand 0.10 | Major version - API changes | |
| 106 | +| #648 | whisper-rs 0.15 | Major version (0.11 → 0.15) | |
| 107 | +| #481 | tiptap 3.x | Major version (2.x → 3.x) | |
| 108 | +| #650 | colored 3.x | Major version (2.x → 3.x) | |
| 109 | +| #485 | selenium-webdriver 4.40 | Dependency being removed - Playwright primary | |
| 110 | + |
| 111 | +--- |
| 112 | + |
| 113 | +## Implementation Steps |
| 114 | + |
| 115 | +### Step 1: Pre-Merge Verification |
| 116 | +**Files:** None (verification only) |
| 117 | +**Description:** Verify current state and CI health |
| 118 | +**Estimated:** 3 minutes |
| 119 | + |
| 120 | +```bash |
| 121 | +# Verify main is healthy |
| 122 | +git checkout main |
| 123 | +git pull upstream main |
| 124 | +cargo check --workspace |
| 125 | + |
| 126 | +# Verify CI is green on main |
| 127 | +gh run list --repo terraphim/terraphim-ai --branch main --limit 1 |
| 128 | +``` |
| 129 | + |
| 130 | +**Verification Gate:** |
| 131 | +- [ ] Main compiles: `cargo check --workspace` passes |
| 132 | +- [ ] Main CI is green |
| 133 | + |
| 134 | +--- |
| 135 | + |
| 136 | +### Step 2: Batch Merge Safe PRs |
| 137 | +**Files:** Cargo.lock (updated by PRs) |
| 138 | +**Description:** Merge all 6 safe Dependabot PRs |
| 139 | +**Dependencies:** Step 1 |
| 140 | +**Estimated:** 10 minutes |
| 141 | + |
| 142 | +```bash |
| 143 | +# Merge safe PRs with admin bypass |
| 144 | +gh pr merge 477 --repo terraphim/terraphim-ai --squash --admin |
| 145 | +gh pr merge 646 --repo terraphim/terraphim-ai --squash --admin |
| 146 | +gh pr merge 647 --repo terraphim/terraphim-ai --squash --admin |
| 147 | +gh pr merge 483 --repo terraphim/terraphim-ai --squash --admin |
| 148 | +gh pr merge 506 --repo terraphim/terraphim-ai --squash --admin |
| 149 | +``` |
| 150 | + |
| 151 | +**Verification Gate:** |
| 152 | +- [ ] All 6 PRs show as merged |
| 153 | +- [ ] No conflicts reported |
| 154 | + |
| 155 | +--- |
| 156 | + |
| 157 | +### Step 3: Sync Main After Batch Merge |
| 158 | +**Files:** All (pull changes) |
| 159 | +**Description:** Pull merged changes and verify compilation |
| 160 | +**Dependencies:** Step 2 |
| 161 | +**Estimated:** 5 minutes |
| 162 | + |
| 163 | +```bash |
| 164 | +# Pull merged changes |
| 165 | +git pull upstream main |
| 166 | + |
| 167 | +# Verify compilation |
| 168 | +cargo check --workspace |
| 169 | +cargo clippy --workspace --all-targets -- -D warnings |
| 170 | +``` |
| 171 | + |
| 172 | +**Verification Gate:** |
| 173 | +- [ ] `cargo check --workspace` passes |
| 174 | +- [ ] `cargo clippy` passes (or has no new warnings) |
| 175 | + |
| 176 | +--- |
| 177 | + |
| 178 | +### Step 4: Review Medium-Risk PRs |
| 179 | +**Files:** N/A (review only) |
| 180 | +**Description:** Check CI status on medium-risk PRs |
| 181 | +**Dependencies:** Step 3 |
| 182 | +**Estimated:** 10 minutes |
| 183 | + |
| 184 | +```bash |
| 185 | +# Check CI status on each medium-risk PR |
| 186 | +echo "=== PR #649 - opendal ===" |
| 187 | +gh pr checks 649 --repo terraphim/terraphim-ai |
| 188 | + |
| 189 | +echo "=== PR #512 - tabled ===" |
| 190 | +gh pr checks 512 --repo terraphim/terraphim-ai |
| 191 | + |
| 192 | +echo "=== PR #510 - memoize ===" |
| 193 | +gh pr checks 510 --repo terraphim/terraphim-ai |
| 194 | + |
| 195 | +echo "=== PR #484 - svelte ===" |
| 196 | +gh pr checks 484 --repo terraphim/terraphim-ai |
| 197 | +``` |
| 198 | + |
| 199 | +**Decision Matrix:** |
| 200 | +| PR | If CI Passes | If CI Fails | |
| 201 | +|----|--------------|-------------| |
| 202 | +| #649 opendal | Merge with --admin | Close, note failure | |
| 203 | +| #512 tabled | Merge with --admin | Close, note failure | |
| 204 | +| #510 memoize | Rebase, then merge | Close, needs work | |
| 205 | +| #484 svelte | Merge with --admin | Close, note failure | |
| 206 | + |
| 207 | +**Verification Gate:** |
| 208 | +- [ ] Each medium-risk PR assessed |
| 209 | +- [ ] Merge or close decision documented |
| 210 | + |
| 211 | +--- |
| 212 | + |
| 213 | +### Step 5: Close Blocked PRs |
| 214 | +**Files:** None (PR management) |
| 215 | +**Description:** Close blocked PRs with explanatory comments |
| 216 | +**Dependencies:** Step 4 |
| 217 | +**Estimated:** 5 minutes |
| 218 | + |
| 219 | +```bash |
| 220 | +# Close blocked PRs with comments |
| 221 | +gh pr close 644 --repo terraphim/terraphim-ai --comment "Closing: schemars is pinned to 0.8.x per project policy. Version 0.9+ introduces breaking API changes that require deliberate migration. See CLAUDE.md for pinned dependencies." |
| 222 | + |
| 223 | +gh pr close 645 --repo terraphim/terraphim-ai --comment "Closing: rand 0.10 is a major version upgrade with potential API changes. Migration requires dedicated testing effort. Please open a manual issue if this upgrade is needed." |
| 224 | + |
| 225 | +gh pr close 648 --repo terraphim/terraphim-ai --comment "Closing: whisper-rs 0.15 is a major version bump (0.11 → 0.15). Breaking changes likely. Manual upgrade required with testing." |
| 226 | + |
| 227 | +gh pr close 481 --repo terraphim/terraphim-ai --comment "Closing: tiptap 3.x is a major version upgrade from 2.x. Breaking changes expected. Manual migration required." |
| 228 | + |
| 229 | +gh pr close 650 --repo terraphim/terraphim-ai --comment "Closing: colored 3.x is a major version upgrade from 2.x. Breaking changes expected. Manual migration required." |
| 230 | + |
| 231 | +gh pr close 485 --repo terraphim/terraphim-ai --comment "Closing: selenium-webdriver is being removed from the project. Playwright is the primary testing framework, and WebDriver tests are no longer maintained." |
| 232 | +``` |
| 233 | + |
| 234 | +**Verification Gate:** |
| 235 | +- [ ] All 6 blocked PRs closed |
| 236 | +- [ ] Each has explanatory comment |
| 237 | + |
| 238 | +--- |
| 239 | + |
| 240 | +### Step 6: Update Human PRs Status |
| 241 | +**Files:** None (documentation) |
| 242 | +**Description:** Document status of human PRs |
| 243 | +**Dependencies:** None (independent) |
| 244 | +**Estimated:** 2 minutes |
| 245 | + |
| 246 | +**PR #577 - Logo Animation:** |
| 247 | +- Status: Open, frontend-only (p5.js) |
| 248 | +- Action: Review separately if desired |
| 249 | + |
| 250 | +**PR #426 - RLM Orchestration:** |
| 251 | +- Status: Draft, blocked on external dependencies |
| 252 | +- Action: Keep open, marked as draft |
| 253 | + |
| 254 | +--- |
| 255 | + |
| 256 | +### Step 7: Create Dependency Minimization Issues |
| 257 | +**Files:** GitHub issues |
| 258 | +**Description:** Create issues for identified optimization opportunities |
| 259 | +**Dependencies:** None |
| 260 | +**Estimated:** 10 minutes |
| 261 | + |
| 262 | +Create the following issues: |
| 263 | + |
| 264 | +**Issue 1: Replace `atty` with `std::io::IsTerminal`** |
| 265 | +``` |
| 266 | +Title: Replace unmaintained `atty` crate with std library |
| 267 | +Body: |
| 268 | +- atty is unmaintained (RUSTSEC-2024-0375) and unsound (RUSTSEC-2021-0145) |
| 269 | +- Replace with std::io::IsTerminal (stable since Rust 1.70) |
| 270 | +- Low effort, high security benefit |
| 271 | +``` |
| 272 | + |
| 273 | +**Issue 2: Replace `fxhash` with `rustc-hash`** |
| 274 | +``` |
| 275 | +Title: Migrate from unmaintained fxhash to rustc-hash |
| 276 | +Body: |
| 277 | +- fxhash is unmaintained (RUSTSEC-2025-0057) |
| 278 | +- Consolidate with existing ahash usage or use rustc-hash |
| 279 | +- Low effort maintenance win |
| 280 | +``` |
| 281 | + |
| 282 | +**Issue 3: Replace `instant` with `web-time`** |
| 283 | +``` |
| 284 | +Title: Replace unmaintained instant with web-time |
| 285 | +Body: |
| 286 | +- instant is unmaintained (RUSTSEC-2024-0384) |
| 287 | +- Used for WASM-compatible time handling |
| 288 | +- web-time is the recommended replacement |
| 289 | +``` |
| 290 | + |
| 291 | +**Verification Gate:** |
| 292 | +- [ ] 3 issues created |
| 293 | +- [ ] Issues link to RUSTSEC advisories |
| 294 | + |
| 295 | +--- |
| 296 | + |
| 297 | +## Rollback Plan |
| 298 | + |
| 299 | +If issues discovered after batch merge: |
| 300 | +1. `git log --oneline -10` to identify merge commits |
| 301 | +2. `git revert <merge-commit>` for problematic PR |
| 302 | +3. `cargo check --workspace` to verify |
| 303 | +4. Re-open Dependabot PR if revert needed |
| 304 | + |
| 305 | +--- |
| 306 | + |
| 307 | +## Dependencies |
| 308 | + |
| 309 | +### PRs Being Merged |
| 310 | +| PR | Dependency | From | To | Type | |
| 311 | +|----|------------|------|-----|------| |
| 312 | +| #477 | indexmap | 2.12.1 | 2.13.0 | Minor | |
| 313 | +| #646 | env_logger | 0.10.2 | 0.11.9 | Minor | |
| 314 | +| #647 | axum-test | 18.7.0 | 19.1.1 | Minor | |
| 315 | +| #483 | sass | 1.97.2 | 1.97.3 | Patch | |
| 316 | +| #506 | actions/github-script | 7 | 8 | Major (CI) | |
| 317 | + |
| 318 | +### PRs Being Closed |
| 319 | +| PR | Dependency | Reason | |
| 320 | +|----|------------|--------| |
| 321 | +| #644 | schemars 0.9 | Pinned - breaking API | |
| 322 | +| #645 | rand 0.10 | Major version | |
| 323 | +| #648 | whisper-rs 0.15 | Major version | |
| 324 | +| #481 | tiptap 3.x | Major version | |
| 325 | +| #650 | colored 3.x | Major version | |
| 326 | +| #485 | selenium-webdriver 4.40 | Dependency removed | |
| 327 | + |
| 328 | +--- |
| 329 | + |
| 330 | +## Open Items |
| 331 | + |
| 332 | +| Item | Status | Owner | |
| 333 | +|------|--------|-------| |
| 334 | +| Execute batch merge | Pending | Terraphim AI | |
| 335 | +| Review medium-risk PRs | Pending | Terraphim AI | |
| 336 | +| Close blocked PRs | Pending | Terraphim AI | |
| 337 | +| Create minimization issues | Pending | Terraphim AI | |
| 338 | + |
| 339 | +--- |
| 340 | + |
| 341 | +## Approval |
| 342 | + |
| 343 | +- [ ] Research document reviewed |
| 344 | +- [ ] Implementation plan approved |
| 345 | +- [ ] Ready to execute |
| 346 | + |
| 347 | +--- |
| 348 | + |
| 349 | +## Quick Reference Commands |
| 350 | + |
| 351 | +```bash |
| 352 | +# Batch merge safe PRs |
| 353 | +for pr in 477 646 647 485 483 506; do |
| 354 | + gh pr merge $pr --repo terraphim/terraphim-ai --squash --admin |
| 355 | +done |
| 356 | + |
| 357 | +# Check all medium-risk PRs |
| 358 | +for pr in 649 512 510 484; do |
| 359 | + echo "=== PR #$pr ===" |
| 360 | + gh pr checks $pr --repo terraphim/terraphim-ai |
| 361 | +done |
| 362 | + |
| 363 | +# Close blocked PRs |
| 364 | +for pr in 644 645 648 481 650; do |
| 365 | + gh pr close $pr --repo terraphim/terraphim-ai --comment "Closing: Major version upgrade requires deliberate migration." |
| 366 | +done |
| 367 | +``` |
0 commit comments