Gate 16 (spec-coverage) reports missing @spec for a PHP method whose docblock carries @spec tags when a multi-line attribute sits between the docblock and the declaration.
Seen on ConductionNL/filinq, branch feat/template-charts-images-and-odf: lib/Service/CorrespondenceService.php::generate has three @spec openspec/... lines, then a 17-line #[McpTool(...)] attribute, then public function generate(.
Cause: _docblock_block() in hydra-gates/scripts/lib/check_spec_coverage.py walks up from the declaration and skips only lines that start with #[ or ]. The attribute's argument lines (name: 'generateCorrespondence',, comments, description: ...) stop the walk, so the gate finds no docblock.
Fix: when the walk meets a line ending an attribute ()]), skip back to the matching #[ line before looking for */.
Repro: any changed method with a multi-line attribute above it, run hydra-gates --scope-to-diff.
Gate 16 (spec-coverage) reports
missing @specfor a PHP method whose docblock carries@spectags when a multi-line attribute sits between the docblock and the declaration.Seen on ConductionNL/filinq, branch
feat/template-charts-images-and-odf:lib/Service/CorrespondenceService.php::generatehas three@spec openspec/...lines, then a 17-line#[McpTool(...)]attribute, thenpublic function generate(.Cause:
_docblock_block()inhydra-gates/scripts/lib/check_spec_coverage.pywalks up from the declaration and skips only lines that start with#[or]. The attribute's argument lines (name: 'generateCorrespondence',, comments,description: ...) stop the walk, so the gate finds no docblock.Fix: when the walk meets a line ending an attribute (
)]), skip back to the matching#[line before looking for*/.Repro: any changed method with a multi-line attribute above it, run
hydra-gates --scope-to-diff.