Geinzit / pe

0 stars 0 forks source link

Unable to handle corrupt saved_topics.txt file #6

Open Geinzit opened 2 months ago

Geinzit commented 2 months ago

When saved_topics.txt is manually edited or corrupted via other reasons. The program should probably either clear the starred list or only load legal topic names. But currently the program loads the topic no matter what.

Example:

Hello from
__________________________________________________________________________________________
    _     _                           __             ______                     __
    /|   /                          /    )             /      /               /    )
---/-| -/-----__----------__-------/----/----__-------/------/__----__-------/---------__-
  /  | /    /___)| /| /  (_ `     /    /   /   )     /      /   ) /___)     /  --,   /   )
_/___|/____(___ _|/_|/__(__)_____(____/___/___/_____/______/___/_(___ _____(____/___(___/_

What is your name?
Maodian huang
____________________________________________________________

Hello Maodian huang
____________________________________________________________

What do you want from me?
____________________________________________________________

starred
____________________________________________________________

Here is the list of your favourite topics:
     - Entertainment
     - Technol
     - Sportssadasd
____________________________________________________________

What do you want from me?
____________________________________________________________

suggest
____________________________________________________________

1. Suggesting an article from your favorite topic: Entertainment
    Title: The Matrix has a fifth film in the works and no this is not a simulation  CNN
URL: https://edition.cnn.com/2024/04/03/entertainment/matrix-fifth-movie/index.html
No articles found for the topic: Technol
No articles found for the topic: Sportssadasd

____________________________________________________________

What do you want from me?
____________________________________________________________
soc-pe-bot commented 2 months ago

Team's Response

i think it shows that the corrupted file is still handled quite gracefully whereby topics are still read and the system still runs without crashing.

Items for the Tester to Verify

:question: Issue response

Team chose [response.NotInScope]

Reason for disagreement: While the program doesn't crash upon loading, which is commendable, it still loaded the incorrect topic names into the starred list. Under normal situations, you are unable to star illegal topic names, meaning commands like "star Technol" would be met with an error message telling users that this is not a valid topic name. I think the program is intended to not have unrecognized topic names in the starred list, but the program still allows unrecognized topic names to be loaded when input files are corrupted. So I still think this is an (albeit pretty minor) issue that should be in the scope of any project with similar features.