L17 INTEGRATED EXERCISE - PROBLEM D
Workshop log line check
Label: AI allowed — keep a record. Your specification and your tests are
your own unaided work. Generation of the implementation is assisted.

SITUATION
A plant-hire company's workshop (invented) keeps its work log as a text
file, one entry per line. Before the log is loaded into the tracking
system, every line must be checked. Bad lines get sent back to the
technician who wrote them. Lines come from several people typing by hand,
so spacing varies, and the lines are read from a file.

The format sheet says a line has four fields separated by a vertical bar:

    UNIT | HOURS | CODE | INITIALS

    UNIT      "PH-" followed by exactly four digits, e.g. PH-1042
    HOURS     machine hours: a whole number or a number with one
              decimal place, e.g. 88 or 1523.5
    CODE      one of INSP, SVC, DEFER, REPL, in capitals
    INITIALS  the technician's initials: two or three capital letters

    Example:  PH-1042 | 1523.5 | INSP | JMR

TASK
Write a function named is_valid_log_line that takes one line of text and
returns True if the line meets the format sheet and False if it does not.
It must not crash on a bad line; a bad line is an answer, not an error.

WHAT YOU PRODUCE (use L17_submission_template.txt)
1. Specification and acceptance criteria. State the inputs, the output
   (its exact form), the constraints, and the criteria that decide
   whether a result is correct. Surface every assumption you had to make.
2. Tests, written from your criteria before you read any generated code.
3. The implementation you are signing for.
4. A correction record for every failure.
5. A complete AI-use record.

Time: about 10 minutes for item 1, with no assistant. Then about 22
minutes for items 2 to 4. Set a timer; the time limits are part of the
exercise.
