RefactoringCombos / ArlosCommitNotation

A notation for small commits messages that show the risk involved in each step
310 stars 30 forks source link

How to add a failing test? #27

Closed JayBazuzi closed 2 years ago

JayBazuzi commented 2 years ago

Typically in my red/green/refactor cycle I'll write a test, see it fail, make it pass, and then commit with F or F!! or B or B!!. If I have named my new test well, it will be the commit title.

Sometimes I want to make it obvious that I wrote a failing test before making it pass, so I want to commit the new test by itself.

I wonder if T** would be a good prefix for this situation? Maybe f / b would be a good followup to a T**?

arlobelshee commented 2 years ago

Yes, I would use T** for the failing test. I would still use F or B for the following change. Lower case would imply that I had evidence the change had no effect on untested behavior. I still know of no way to get that level of safety guarantee when changing behavior (F or B).

Arlo Belshee Principal Technical and Leadership Agile Coach @.*** http://digdeeproots.com/ @arlobelshee in:arlobelshee

On Thu, Sep 2, 2021, 18:37 Jay Bazuzi @.***> wrote:

Typically in my red/green/refactor cycle I'll write a test, see it fail, make it pass, and then commit with F or F!! or B or B!!. If I have named my new test well, it will be the commit title.

Sometimes I want to make it obvious that I wrote a failing test before making it pass, so I want to commit the new test by itself.

I wonder if T would be a good prefix for this situation? Maybe f / b would be a good followup to a T?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/RefactoringCombos/ArlosCommitNotation/issues/27, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGCLH7FI5VLYMIDEZXYHCDT774C5ANCNFSM5DKD4IRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

JayBazuzi commented 2 years ago

I've been playing around with this recently. In one case I found that code formatting wasn't getting validated in CI, which had allowed formatting to diverge from the norm.

And now everything is green and passing.

Then thought about what to call the pull request. The "union of all risks" would be E**, but there's no risk to the product so I want to use e.

arlobelshee commented 2 years ago

Aye. I've notice similarly with PR commits and . When working on infrastructure, I often have at least one commit in a chain - because I really have to commit in order to test it. Yet once we get to the final, the risk has been reduced by running those tests. So I've been ending up with a bunch of E - foo that include at least one E**, and even some *** commits.

I'm pretty sure that a universal rule won't work here. So I think I'd leave the rule as is - use the union of risk - but when training people I'd ask them to think about risk and decide if anything has reduced it below that number by addressing every single ** in the sequence.

Arlo Belshee @.*** http://arlobelshee.com/ @arlobelshee https://twitter.com/arlobelshee in:arlobelshee

On Sun, Oct 17, 2021 at 4:51 PM Jay Bazuzi @.***> wrote:

I've been playing around with this recently. In one case I found that code formatting wasn't getting validated in CI, which had allowed formatting to diverge from the norm.

  • First commit was E** Add formatting validation to CI
  • Second commit was a format with ktlint

And now everything is green and passing.

Then thought about what to call the pull request. The "union of all risks" would be E**, but there's no risk to the product so I want to use e .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RefactoringCombos/ArlosCommitNotation/issues/27#issuecomment-945192629, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGCLH5VCV5AOMKZLXXFNMDUHMZMTANCNFSM5DKD4IRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

JayBazuzi commented 2 years ago

think about risk and decide if anything has reduced it

I like this.