codewars / codewars.com

Issue tracker for Codewars

Home Page:https://www.codewars.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Translation solution in *actual* author's name

awesomeAD1 opened this issue · comments

When authoring a translation, you must provide a solution that is used to run against the tests and then also published as your solution when the translation is approved.

However, users who fork your translation before approval are able to completely change that solution. But upon approval it will still be published as the original author's solution, under their name and account. While I haven't seen anything malicious going on so far, in strikes me as completely unethical that this is at all possible. The author has no control over what code potentially appears as their solution.

Suggested fix: when a translation is forked, if the solution provided by the original translator is not changed, it is published in their name. If a change is made, it is published under the forking user's name.

This would be good for forking in an existing language as well. The author's solution does not always pass the tests anymore, but a new example solution is still published under the original author's name. If a modified example solution is published, it should be published under the fork author's name.

One complication that just occurred to me is that if a modified solution were to be credited to the forking user, then that would mean on an as-of-yet unapproved translation, the original author of that translation would no longer have a published solution. In effect, it would rob them of a solved kata and they might never know about it.

What we'd need is effectively a tree of solutions that are all published once the translation is published (if the original solution was modified before approval). Any latest solution of a unique contributor in the tree that passes the approved fork's tests is then submitted as a solution.

One might argue that someone could just fork an unapproved translation, make a tiny trivial change to the solution, and publish for approval, thereby guaranteeing an automatic "solved" status in the kata despite not having actually written their own solution. But I guess this would be a rare case and could be handles like any cheater is handled.

Any solutions that pass the tests can be submitted as a valid solution. Any that do not can be published as invalidated. Invalidated solution still count as solved.

Translations still have to be approved. If it's a fork with a trivial change in the solution, this will be visible to the approver.

If it's a fork with a trivial change in the solution, this will be visible to the approver.

Only if the reviewer bothers to inspect the diff of a fork closely. I can't speak for others, but I often don't bother analysing the example solution beyond the fact that it passes the tests, but I ensure the tests are correct.