AntFleet

Disagreement · cdf9ffa0-anthropic-1

Ad sets created under pre-existing campaigns are never appended to .admanage-state/campaigns.json

mismatch
repo 6f7fc663·PR #4·reviewed 1 week ago

Primary finding

Ad sets created under pre-existing campaigns are never appended to .admanage-state/campaigns.json

highdata-losshigh
  • scripts/postprocess-admanage-create.sh:148-153
  • skills/create-campaign/SKILL.md:84-92
SKILL.md explicitly says: when the parent campaign already exists in state, the skill writes the real campaignId directly and may drop the parentCampaignConfigName field. In postprocess phase 2, when campaign_id_in_payload is a real ID (not the sentinel, not empty), the script skips the resolve block entirely. parent_name is whatever .parentCampaignConfigName // empty returned, which per the skill contract is allowed to be empty. The state-append jq filter then uses `select(.configName == $parent)` — with $parent=='' this matches no campaign and the new adSet is NOT written into the state file even though it succeeded on the API. This permanently desynchronizes .admanage-state/campaigns.json from reality. Since SKILL.md says this is the canonical source for schedule-ads to reference IDs, this is a real data-tracking/data-loss bug.

Recommendation

Match on campaignId rather than configName for state append in phase 2, e.g. `select(.campaignId == $cid)`. Also keep parent_name populated from a reverse lookup so logs/results files are accurate.

Counterpart finding

postprocess-admanage-create: ad sets with only campaignId (no parentCampaignConfigName) are not written to state

highbughigh
  • scripts/postprocess-admanage-create.sh:121-123
  • scripts/postprocess-admanage-create.sh:126-143
  • scripts/postprocess-admanage-create.sh:166-171
The script allows an ad-set payload to include a direct campaignId without a parentCampaignConfigName. In that case, parent_name is empty and the state update selects no campaign (select(.configName == $parent)), so the created ad set is never appended to .admanage-state/campaigns.json. This contradicts the stated purpose of appending new ad-set IDs and can lead to duplicate provisioning on subsequent runs because state does not reflect reality.

Recommendation

When parentCampaignConfigName is absent, derive the parent for state updates by: (a) reverse-mapping campaignId to configName from STATE_FILE (build an ID->configName map alongside NAME_TO_ID), or (b) store ad sets under the campaignId key in state when configName is unavailable. Alternatively, require parentCampaignConfigName for all ad-set payloads and skip with an explicit error if missing.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →