Commit d1eb237
fix: improve mergebot /update command with better fork handling and checkout (msgflux#19)
* docs: Add CLAUDE.md with project guidelines
- Complete project structure overview
- Common commands and workflows
- Release process (always use ./scripts/release.sh)
- Architecture details and optimizations
- Linting, testing, and CI/CD guides
- Troubleshooting tips
This file provides context for Claude Code to work more effectively
with the project without repeating instructions.
* Add CHANGELOG.md for release tracking
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: optimize env parser latency with advanced caching
- Add field name to env name mapping cache for faster lookups
- Add absolute path cache to avoid repeated pathlib operations
- Add type introspection cache for complex types (Union/Optional)
- Optimize _preprocess_env_value with fast paths for primitive types
- Optimize _get_env_name with fast path for no transformations
- Optimize _decode_from_dict with atomic encoder/decoder cache
- Add comprehensive benchmark suite with cold vs warm analysis
- Move profile_settings.py to benchmark/ directory
- All tests passing (22/22) and lint/format checks clean
Performance improvements:
- Main benchmark: 0.023ms per load (excellent consistency)
- Cold start: 1.489ms (1.3x faster than pydantic)
- Warm cached: 0.011ms (117.5x faster than pydantic)
- 129.6x speedup from cold to warm caching
* docs: update README with new performance metrics and optimizations
- Update benchmark results: 0.023ms per load (down from 2.271ms)
- Add cold vs warm performance comparison: 117.5x faster when cached
- Document advanced caching strategies implemented
- Update comparison table with new performance metrics
- Reflect 129.6x internal speedup from cold to warm caching
* fix: improve mergebot update command with better error handling and fork support
- Add branch existence validation before attempting checkout
- Add proper handling for PRs from forks with clear messaging
- Add detailed error messages for branch deletion, permission issues
- Add branch comparison logic to check if update is actually needed
- Add comprehensive debug logging for troubleshooting
- Handle edge cases where branch was deleted after merge
- Provide helpful instructions for manual updates when automation fails
* fix: improve mergebot /update command with better fork handling and checkout
This commit fixes several issues with the `/update` command in the mergebot workflow:
**Problems fixed:**
1. Checkout was trying to fetch branch from base repo instead of head repo
2. Branch comparison used incorrect reference format for same-repo PRs
3. Fork validation happened too late, causing unnecessary operations
**Changes:**
- Add early exit for fork PRs in "Get PR info" step with clear error message
- Specify repository parameter in checkout action to fetch from correct repo
- Simplify branch comparison to use simple branch reference for same-repo PRs
- Update validation conditions to skip unnecessary steps for fork PRs
- Remove redundant "Handle fork PR" step (now handled earlier)
- Add better logging for debugging
**Benefits:**
- Fork PRs now get immediate, clear feedback that update is not supported
- Same-repo PRs can now be updated correctly without checkout errors
- Better performance by skipping unnecessary operations for forks
- Cleaner code flow and easier maintenance
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent e6af2fd commit d1eb237
File tree
2 files changed
+205
-11
lines changed- .github/workflows
- src/msgspec_ext
2 files changed
+205
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
392 | 432 | | |
393 | 433 | | |
394 | 434 | | |
395 | 435 | | |
| 436 | + | |
396 | 437 | | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
401 | 549 | | |
402 | 550 | | |
403 | | - | |
| 551 | + | |
404 | 552 | | |
405 | 553 | | |
406 | 554 | | |
| |||
409 | 557 | | |
410 | 558 | | |
411 | 559 | | |
412 | | - | |
| 560 | + | |
413 | 561 | | |
414 | 562 | | |
415 | 563 | | |
416 | 564 | | |
| 565 | + | |
417 | 566 | | |
418 | 567 | | |
419 | 568 | | |
| |||
424 | 573 | | |
425 | 574 | | |
426 | 575 | | |
427 | | - | |
| 576 | + | |
428 | 577 | | |
429 | 578 | | |
430 | 579 | | |
| |||
436 | 585 | | |
437 | 586 | | |
438 | 587 | | |
439 | | - | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
440 | 591 | | |
441 | 592 | | |
442 | 593 | | |
| |||
446 | 597 | | |
447 | 598 | | |
448 | 599 | | |
| 600 | + | |
449 | 601 | | |
450 | 602 | | |
451 | 603 | | |
452 | 604 | | |
453 | 605 | | |
454 | | - | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
455 | 609 | | |
456 | 610 | | |
457 | 611 | | |
| |||
473 | 627 | | |
474 | 628 | | |
475 | 629 | | |
476 | | - | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
477 | 641 | | |
478 | 642 | | |
479 | 643 | | |
| |||
482 | 646 | | |
483 | 647 | | |
484 | 648 | | |
485 | | - | |
| 649 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
352 | 382 | | |
353 | 383 | | |
354 | 384 | | |
| |||
0 commit comments