AntFleet

Disagreement · cdf9ffa0-openai-0

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

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

Primary 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.

Counterpart finding

Ad-set log line prints empty parent name when campaignId was supplied directly

lowmaintainabilityhigh
  • scripts/postprocess-admanage-create.sh:128
When an ad set's payload has a real campaignId (i.e. it is not the __RESOLVE_FROM_PARENT__ sentinel and parentCampaignConfigName may be empty per the SKILL spec, step 6: 'If the parent campaign was *existing* ..., write the real campaign ID directly and drop the sentinel'), parent_name will be the empty string. The log line will read 'creating ad set 'X' under ...' with a trailing 'under '. Also, the subsequent state append uses `select(.configName == $parent)` with parent_name='' and will silently match no campaign in state, so the ad set succeeds at the API but is NEVER recorded in .admanage-state/campaigns.json. That is a real data-tracking bug (see separate finding), but the misleading log itself is also a maintainability issue.

Recommendation

Derive parent_name for logging from the resolved campaign_id (reverse lookup in NAME_TO_ID or state) when the payload supplies campaignId directly, or fall back to a literal string like '(existing campaign $campaign_id_in_payload)'.

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 →