# 为长宽限期编辑存储真实修订版

**URL:** <https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614>\
**Category:** Feature\
**Created:** [2018年二月26日 23:43 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614 "2018-02-26T23:43:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2018年二月26日 23:43 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/1 "2018-02-26T23:43:09Z")

</div>

I think a very awesome change would be to calculate “amount of diff” prior to deciding if an edit requires storage of a real revision or not.

If you changed 5 letters in a post, sure it can be a “grace period” edit with no revision stored. If you deleted 10 paragraphs it should never be considered a “grace period edit” and a revision should be stored.

I suggest:

`grace_period_edits_max_chars_changed` default to: 30

Any larger changes deserve to be tracked anyway and can be vectors for abuse, so this would be a great change on 2 levels.

1. It protects end users from “mistake” nuking own post with a ninja edit (cause a revision will be stored)

2. It protects the community from “bad actors” that abuse ninja edits and starts surfacing them.

Can not think of any downsides really.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年二月26日 23:44 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/2 "2018-02-26T23:44:33Z")

</div>

I would wait to see how often this happens again.. because I think there is significant risk in what you are describing. I don’t want to do a knee-jerk “bad thing happened once, therefore radical change” response on this.

As for abuse, that will be handled by TL0 not getting ANY grace period on edits.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2018年二月26日 23:45 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/3 "2018-02-26T23:45:24Z")

</div>

This is the exact vector a lot of TL0 spam entered the system, so there is tons of precedent there, though we protect otherwise.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年二月26日 23:45 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/4 "2018-02-26T23:45:36Z")

</div>

Like I said

> [@codinghorror](#):
>
> As for abuse, that will be handled by TL0 not getting ANY grace period on edits.

So that is a non issue at the moment. I am the type of poster who makes a LOT of grace period edits, so your proposed change to save yourself one mistake one time, would really screw me over.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2018年二月26日 23:46 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/5 "2018-02-26T23:46:27Z")

</div>

Until spambots figure out how to get to TL1… it will happen I can guarentee that.

Not rushing to fix this, but I can not think of any downsides.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年二月26日 23:46 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/6 "2018-02-26T23:46:55Z")

</div>

As someone who makes _extensive_ grace period edits on the regular, I can think of many ways your heuristic would screw me over.

---

<div class="post-metadata">

**Author:** ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**Post date:** [2018年二月26日 23:52 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/7 "2018-02-26T23:52:50Z")

</div>

I also make a lot of grace period edits and I wouldn’t want to be prevented from making them.

On the other hand, I could live with a type of “really want to make major changes?” educational/confirm modal.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2018年二月26日 23:54 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/8 "2018-02-26T23:54:04Z")

</div>

> [@Mittineague](#):
>
> I also make a lot of grace period edits and I wouldn’t want to be prevented from making them.

Oh this is completely misreading my feature request here. And I think @codinghorror also misread it.

I **don’t want to stop edits** in these cases.

All I want is to create a **proper revision** in the post\_revisions table for any **large** edits made.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年二月27日 00:05 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/9 "2018-02-27T00:05:34Z")

</div>

Ohhhh aha my bad, I indeed misunderstood. Carry on then, apologies!

---

<div class="post-metadata">

**Author:** ![dje4321](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dje4321/32/78454_2.png) [@dje4321](https://meta.discourse.org/u/dje4321)\
**Post date:** [2018年二月27日 01:14 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/10 "2018-02-27T01:14:36Z")

</div>

Sounds like a good idea though i do think the default limit of 30 might be a bit high. 30 characters could completely change the meaning or point of a post with no edit history. Why not something closer to 10-15? that would allow room for the occasional missed word or bad spelling without much room for post changing edits

---

<div class="post-metadata">

**Author:** ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)\
**Post date:** [2018年二月27日 02:02 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/11 "2018-02-27T02:02:19Z")

</div>

You can change the meaning of a post with a three character change. This isn’t about highlighting “change of meaning”, it’s to prevent accidents and abuse.

---

<div class="post-metadata">

**Author:** ![dje4321](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dje4321/32/78454_2.png) [@dje4321](https://meta.discourse.org/u/dje4321)\
**Post date:** [2018年二月27日 02:05 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/12 "2018-02-27T02:05:37Z")

</div>

Thats fair but i still feel like 30 characters is too much.

---

<div class="post-metadata">

**Author:** ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)\
**Post date:** [2018年二月27日 02:07 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/13 "2018-02-27T02:07:05Z")

</div>

This is why site settings exist.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2018年三月7日 07:50 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/14 "2018-03-07T07:50:35Z")

</div>

This is now in place with:

[https://github.com/discourse/discourse/commit/e162cd16b663d4da18cef7492a47550024275753](https://github.com/discourse/discourse/commit/e162cd16b663d4da18cef7492a47550024275753)

Implementation is quite complete which means you can not sneak in GIANT edits with no revisions by sneaking in lots and lots of small edits.

@codinghorror I feel given this change we are protected from a certain ugly vector of spam abuse cause we now have proper auditing.

I think we can drop “Disable edit grace period for TL0 users by default” from the release … with this change it is no longer really needed.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年三月7日 08:17 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/15 "2018-03-07T08:17:44Z")

</div>

Hmm, I am not sure I am totally comfortable with that, but I guess we can give it a try and see?

Wait, **20 characters?** that’s way too small of a default. I could quickly add one sentence and that would trigger..

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2018年三月7日 09:23 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/16 "2018-03-07T09:23:27Z")

</div>

I am not married to 20 chars, just feel that in general it is enough. I would like to deploy to BBS and look at the resulting revisions 24h later. If you want to push it to 30 or 40 we can.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年三月7日 09:50 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/17 "2018-03-07T09:50:15Z")

</div>

20 chars is _wayyyy_ low, I set it to 100, let’s start with that. Even that might be too small.

---

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [2018年三月7日 21:33 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/18 "2018-03-07T21:33:27Z")

</div>

Wait…if we’re increasing this setting to 100 (or even more) I think we still need the `Disable edit grace period for TL0 users by default` feature. 100 characters is plenty of room for a user to turn a valid post into spam, add an inappropriate image, etc. without triggering an edit log.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2018年三月7日 21:35 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/19 "2018-03-07T21:35:44Z")

</div>

> [@jomaxro](#):
>
> 100 characters is plenty of room for a user to turn a valid post into spam

In theory, absolutely, even 20 chars can be enough to insert a bad url. In practice though this is not what we observed.

I think we can wait and see with this change.

There is always the atomic, `min trust to edit post` = `10` which can work around any community being spammed.

**EDIT** I triggered a revision under new rules here

---

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2018年三月7日 21:55 UTC](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614/20 "2018-03-07T21:55:55Z")

</div>

> [@codinghorror](#):
>
> As someone who makes extensive grace period edits

I thought that was just me!!! Yes… I’m not alone.

[下一頁](https://meta.discourse.org/t/store-a-real-revision-for-large-grace-period-edits/81614.md?page=2)
