@be5invis you said that "the spec said that any length >= 0x8000 means the length should be predicted from context", but at least from the snippet you quoted it only says "If the length stored in the record is 32768 (0x8000), then..." and does not say anything about it being > 0x8000.
is there any predefined order for the last four extra programs? because, fonttools was relying on the fact that fpgm is always the last, but apparently that's not always the case. At least not from the TSI tables generated by VTT 6.20 after running the Light Latin Autohinter
both fonttools and otfcc writes the four program in this order: PREP, CVT, RESERVED and FPGM
which reflects the order of their ids: 0xFFFA, 0xFFFB, 0xFFFC and 0xFFFD