This question is about these lines in FRAME Executive's apply_extrinsic
function
pub fn apply_extrinsic(uxt: Block::Extrinsic) -> ApplyExtrinsicResult {
// --snip--
// We don't need to make sure to `note_extrinsic` only after we know it's going to be
// executed to prevent it from leaking in storage since at this point, it will either
// execute or panic (and revert storage changes).
<frame_system::Pallet<System>>::note_extrinsic(encoded);
// AUDIT: Under no circumstances may this function panic from here onwards.
// --snip--
}
The comment before the extrinsic is noted explains that if the extrinsic turns out to be bad, this function will panic and revert the storage changes. Therefore, it is okay to note the extrinsic right away before it has even been applied (where noting means recording it in temporary storage to later calculate the extrinsics root). This makes sense to me.
However, the comment after the extrinsic is noted emphasizes that it is not okay to panic anywhere else in that function.
So how are these comments consistent with each other? They seem to contradict each other.