Question 26 — AB-620 Case Study Set
Review Paideffort's compatibility validator.
CHANNEL_LIMITS = {
"teams": 1.5,
"livechat": 1.5,
"web": 1.6
}
def validate_card(channel, card):
requested_version = float(card["version"])
supported_version = CHANNEL_LIMITS[channel]
if requested_version <= supported_version:
return True
return False
A proposed shared card declares "version": "1.6". The release pipeline evaluates it for all three target channels. Which result should Paideffort expect? (Select one answer)
Validation succeeds for web and fails for both Teams and Live Chat.
Validation succeeds for Teams and web but fails for Live Chat.
Validation succeeds for all three because the validator treats version 1.6 as backward compatible.
Validation fails for all three because production cards can't declare a version higher than 1.5.
Correct answers
Validation succeeds for web and fails for both Teams and Live Chat.
Explanations
Correct Answer:
Validation succeeds for web and fails for both Teams and Live Chat.
Explanation:
The validator compares the requested card version with each Paideffort channel's configured ceiling. Version 1.6 is within the web limit of 1.6 but exceeds the 1.5 limits configured for both Teams and Live Chat.
Wrong Answers:
Validation succeeds for Teams and web but fails for Live Chat.
Paideffort assigns the same 1.5 maximum to Teams and Live Chat, so a version 1.6 card fails both checks.
Validation succeeds for all three because the validator treats version 1.6 as backward compatible.
The code performs a direct numeric comparison. It doesn't implement any fallback or backward-compatibility negotiation.
Validation fails for all three because production cards can't declare a version higher than 1.5.
Paideffort's web channel is configured with a 1.6 ceiling, so the validator accepts the version 1.6 card for web even though it rejects it for Teams and Live Chat.