As you pointed out, the use of contract for children negate the possibility of bastards. The status of the child is decided by parents when the contract is signed and as such the family, culture, name and inheritance rights of the child are decided by both parents.
Some questions still remain, let say we have a couple, Duke X married Duchess Y.
first what happens to that new family?
Perhaps the most straightforward route to obtaining land is through marriage. Unless the marriage contract is specifically altered not to share ownership, any land owned by either spouse becomes the shared property of both. We leave the option open for a prenuptial agreement because you never know, he/she may be a gold digger. Seriously, they may actually be trying to dig up gold on your land."
So we have a family with a now double duchy, than one of the spouse decide to have a children with not his/her partner.
for the sake of the questions lets say that Duke X is having a baby with waitress A, can Duke X decide to welcome the child into family XY or is he limited to family X; if of family X will that child be unavailable for Duchess Y (only through child code) or will it naturally appear as a potential heir for her ?
If the child is of family XY can Duke X reserve that child and block Duchess Y access to it ?
If both Duke X and Duchess Y agree for each other to have babies on the side will they be able to welcome them in family XY, with both of them signing the baby contract on top of the other parent ? ( example would be a political marriage between 2 Neran Duke but they want to have mixed babies, say brudvir/neran babies, so they agree to see a surrogate brudvir parent and produce a child or two)
So a few questions but no bastards as the parents are always willing and responsible for the child.