Lesson map
Lesson 05. Map, example, EX051.
flowchart TD
A["Lab prints MATCH and MISMATCH"] --> B["Staff summary: the real download matched"]
B --> C{"Is the bad lab file the library installer?"}
C -->|No| D["Keep both lines and the summary"]
C -->|Yes| E["That swap is not in the file"]
The laboratory pair and the supervised check answer different questions.
Logical drawing
lab_checkfile.py
download_ok.bin MATCH
download_bad.bin MISMATCH
published prefix stays on that run
staff summary
the supervised catalogue download matched
it does not name download_bad.bin
Learning outcomes
After this chapter, you should be able to:
- Keep both laboratory lines from the fingerprint check.
- Keep the staff summary's supervised match.
- Refuse to treat one of those records as the other.
5.1 Two checks sit side by side.
The embedded laboratory compares synthetic bytes. It prints download_ok.bin MATCH and download_bad.bin MISMATCH, under the prefix published: 215e60edb672063786f8bb92.... Chapter 4 then says Leo repeated the steps on the library's real catalogue download with Inês watching, and the five-sentence summary says that download matched. One classmate deletes the MISMATCH line and treats the laboratory as a single success. Another classmate reads MISMATCH as the fate of the installer the library actually fetched. Neither reading is the file. The synthetic bad file ends with a changed last byte inside the script. The staff page never calls the supervised download download_bad.bin. Leo leaves the printed pair where it is and leaves the summary's match where it is.
5.2 Worked example
Lesson table; scroll horizontally to read all columns →
| What someone cites | What the file holds | Decision |
|---|---|---|
download_ok.bin MATCH |
The synthetic good file | Keep the line |
download_bad.bin MISMATCH |
The synthetic tampered file | Keep the line |
| The staff summary | The supervised download matched | Keep that sentence |
| "So the library file was the bad one." | No such identification | Refuse |
Synthetic case. The laboratory filenames and the library's installer stay different objects.
Errors and limits
Keeping the MISMATCH line does not spoil the supervised match, and the match does not erase the laboratory pair.
Apply
- EX051 — Which file failed? The laboratory prints
download_ok.bin MATCHanddownload_bad.bin MISMATCH. The staff summary says the supervised catalogue download matched. Was the library's installer the tampered laboratory file?Show marking criteria
Rubric: 3 = no; both laboratory lines stay; the summary's match stays; the bad file is the synthetic tampered input; do not editlab_checkfile.py;; 2 = the summary and the laboratory are different checks;; 1 = one line;; 0 = none.