So, it's a bit like the case where adjectives agree with the nearest thing they're modifying 'puer puellaque parva' means the small boy and girl.
This is certainly correct when the adjective is not predicate. When it is, the "rules" seem to be much more complex -- indeed, so complex, I'm not even sure you could call them rules. There then seems to be some kind of attraction to the masculine (if the nouns are living things and at least one is masculine (?): puer puellaque una profecti
, to modify what seems to be a standard example from Livy) or the neuter (if inanimate objects: (from Livy again, via A+G) labor voluptasque societate quadam inter se naturali iuncta
(Work and pleasure are joined together by some sort of natural partnership), where neither labor
(masc) nor voluptas
(fem) is neuter but the participle is!). But even this seems to be subject to a multiplicity of exceptions or variant usages.