  We investigate linear and additive codes in partially ordered Hamming-like
spaces that satisfy the extension property, meaning that automorphisms of
ideals extend to automorphisms of the poset. The codes are naturally described
in terms of translation association schemes that originate from the groups of
linear isometries of the space. We address questions of duality and invariants
of codes, establishing a connection between the dual association scheme and the
scheme defined on the dual poset (they are isomorphic if and only if the poset
is self-dual). We further discuss invariants that play the role of weight
enumerators of codes in the poset case. In the case of regular rooted trees
such invariants are linked to the classical problem of tree isomorphism. We
also study the question of whether these invariants are preserved under
standard operations on posets such as the ordinal sum and the like.
