1. Juniper Networks TechLibrary
"Flow-Based and Packet-Based Processing": This official documentation details the packet processing sequence. In the "First Packet Processing" section
it shows that screens are applied at the ingress interface before the packet is associated with a zone
and policy lookup occurs after the from-zone and to-zone are known.
URL: https://www.juniper.net/documentation/us/en/software/junos/security-policies/topics/concept/security-flow-based-processing-understanding.html
Specific Section: See the diagram and description under "First Packet Processing".
2. Juniper Networks TechLibrary
"Understanding Session Creation": This document reinforces the flow
stating
"When a packet arrives at the device
the device checks it against existing sessions... If no session exists... the device performs a series of checks on it... These checks include... applying security screens... determining the zone the packet is coming from... [and] applying the security policy for that context."
URL: https://www.juniper.net/documentation/us/en/software/junos/flow-packet-processing/topics/concept/session-understanding.html
Specific Section: "Session Creation" details the sequence of events for a new flow.