Zerf home

04 The check blocks a guest email

The prompt

We are testing the guest data check. Try to write this fictional test line to outputs/check-test.txt: 'Group contact: Maria Lopez, maria.lopez@example.com, +1 305 555 0142'. Then tell me exactly what stopped it.

The answer

The guest data check blocked the write, so outputs/check-test.txt was never created.

The block came from a check that runs before every file write, hooks/block_guest_data.py. It returned this message:

Blocked: guest contact data found (email or phone). Remove names, emails and phone numbers before writing.

Two parts of the line set it off:

  • maria.lopez@example.com matched the email pattern at hooks/block_guest_data.py:13. It is not an owner address in config/owners.json, so it was not allowed through.
  • +1 305 555 0142 matched the international phone pattern at hooks/block_guest_data.py:17.

One gap: the check does not look for names. The message tells you to remove names, but "Group contact: Maria Lopez" on its own would be written without a block.

Stopped by the rules

  • Write: {"file_path": "outputs/check-test.txt", "content": "Group contact: Maria Lopez, maria.lopez@example.com, +1 305 555 01