@eldrforge/kodrdriv 1.2.29 → 1.2.123

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/application.js +16 -13
  2. package/dist/application.js.map +1 -1
  3. package/dist/arguments.js +5 -5
  4. package/dist/arguments.js.map +1 -1
  5. package/dist/commands/audio-review.js +2 -5
  6. package/dist/commands/audio-review.js.map +1 -1
  7. package/dist/commands/clean.js +2 -4
  8. package/dist/commands/clean.js.map +1 -1
  9. package/dist/commands/commit.js +3 -6
  10. package/dist/commands/commit.js.map +1 -1
  11. package/dist/commands/development.js +7 -7
  12. package/dist/commands/development.js.map +1 -1
  13. package/dist/commands/link.js +3 -7
  14. package/dist/commands/link.js.map +1 -1
  15. package/dist/commands/precommit.js +99 -0
  16. package/dist/commands/precommit.js.map +1 -0
  17. package/dist/commands/publish.js +47 -32
  18. package/dist/commands/publish.js.map +1 -1
  19. package/dist/commands/release.js +3 -7
  20. package/dist/commands/release.js.map +1 -1
  21. package/dist/commands/review.js +4 -6
  22. package/dist/commands/review.js.map +1 -1
  23. package/dist/commands/tree.js +213 -84
  24. package/dist/commands/tree.js.map +1 -1
  25. package/dist/commands/unlink.js +3 -7
  26. package/dist/commands/unlink.js.map +1 -1
  27. package/dist/commands/updates.js +2 -4
  28. package/dist/commands/updates.js.map +1 -1
  29. package/dist/commands/versions.js +3 -7
  30. package/dist/commands/versions.js.map +1 -1
  31. package/dist/constants.js +4 -2
  32. package/dist/constants.js.map +1 -1
  33. package/dist/content/files.js +2 -4
  34. package/dist/content/files.js.map +1 -1
  35. package/dist/execution/CommandValidator.js +33 -1
  36. package/dist/execution/CommandValidator.js.map +1 -1
  37. package/dist/execution/ResourceMonitor.js +26 -1
  38. package/dist/execution/ResourceMonitor.js.map +1 -1
  39. package/dist/execution/TreeExecutionAdapter.js +2 -2
  40. package/dist/execution/TreeExecutionAdapter.js.map +1 -1
  41. package/dist/util/checkpointManager.js +2 -4
  42. package/dist/util/checkpointManager.js.map +1 -1
  43. package/dist/util/dependencyGraph.js +2 -4
  44. package/dist/util/dependencyGraph.js.map +1 -1
  45. package/dist/util/general.js +7 -107
  46. package/dist/util/general.js.map +1 -1
  47. package/dist/util/gitMutex.js +63 -18
  48. package/dist/util/gitMutex.js.map +1 -1
  49. package/dist/util/precommitOptimizations.js +310 -0
  50. package/dist/util/precommitOptimizations.js.map +1 -0
  51. package/dist/util/storageAdapter.js +2 -6
  52. package/dist/util/storageAdapter.js.map +1 -1
  53. package/dist/utils/branchState.js +178 -45
  54. package/dist/utils/branchState.js.map +1 -1
  55. package/package.json +6 -5
  56. package/AI-FRIENDLY-LOGGING-GUIDE.md +0 -237
  57. package/AI-LOGGING-MIGRATION-COMPLETE.md +0 -371
  58. package/ALREADY-PUBLISHED-PACKAGES-FIX.md +0 -264
  59. package/AUDIT-BRANCHES-PROGRESS-FIX.md +0 -90
  60. package/AUDIT-EXAMPLE-OUTPUT.md +0 -113
  61. package/CHECKPOINT-RECOVERY-FIX.md +0 -450
  62. package/LOGGING-MIGRATION-STATUS.md +0 -186
  63. package/MONOREPO-PUBLISH-IMPROVEMENTS.md +0 -281
  64. package/PARALLEL-EXECUTION-FIXES.md +0 -132
  65. package/PARALLEL-PUBLISH-DEBUGGING-GUIDE.md +0 -441
  66. package/PARALLEL-PUBLISH-FIXES-IMPLEMENTED.md +0 -405
  67. package/PARALLEL-PUBLISH-IMPROVEMENTS-IMPLEMENTED.md +0 -439
  68. package/PARALLEL-PUBLISH-LOGGING-FIXES.md +0 -274
  69. package/PARALLEL-PUBLISH-QUICK-REFERENCE.md +0 -375
  70. package/PARALLEL_EXECUTION_FIX.md +0 -146
  71. package/PUBLISH_IMPROVEMENTS_IMPLEMENTED.md +0 -294
  72. package/RECOVERY-FIXES.md +0 -72
  73. package/SUBMODULE-LOCK-FIX.md +0 -132
  74. package/VERSION-AUDIT-FIX.md +0 -333
  75. package/WORKFLOW-PRECHECK-IMPLEMENTATION.md +0 -239
  76. package/WORKFLOW-SKIP-SUMMARY.md +0 -121
  77. package/dist/util/safety.js +0 -166
  78. package/dist/util/safety.js.map +0 -1
  79. package/dist/util/stdin.js +0 -133
  80. package/dist/util/stdin.js.map +0 -1
  81. package/dist/util/storage.js +0 -187
  82. package/dist/util/storage.js.map +0 -1
@@ -1,441 +0,0 @@
1
- # Parallel Publish Debugging Guide
2
-
3
- Quick reference for debugging parallel publish failures with the improved logging and error reporting.
4
-
5
- ## Finding Log Files
6
-
7
- When a package fails during parallel publish, the error summary shows the log file location:
8
-
9
- ```
10
- ❌ Failure Summary:
11
-
12
- @fjell/registry:
13
- Type: Test Coverage
14
- Details: statements: 69.65% (threshold: 70%)
15
- Log: /Users/tobrien/gitw/getfjell/registry/output/kodrdriv/publish_2025-12-12_19-18-55.log
16
- 💡 Suggestion: cd /Users/tobrien/gitw/getfjell/registry && npm test -- --coverage
17
- ```
18
-
19
- **To view the full log**:
20
- ```bash
21
- cat /Users/tobrien/gitw/getfjell/registry/output/kodrdriv/publish_2025-12-12_19-18-55.log
22
- ```
23
-
24
- ## Common Error Types
25
-
26
- ### Test Coverage Failures
27
-
28
- ```
29
- Type: Test Coverage
30
- Details: statements: 69.65% (threshold: 70%)
31
- ```
32
-
33
- **What it means**: Test coverage dropped below the required threshold.
34
-
35
- **How to fix**:
36
- ```bash
37
- cd {package-path}
38
- npm test -- --coverage # Check actual coverage
39
- # Add more tests to increase coverage
40
- ```
41
-
42
- **Retriable**: ❌ No (requires code changes)
43
-
44
- ---
45
-
46
- ### Test Failures
47
-
48
- ```
49
- Type: Test Failure
50
- Details: 3 test(s) failing
51
- ```
52
-
53
- **What it means**: Some tests are failing.
54
-
55
- **How to fix**:
56
- ```bash
57
- cd {package-path}
58
- npm test # Run tests to see failures
59
- # Fix failing tests
60
- ```
61
-
62
- **Retriable**: ❌ No (requires code changes)
63
-
64
- ---
65
-
66
- ### Build Errors
67
-
68
- ```
69
- Type: Build Error
70
- Details: compilation failed: TS2304: Cannot find name 'foo'
71
- ```
72
-
73
- **What it means**: TypeScript compilation or build step failed.
74
-
75
- **How to fix**:
76
- ```bash
77
- cd {package-path}
78
- npm run build # Run build to see full error
79
- # Fix compilation errors
80
- ```
81
-
82
- **Retriable**: ❌ No (requires code changes)
83
-
84
- ---
85
-
86
- ### Git Lock File Conflicts
87
-
88
- ```
89
- Type: Git Lock
90
- Details: Git lock file conflict - another git process running
91
- ```
92
-
93
- **What it means**: Multiple packages tried to run git operations simultaneously and created lock file conflicts.
94
-
95
- **How to fix**:
96
- ```bash
97
- cd {package-path}
98
- rm -f .git/index.lock # Remove stale lock file
99
- # Re-run with --continue
100
- kodrdriv tree publish --parallel --continue
101
- ```
102
-
103
- **Retriable**: ✅ Yes (will auto-retry)
104
-
105
- ---
106
-
107
- ### Dependency Errors
108
-
109
- ```
110
- Type: Dependency Error
111
- Details: ERESOLVE unable to resolve dependency tree
112
- ```
113
-
114
- **What it means**: npm install failed due to dependency conflicts or corruption.
115
-
116
- **How to fix**:
117
- ```bash
118
- cd {package-path}
119
- rm -rf node_modules package-lock.json
120
- npm install # Clean reinstall
121
- ```
122
-
123
- **Retriable**: ✅ Yes (will auto-retry)
124
-
125
- ---
126
-
127
- ### Pull Request Conflicts
128
-
129
- ```
130
- Type: Pr Conflict
131
- Details: Pull request has merge conflicts
132
- ```
133
-
134
- **What it means**: The PR created for this package has conflicts with the target branch.
135
-
136
- **How to fix**:
137
- 1. Visit the PR URL (shown in log file)
138
- 2. Resolve conflicts (GitHub UI or locally)
139
- 3. Re-run publish:
140
- ```bash
141
- kodrdriv tree publish --parallel --continue
142
- ```
143
-
144
- **Retriable**: ✅ Yes (after manual conflict resolution)
145
-
146
- ---
147
-
148
- ### Git State Errors
149
-
150
- ```
151
- Type: Git State
152
- Details: Working directory has uncommitted changes
153
- ```
154
-
155
- **What it means**: Package has uncommitted changes that prevent publish.
156
-
157
- **How to fix**:
158
- ```bash
159
- cd {package-path}
160
- git status # See what's uncommitted
161
- git add . && git commit -m "description" # Commit changes
162
- # OR
163
- git stash # Stash changes temporarily
164
- ```
165
-
166
- **Retriable**: ❌ No (requires manual intervention)
167
-
168
- ---
169
-
170
- ### Timeout Errors
171
-
172
- ```
173
- Type: Timeout
174
- Details: timeout waiting for PR checks
175
- ```
176
-
177
- **What it means**: Command timed out waiting for external service (PR checks, workflows, etc.)
178
-
179
- **How to fix**:
180
- - Check if GitHub Actions are running
181
- - Increase timeout if needed: `--checks-timeout 900000` (15 minutes)
182
- - Or skip waiting: `--sendit` flag
183
- ```bash
184
- kodrdriv tree publish --parallel --continue --checks-timeout 900000
185
- ```
186
-
187
- **Retriable**: ✅ Yes (will auto-retry)
188
-
189
- ---
190
-
191
- ### No Changes (Not an Error)
192
-
193
- ```
194
- Type: No Changes
195
- Details: No changes detected - package already published
196
- ```
197
-
198
- **What it means**: Package was already published and has no new changes.
199
-
200
- **How to fix**: This is expected behavior. Package will be skipped.
201
-
202
- **Retriable**: N/A (not an error)
203
-
204
- ## Recovery Commands
205
-
206
- ### Retry Everything (Including Retriable Errors)
207
-
208
- ```bash
209
- kodrdriv tree publish --parallel --continue
210
- ```
211
-
212
- This will:
213
- - ✅ Skip completed packages
214
- - ✅ Retry packages that failed with retriable errors (git locks, timeouts, etc.)
215
- - ⊘ Skip packages with non-retriable errors (tests, coverage, build)
216
-
217
- ---
218
-
219
- ### Mark Specific Packages as Completed
220
-
221
- If you manually fixed and published a package:
222
-
223
- ```bash
224
- kodrdriv tree publish --parallel --continue --mark-completed "core,logging"
225
- ```
226
-
227
- This will:
228
- - Mark specified packages as completed in checkpoint
229
- - Unblock their dependent packages
230
- - Continue with remaining packages
231
-
232
- ---
233
-
234
- ### Check Parallel Execution Status
235
-
236
- ```bash
237
- kodrdriv tree --status-parallel
238
- ```
239
-
240
- Shows:
241
- - Which packages completed successfully
242
- - Which packages failed and why
243
- - Which packages were skipped due to dependency failures
244
- - Checkpoint information
245
-
246
- ---
247
-
248
- ### Clear Checkpoint and Start Fresh
249
-
250
- ```bash
251
- rm output/kodrdriv/.kodrdriv-parallel-context.json*
252
- kodrdriv tree publish --parallel
253
- ```
254
-
255
- ⚠️ **Warning**: This discards all progress and starts from scratch.
256
-
257
- ## Debugging Workflow
258
-
259
- ### Step 1: Review Error Summary
260
-
261
- After a parallel publish fails, review the error summary printed to console:
262
-
263
- ```
264
- ❌ Failed (2):
265
- - @fjell/registry
266
- - @fjell/http-api
267
-
268
- ❌ Failure Summary:
269
-
270
- @fjell/registry:
271
- Type: Test Coverage
272
- Details: statements: 69.65% (threshold: 70%)
273
- Log: /path/to/publish_2025-12-12_19-18-55.log
274
- 💡 Suggestion: cd /path && npm test -- --coverage
275
- Blocked: @fjell/cache, @fjell/providers
276
- ```
277
-
278
- ### Step 2: Check Log Files
279
-
280
- For each failed package, read its log file:
281
-
282
- ```bash
283
- cat /path/to/publish_2025-12-12_19-18-55.log
284
- ```
285
-
286
- Look for:
287
- - Full error messages
288
- - Stack traces
289
- - Command output
290
- - Timestamps to identify when failure occurred
291
-
292
- ### Step 3: Categorize Errors
293
-
294
- Determine if errors are **retriable** or **permanent**:
295
-
296
- **Retriable** (will auto-retry):
297
- - Git lock files (`.git/index.lock`)
298
- - Network timeouts
299
- - npm cache issues
300
- - Rate limiting
301
- - GitHub API temporary errors
302
-
303
- **Permanent** (need manual fix):
304
- - Test failures
305
- - Coverage drops
306
- - Build errors
307
- - Merge conflicts
308
- - Auth failures
309
-
310
- ### Step 4: Fix Permanent Errors
311
-
312
- For non-retriable errors:
313
-
314
- 1. Navigate to package directory
315
- 2. Run suggested command from error summary
316
- 3. Fix the underlying issue (tests, coverage, etc.)
317
- 4. Verify fix works: `npm test`, `npm run build`, etc.
318
-
319
- ### Step 5: Retry
320
-
321
- After fixing issues:
322
-
323
- ```bash
324
- # Retry with continue (will skip completed, retry retriable)
325
- kodrdriv tree publish --parallel --continue
326
-
327
- # OR if you manually published some packages
328
- kodrdriv tree publish --parallel --continue --mark-completed "pkg1,pkg2"
329
- ```
330
-
331
- ### Step 6: Verify Success
332
-
333
- Check that:
334
- - ✅ All packages show as completed or skipped (no changes)
335
- - ✅ No packages in failed state
336
- - ✅ Dependent packages published successfully
337
- - ✅ Tags created in git
338
- - ✅ GitHub releases created
339
-
340
- ## Tips and Best Practices
341
-
342
- ### Before Running Parallel Publish
343
-
344
- 1. **Run Branch Audit**:
345
- ```bash
346
- kodrdriv tree publish --audit-branches
347
- ```
348
- Catches branch sync issues before publish starts.
349
-
350
- 2. **Check for Uncommitted Changes**:
351
- ```bash
352
- git status
353
- ```
354
- Ensure working directory is clean.
355
-
356
- 3. **Verify All Tests Pass**:
357
- ```bash
358
- kodrdriv tree test
359
- ```
360
- Catch test failures before publish.
361
-
362
- ### During Parallel Publish
363
-
364
- 1. **Use Verbose Mode for First Run**:
365
- ```bash
366
- kodrdriv tree publish --parallel --verbose
367
- ```
368
- See detailed progress and catch issues early.
369
-
370
- 2. **Monitor Log Files in Real-Time**:
371
- ```bash
372
- tail -f {package}/output/kodrdriv/publish_*.log
373
- ```
374
- Watch a specific package's progress.
375
-
376
- ### After Failures
377
-
378
- 1. **Don't Delete Checkpoint Immediately**:
379
- The checkpoint preserves progress. Only delete if you want to start completely fresh.
380
-
381
- 2. **Fix One Category at a Time**:
382
- - First, let retriable errors auto-retry
383
- - Then fix test/coverage issues
384
- - Finally handle git/merge conflicts
385
-
386
- 3. **Use Mark-Completed Sparingly**:
387
- Only mark packages as completed if you manually verified they published correctly.
388
-
389
- ## Common Pitfalls
390
-
391
- ### ❌ Deleting Checkpoint Too Soon
392
-
393
- **Problem**: Deleting checkpoint makes you lose all progress.
394
-
395
- **Solution**: Use `--continue` to resume from checkpoint instead.
396
-
397
- ---
398
-
399
- ### ❌ Marking Failed Packages as Completed
400
-
401
- **Problem**: Marks package as completed without actually publishing it.
402
-
403
- **Solution**: Only use `--mark-completed` for packages you manually verified are published.
404
-
405
- ---
406
-
407
- ### ❌ Not Reading Log Files
408
-
409
- **Problem**: Error summary is truncated, missing full context.
410
-
411
- **Solution**: Always read the full log file for complete error details.
412
-
413
- ---
414
-
415
- ### ❌ Running in Different Directory
416
-
417
- **Problem**: Checkpoint is project-specific, running from wrong directory creates new checkpoint.
418
-
419
- **Solution**: Always run from same project root directory.
420
-
421
- ---
422
-
423
- ### ❌ Mixing Sequential and Parallel Modes
424
-
425
- **Problem**: Sequential context (`.kodrdriv-context.json`) and parallel context (`.kodrdriv-parallel-context.json`) are separate.
426
-
427
- **Solution**: Stick with one mode for a publish run, don't mix.
428
-
429
- ## Need More Help?
430
-
431
- - Check full log files in `{package}/output/kodrdriv/`
432
- - Review error suggestions in summary
433
- - Verify git state: `git status`
434
- - Check GitHub for PR/workflow status
435
- - Use `--status-parallel` to see checkpoint state
436
-
437
- ---
438
-
439
- **Last Updated**: 2025-12-12
440
- **Applies to**: kodrdriv v1.2.29-dev.0 and later
441
-