Clear Automated Feedback
Introduction
Welcome back to Ship a Reviewable Change. We are now at Lesson 4 of 6, Clear Automated Feedback Before Human Review. In the previous lesson, we documented which checks should support the change. Now we will perform those checks before asking a human to review the code. We will verify the visible ticket listing, remove mechanical Flake8 noise, and confirm that pytest expects the same formatter contract. Our goal is to improve review readiness without adding unrelated features or expanding the ticket-formatting scope.
Read the Ticket Contract and Local Rules
Before we run anything, we need a shared definition of what is correct. Flake8 and pytest are already installed in the environment, so no installation work is needed now. The project style rule is:
Flake8 therefore flags source lines longer than 100 characters. The ticket code supplies the behavior being checked:
Ticket stores the ID, title, and notes. add_note() changes the notes list, create_ticket() stores and returns the same ticket, and format_ticket() reads the values needed for the compact listing. It also selects the singular label note when the count is one and the plural label notes for other counts.
main.py uses ticket 1, while the focused test uses ticket 7. The empty app/__init__.py supports the package import, and solution.py delegates to main.py without adding behavior.
Run the Entry Point First
The course begins the local review gate with the user-visible path. Running main.py exercises ticket creation, note updates, formatting, and printing in one small example:
The empty dictionary is sufficient for this demonstration because create_ticket() stores the ticket and returns it immediately. Then add_note() increases the note count, and format_ticket() combines the ID, title, count, and grammatically appropriate note label. Running the file should produce:
The output gives us three quick checks: the ID is 1, the title is Reset password, and the current note count is displayed as 1 note. If one value is wrong, we can trace that value through creation, note updates, and formatting.
Starting with the entry point is a diagnostic convention used in this course because it provides fast feedback about user-visible behavior. The checks do not technically depend on one another and may be run individually when investigating a specific problem.
