Repository navigation
Conversation
There was a problem hiding this comment.
Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).
Graphify reviewed this change.
Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).
Graphify review — findings
This PR adds support for Gherkin .feature files to the extraction pipeline. It registers .feature as a document extension in detect.py, introduces a new graphify/extractors/gherkin.py extractor that parses Gherkin keywords (Feature, Background, Scenario, Scenario Outline, Examples) into structural nodes with contains edges reflecting their hierarchy, and wires this extractor into the dispatch table in extract.py. It also adds accompanying tests covering classification, dispatch, and various extraction scenarios. The surface area is the file-type detection extension set, the extract dispatcher/imports, one new extractor module, and additions to the detect and extract test suites.
Worth a look
- Duplicate-name Examples node collides and misattaches parent edge —
graphify/extractors/gherkin.py:78· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 1916 functions depend on the 909 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
_get_extractor()— 25 callers, 6 callees - worse:
classify_file()— 43 callers, 3 callees
Verification — 1916 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 1750 function(s) in the blast radius were not formally verified this run
· 2 more finding(s) on lines outside this diff (see the check run).
There was a problem hiding this comment.
Graphify reviewed this change.
Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).
Graphify review — findings
This PR adds support for Gherkin .feature files to the graphify extraction pipeline. - It registers .feature as a document extension in detect.py (classified as DOCUMENT) and wires it into the extractor dispatch table in extract.py. - It introduces a new graphify/extractors/gherkin.py module that parses feature files line-by-line, emitting nodes for Feature/Background/Scenario/Scenario Outline/Examples keywords and contains edges representing their hierarchy. - It adds accompanying tests in test_detect.py and test_extract.py covering classification, dispatch, and various extraction scenarios; the large set of renamed test/rationale symbols appears to reflect renumbering rather than behavioral changes.
No blocking issues surfaced. 2 lower-confidence candidates did not survive cross-model review.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 2167 functions depend on the 969 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
_get_extractor()— 27 callers, 6 callees - worse:
classify_file()— 44 callers, 3 callees - new:
extract_gherkin()— 10 callers, 4 callees
Verification — 2167 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 1988 function(s) in the blast radius were not formally verified this run
· 1 grounded finding(s) anchored inline below; 2 more finding(s) on lines outside this diff (see the check run).
| } | ||
|
|
||
|
|
||
| def extract_gherkin(path: Path) -> dict: |
There was a problem hiding this comment.
extract_gherkin()
10 callers depend on it (afferent coupling).
Grounded coupling-delta finding (deterministic), not an LLM guess.
There was a problem hiding this comment.
Graphify reviewed this change.
Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).
Graphify review — findings
This PR adds support for Gherkin .feature files to the extraction pipeline. It introduces a new graphify/extractors/gherkin.py module that parses feature files into structural nodes (Feature, Background, Scenario, Scenario Outline, Examples) with contains edges, registers .feature in the extractor dispatch table, and classifies .feature files as documents in detect.py (along with newly added CODE_EXTENSIONS/DOC_EXTENSIONS sets). Accompanying tests cover classification, dispatch, and various Gherkin parsing scenarios. The surface area touches detect.py, extract.py, the new extractor module, and the two test files. Note the diff was truncated, so additional test changes beyond what's shown may exist.
No blocking issues surfaced. 4 lower-confidence candidates did not survive cross-model review.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 2231 functions depend on the 1013 functions this change touches.
Health — this change adds coupling hotspots:
- new:
extract()— 454 callers, 41 callees - new:
_rebuild_code()— 95 callers, 51 callees - new:
detect()— 93 callers, 14 callees - new:
save_manifest()— 34 callers, 11 callees - new:
extract_files_direct()— 17 callers, 20 callees - new:
extract_xaml()— 19 callers, 17 callees - new:
extract_corpus_parallel()— 26 callers, 10 callees - new:
dispatch_command()— 2 callers, 117 callees - …and 37 more
Verification — 2231 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 2052 function(s) in the blast radius were not formally verified this run
· 1 grounded finding(s) anchored inline below; 44 more finding(s) on lines outside this diff (see the check run).
| } | ||
|
|
||
|
|
||
| def extract_gherkin(path: Path) -> dict: |
There was a problem hiding this comment.
extract_gherkin()
10 callers depend on it (afferent coupling).
Grounded coupling-delta finding (deterministic), not an LLM guess.
Summary
This PR adds support for Gherkin (
.feature) files to Graphify's document extraction pipeline.Previously,
.featurefiles were not recognized byclassify_file(), causing them to be skipped during detection and never reach extraction. As a result, BDD specification files produced no graph nodes.This change classifies
.featurefiles as documents and introduces a lightweight structural extractor that models the document hierarchy using Graphify's existing document schema.Changes
Add
.featuretoDOC_EXTENSIONSso Gherkin files are classified asDOCUMENT.Implement a lightweight line-by-line Gherkin extractor.
Register the extractor in the extraction dispatch table.
Extract structural document nodes for:
FeatureBackgroundScenarioScenario OutlineExamplesEmit standard
containsedges between structural elements.Ignore executable step lines (
Given,When,Then,And,But,*) to keep the graph focused on document structure.Preserve the existing Graphify node and edge schema without introducing new graph concepts.
Add regression tests covering:
Design
The implementation follows the existing Markdown extractor philosophy:
containsrelationshipsThis keeps Gherkin support consistent with Graphify's existing document extraction architecture.
Verification
Automated
uv run pytest tests/test_detect.py -k gherkinuv run pytest tests/test_extract.py -k gherkinuv run ruff checkManual
Verified using the standard Graphify update pipeline:
The generated graph correctly contains:
while correctly excluding step keywords (
Given,When,Then, etc.).Fixes
Closes #2349.