In I Sam 28 Achish enlists David in his forces for the coming battle between the Princes of Philistine and the Israelites in which Saul meets his end. David's words to Achish are ambiguous, leaving us some wiggle room to believe that David did not actually intend to fight on the Philistine side, but in chapter 29 there is no doubt that David and his men do join Achish in the rendezvous with the Princes of Philistine at Apheq before the march to the Jezreel valley.
At the rendezvous, in 29:3 the Philistines ask Achish what these here "Hebrews" are doing in his forces. Clearly, they do not distinguish between the Hebrews and the Israelites. To them, "they all look the same". Probably as a result of the fickleness described in 14:21, the Philistine princes make it clear to Achish that they will not tolerate any Hebrew presence in their army. Achish sends David and his men back to guard the home front.
How are we to understand this brinkmanship on the part of David? And especially if we view I Samuel as a hidden polemic of the House of David against the House of Saul, how does this incident serve to enhance the image of David? It almost looks as though David was ready to fight, not only against Saul but also against Israel. Although we know that this would not have happened, it certainly does not look good.