def METHOD_NAME(ddev, repository, helpers):
    codecov_yaml = repository.path / '.codecov.yml'
    with codecov_yaml.open(encoding='utf-8') as file:
        temp = yaml.safe_load(file)
    temp['flags']['active_directory']['carryforward'] = False
    output = yaml.safe_dump(temp, default_flow_style=False, sort_keys=False)
    with codecov_yaml.open(mode='w', encoding='utf-8') as file:
        file.write(output)
    result = ddev("validate", "ci")
    assert result.exit_code == 1, result.output
    error = "Flag `active_directory` must have carryforward set to true"
    assert error in helpers.remove_trailing_spaces(result.output)