`bd mol pour` creates molecule roots with `IssueType: types.TypeMolecule`
(cmd/bd/cook.go:452, :840), but `findParentMolecules` only treated
`TypeEpic` or template-labeled issues as molecule roots. As a result,
walking up from any poured-molecule step never found a parent, so:
- `bd close <step> --continue` silently no-oped (`AdvanceToNextStep`
returned `nil, nil` and the close-flow skipped its print path)
- `bd close <step> --continue --claim-next` claimed nothing — the
`--claim-next` branch in close.go is gated on `!continueFlag`
The existing tests (TestFindParentMolecule, TestFindParentMoleculesBatch,
TestAdvanceToNextStep, plus its concurrency variants) all construct the
root with `TypeEpic + BeadsTemplateLabel`, so both isMolecule clauses
matched and the gap stayed hidden.
Add `TypeMolecule` to the isMolecule check, plus two regression tests:
- TestFindParentMolecule_RootShapes — table-driven, covers every root
shape (TypeEpic+label, TypeMolecule no-label, TypeTask+label, plain
TypeTask) for both findParentMolecule and findParentMolecules.
- TestAdvanceToNextStep_PouredMolecule — reproduces #3719 end-to-end:
poured-style root, autoClaim=true, asserts the next step is
actually moved to in_progress.
Fixes#3719
Co-authored-by: AI+idvorkin <aitools-idvorkin@gmail.com>