lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
15.62k stars 2.28k forks source link

Bug: Puzzle history not correct #4224

Closed mklemenz closed 6 years ago

mklemenz commented 6 years ago

Steps to reproduce:

Expected behaviour:

Actual behaviour before solving (and after pressing next puzzle button):

Actual behaviour after solving the puzzle (before continuing to the next one):

Additional information: the mobile application is affected as well.

mklemenz commented 6 years ago

I cross-checked this bug with a friend - he has no problems. So it must be user-releated. (*further details in #4061 )

anyway, here's further information of what I get with my user https://lichess.org/@/mklemenz : currently the response to GET https://lichess.org/training embeds following array all the time - no matter how many puzzles I play:

lichess.puzzle = {
    data: {
        "game": { ... },
        "puzzle": { ... },
        "mode": "play",
        "user": {
            "rating": 2124, // this one appears to be correct
            "recent": [ // following values do not change when playing some puzzles
                [70940, 10, 1924],
                [70959, -13, 1934],
                [70972, -7, 1929],
                [70976, 7, 1918],
                [70979, 3, 1921],
                [70980, 6, 2000],
                [70985, 5, 1891],
                [70988, -16, 1896],
                [70994, 11, 1875],
                [70995, -12, 1888],
                [70998, -7, 1876],
                [71000, 8, 1869],
                [71002, 9, 1877],
                [71004, 6, 1886],
                [71010, -13, 1900]
            ]
        }
    },
    pref: { ... },
    i18n: { ... }
};

btw, this is the same wrong result as the endpoint https://lichess.org/training/batch responds with. hence there is a connection to #4061

while at the same time, the endpoint https://lichess.org/training/:currentPuzzle/round2 appears to respond correctly with following object:

{ 
    "user": { 
        "rating": 2113, 
        "recent": [
            [110036, -10, 2151], 
            [110038, 0, 2141], 
            [110039, -29, 2141], 
            [110041, 5, 2112], 
            [110042, 18, 2117], 
            [110043, -14, 2135], 
            [110101, 4, 2130], 
            [110102, -16, 2134], 
            [110103, 2, 2118], 
            [110104, 14, 2120], 
            [110105, 5, 2134], 
            [110107, -3, 2139], 
            [110108, 5, 2136], 
            [110124, 3, 2121], 
            [110126, -11, 2124]
        ] 
    }, 
    "round": { 
        "ratingDiff": -11, 
        "win": false 
    }, 
    "voted": null 
}
ornicar commented 6 years ago

It's because you've played all the puzzles in your rating range (more than 22,000)

mklemenz commented 6 years ago

guilty, appearently. :rofl:

I'd like to start over, since also my rating has improved over the last 3 years... is there a way to reset it? (without violating the one-accout-per-person-policy, of course)

ornicar commented 6 years ago

I'm trying to handle that case. You're not the only one to play a lot of puzzles.

mklemenz commented 6 years ago

alright, thanks!