CI: commit README.mediawiki delta from script to git #2063

pull ajtowns wants to merge 1 commits into bitcoin:master from ajtowns:202512-diffcheck-expected changing 2 files +28 −10
  1. ajtowns commented at 5:07 am on December 18, 2025: contributor
    Use a hardcoded delta rather than requiring the delta to never change, so that it can be changed deliberately when desired without breaking CI. Also avoids the need to checkout the previous commit, so no longer changes the repository state.
  2. CI: commit README.mediawiki delta from script to git
    Use a hardcoded delta rather than requiring the delta to never change,
    so that it can be changed deliberately when desired without breaking CI.
    Also avoids the need to checkout the previous commit, so no longer
    changes the repository state.
    fdd5a92243
  3. ajtowns commented at 5:08 am on December 18, 2025: contributor

    cf #1820 TODO “Make changes or remove non-existent BIPs 40, 41, and 63 (breaks CI)”

    Obsoletes #2033

  4. jonatack added the label CI on Dec 18, 2025
  5. murchandamus commented at 3:15 am on December 20, 2025: contributor

    Awesome, thanks!

    I checked this out locally, and tested it against a few different scenarios:

    • It worked on my clean branch
    • It worked when I rebased it on top of #1820
    • When I just changed my name in BIP3, it returned:
    0--- scripts/diffcheck.expected  2025-12-19 19:03:27.420764428 -0800
    1+++ /tmp/after.diff     2025-12-19 19:07:55.544474223 -0800
    2+< | Murch
    3+> | murch
    
    • Similarly, when I changed the status in BIP3 to Active:
    0--- scripts/diffcheck.expected  2025-12-19 19:03:27.420764428 -0800
    1+++ /tmp/after.diff     2025-12-19 19:08:48.232487351 -0800
    2+< |- style="background-color: #ffffcf"
    3+> |- style="background-color: #cfffcf"
    4+< | Proposed
    5+> | Active
    
    • And when I changed the status in the README:
    0--- scripts/diffcheck.expected  2025-12-19 19:03:27.420764428 -0800
    1+++ /tmp/after.diff     2025-12-19 19:11:28.026098298 -0800
    2+< | Active
    3+> | Proposed
    

    Finally, I checked out PR1557 add-bip40 and tried it there:

    0--- scripts/diffcheck.expected  2025-12-19 19:13:45.593910988 -0800
    1+++ /tmp/after.diff     2025-12-19 19:14:15.955311040 -0800
    2-< | 40
    3-< | API/RPC
    4-< | Stratum wire protocol
    5-< | Marek Palatinus
    6-< | Standard
    7-< | BIP number allocated
    8-< |-
    

    The Shell script looks good to me and all of that behaves as I would expect. Thank you very much.

  6. murchandamus merged this on Dec 20, 2025
  7. murchandamus closed this on Dec 20, 2025

  8. ajtowns commented at 3:18 pm on December 20, 2025: contributor

    I don’t fully understand what the Perl does, but all of that behaves as I would expect. [prior to the edit]

    It’s sh script, not perl; all it’s doing is generating a diff of what the buildtable script generates and what’s actually in the README, then looks at only the changed lines that begin with | , and then compares those changes with the expected set of changes in scripts/diffcheck.exepected.

    (As a result, if you move some of the changes around, like adding the same set of lines but in a different place, that won’t be highlighted; but otherwise it should be pretty accurate)

  9. murchandamus commented at 3:54 pm on December 21, 2025: contributor
    Yeah, sorry, this one is shell, not Perl. I had written that line about not fully understanding the script at the beginning of my review and especially meant the old script that was being replaced. It wasn’t obvious to me at first glance, whether what you were doing in the replacing script was equivalent to the prior approach. I forgot to update the line after adding the results from my manual tests and sending off the commit. When I stared at the script a bit longer after testing, it made sense to me, so I edited it and merged the PR.
  10. murchandamus commented at 3:58 pm on December 21, 2025: contributor

    (As a result, if you move some of the changes around, like adding the same set of lines but in a different place, that won’t be highlighted; but otherwise it should be pretty accurate)

    I swapped BIP 3 and BIP 8 in the README, it does show there is a difference, but the contents are the same. That could be potentially hard to understand for someone as is, but easy enough to figure out by looking at the diff manually. So, that seems fine to me. Is that what you meant?

     0--- scripts/diffcheck.expected  2025-12-21 07:56:06.015464611 -0800
     1+++ /tmp/after.diff     2025-12-21 07:56:19.180646094 -0800
     2+< | [[bip-0008.mediawiki|8]]
     3+< |
     4+< | Version bits with lock-in by height
     5+< | Shaolin Fry, Luke Dashjr
     6+< | Informational
     7+< | Draft
     8+> |-
     9+> | [[bip-0008.mediawiki|8]]
    10+> |
    11+> | Version bits with lock-in by height
    12+> | Shaolin Fry, Luke Dashjr
    13+> | Informational
    14+> | Draft
    15+< |-
    
  11. ajtowns commented at 3:27 am on December 22, 2025: contributor

    What I was thinking of is if you move differences around, eg moving the BIP 41 placeholder to just before BIP 48:

     0--- a/README.mediawiki
     1+++ b/README.mediawiki
     2@@ -223,13 +223,6 @@ Those proposing changes should consider that ultimately consent may rest with th
     3 | Marek Palatinus
     4 | Standard
     5 | BIP number allocated
     6-|-
     7-| 41
     8-| API/RPC
     9-| Stratum mining protocol
    10-| Marek Palatinus
    11-| Standard
    12-| BIP number allocated
    13 |- style="background-color: #cfffcf"
    14 | [[bip-0042.mediawiki|42]]
    15 | Consensus (soft fork)
    16@@ -279,6 +272,13 @@ Those proposing changes should consider that ultimately consent may rest with th
    17 | Fontaine
    18 | Standard
    19 | Final
    20+|-
    21+| 41
    22+| API/RPC
    23+| Stratum mining protocol
    24+| Marek Palatinus
    25+| Standard
    26+| BIP number allocated
    27 |- style="background-color: #cfffcf"
    28 | [[bip-0049.mediawiki|49]]
    29 | Applications
    

    won’t be caught as a change:

    0$ scripts/diffcheck.sh
    1README table matches expected table from BIP files
    

    With the current diffs, there’s not much you can do with that though.

  12. murchandamus commented at 5:27 am on December 22, 2025: contributor
    I see! I think we’d catch that if it happened. And if not it’s an easy fix.


ajtowns murchandamus

Labels
CI


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-12-27 06:10 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me