This is DEEPWATER that could use some scholarly clarification.
Reference: 1 Samuel 23: 1- 13. Here is a summary, please read 1 Samuel 23:1-13 for details. … David had defeated the Philistines in Keilah. David inquired of Yahweh, before going into battle and Yahweh said that he had given the Philistines into David’s hand. Saul saw an opportunity to kill David in Keilah. David consulted Yahweh and asked if Saul would be successful. Yahweh said that Saul would be successful. David took his Army and left Keilah. When Saul learned of this he stopped his pursuit of David.
Predestination and Foreknowledge are separable. That which never happens can be foreknown by God, but it is not predestined since it never happened. Since foreknowledge doesn’t require predestination, foreknown events that happen may or may not have been predestined. God may know and predestine the end — that something is ultimately going to happen — without predestinating the means to that end. Ref : Michael Heizer, The Unseen Realm.
In this account, David appeals to the omniscient God to tell him about the future. David asks God if he should go to Keilah and whether he will successfully defeat the Philistines. In the second section (23: 6-13) David asks the Lord two questions: 1– Will His enemy Saul come to Keilah and threaten the city on account of David’s presence? 2– Will the people of Keilah turn him over to Saul to avoid Sauls’s wrath? God answers both questions in the affirmative. Saul will come down and they will deliver you. Neither of these events that God foresaw ever actually. happened. Why is this significant? This passage clearly establishes that divine foreknowledge does not necessitate divine predestination. God foresaw what Saul would do and what the people of Keilah would do, given a set of circumstances. In other words, God foreknew a possibility. ( friends this is so important.) The story speaks of the importance of “free will”. The decisions we make are important.