Commit 5aeb0ec
test: genuinely exercise late-bound BUMP path in from_beef spec
The previous spec invoked merge_bump after merge_transaction, which
triggers F5.6's retroactive upgrade. The ancestor then landed on-wire
as FORMAT_RAW_TX_AND_BUMP and the parser populated merkle_path at read
time — before find_atomic_transaction ever ran. The spec passed but
would still have passed with the pre-#468 from_beef implementation
(bare subject extraction without find_atomic_transaction routing).
Rewrite to bypass merge_bump: push the BUMP directly into beef.bumps
so the ancestor stays FORMAT_RAW_TX on-wire. Add a sanity assertion
that the serialised ancestor.format is FORMAT_RAW_TX, so a future
change that reintroduces the F5.6 path silently would fail the spec.
Verified the spec now fails when from_beef is reverted to the old
`beef.transactions.reverse.find(&:transaction)&.transaction` shape.
Ref: remote review on PR #473, bug_001_1.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent b60743d commit 5aeb0ec
1 file changed
+22
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
793 | 793 | | |
794 | 794 | | |
795 | 795 | | |
796 | | - | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
797 | 805 | | |
798 | 806 | | |
799 | 807 | | |
800 | 808 | | |
801 | 809 | | |
802 | 810 | | |
803 | 811 | | |
804 | | - | |
805 | | - | |
806 | 812 | | |
807 | 813 | | |
808 | 814 | | |
| |||
814 | 820 | | |
815 | 821 | | |
816 | 822 | | |
817 | | - | |
818 | | - | |
819 | | - | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
820 | 826 | | |
821 | 827 | | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
822 | 834 | | |
823 | 835 | | |
824 | 836 | | |
825 | 837 | | |
826 | 838 | | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
827 | 843 | | |
828 | 844 | | |
829 | 845 | | |
| |||
0 commit comments