Skip to content

feat(extract): structural extraction for YAML config files - #14

Merged
alduron merged 1 commit into
v8from
feat/content-symbols
Aug 9, 2026
Merged

alduron merged 1 commit into
v8from
feat/content-symbols

Conversation

@alduron

@alduron alduron commented Aug 9, 2026

Copy link
Copy Markdown
Owner

.yaml/.yml had no _DISPATCH entry, which also meant collect_files never enumerated them (it walks dispatch suffixes only). A config-driven repo produced nothing, and the is_package_manifest_path apm.yml branch in _get_extractor was unreachable.

extract_yaml emits a node per block-mapping key labelled by its dotted path (search.departments), plus file -> key -> key contains edges, so an anchor reads profile/config.yaml::search.departments. Pure line parsing, no tree-sitter and no PyYAML dependency, matching extract_markdown.

Bounded the same way extract_json is manifest-only (Graphify-Labs#1224): depth 3, 40 children per parent, 400 nodes and 1 MiB per file, and keys inside a sequence item are skipped as data rows.

Verified on three real files:

file result
a 23KB profile config 120 nodes, all 11 top-level sections, list contents correctly skipped
.github/workflows/ci.yml 19 nodes, the real job tree
.pre-commit-config.yaml 2 nodes (repos only) - it is data, not sections

15 new tests. No new failures in the suite: 38 pre-existing, byte-identical before and after.

Client-side counterpart: aethergraph-cli feat/content-symbols.

🤖 Generated with Claude Code

`.yaml`/`.yml` had no dispatch entry, which also meant `collect_files` never
enumerated them (it walks `_DISPATCH` suffixes only), so a config-driven repo
produced nothing and the `is_package_manifest_path` apm.yml branch in
`_get_extractor` was unreachable.

`extract_yaml` emits a node per block-mapping key labelled by its DOTTED PATH
(`search.departments`), plus file -> key -> key `contains` edges, so an anchor
reads `profile/config.yaml::search.departments`. Pure line parsing, no
tree-sitter and no PyYAML dependency, matching `extract_markdown`.

Bounded the same way `extract_json` is manifest-only (Graphify-Labs#1224): depth 3, 40
children per parent, 400 nodes and 1 MiB per file, and keys inside a SEQUENCE
item are skipped as data rows. A pre-commit config therefore yields just
`repos`, while a CI workflow yields its real job tree.

Verified on three real files; no new failures in the suite (38 pre-existing,
unchanged before and after).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@alduron

alduron commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

CI note: the two test (3.10) failures are pre-existing on v8, not from this PR.

FAILED tests/test_js_import_resolution.py::test_js_import_resolution_ignores_stale_importer_cache_when_target_appears
FAILED tests/test_js_import_resolution.py::test_tsconfig_alias_none_exist_creates_no_false_edge

Both fail identically on an unmodified checkout at 8564b37, which is behind this branch's base:

$ PYTHONPATH=. python -m pytest tests/test_js_import_resolution.py -q
2 failed, 38 passed

They are JS/TS import-resolution assertions with no path to the YAML extractor.

I also diffed the whole suite before and after this change, on the same machine, and the failure sets are identical - 38 pre-existing both ways, zero new:

$ comm -13 before.txt after.txt   # new failures caused by this change
(empty)
$ wc -l before.txt after.txt
38 38

The other 36 are missing optional extras (tree-sitter-hcl for terraform, image/vision deps) and Windows symlink privileges, so CI's Linux runner sees only these two.

security-scan and skillgen-check pass. test (3.12) was cancelled by fail-fast, not failed.

🤖 Generated with Claude Code

@alduron
alduron merged commit 4fa4a19 into v8 Aug 9, 2026
2 of 4 checks passed
@alduron
alduron deleted the feat/content-symbols branch August 9, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant