Skip to content

Preserve YAML sequence hierarchy in structured symbols - #4977

Merged
Widthdom merged 7 commits into
mainfrom
fix-issue4873
Jul 29, 2026
Merged

Preserve YAML sequence hierarchy in structured symbols#4977
Widthdom merged 7 commits into
mainfrom
fix-issue4873

Conversation

@Widthdom

@Widthdom Widthdom commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Preserve logical YAML sequence paths such as jobs.build.steps[14].with.path while assigning each emitted symbol to its nearest emitted mapping ancestor.
  • Count scalar, empty, alias, anchor, and block-scalar sequence items without emitting synthetic item symbols; suppress block-scalar payloads and preserve sibling mappings after inline sequence mappings.
  • Bump the YAML extractor contract to v3 so unchanged indexes created with the old hierarchy contract are refreshed automatically.
  • Add coverage for root and nested sequences, mappings, anchors, aliases, multiline and empty items, range/order/paging, and stale-index upgrades.

Validation

  • dotnet build CodeIndex.sln -c Release --no-restore -p:UseSharedCompilation=false
    • Passed with 0 warnings and 0 errors after the final origin/main merge.
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release -f net8.0 --no-build --no-restore -p:UseSharedCompilation=false --filter FullyQualifiedName~Issue4873
    • 3 passed.
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release -f net9.0 --no-build --no-restore -p:UseSharedCompilation=false --filter FullyQualifiedName~Issue4873
    • 3 passed.
  • Post-merge YAML/JSON hierarchy and extractor-contract integration set
    • 14 passed on net8.0.
    • 14 passed on net9.0.
  • YAML extractor and outline regression set
    • 9 passed on net8.0.
    • 9 passed on net9.0.
  • Full Release suites after the review fix
    • net8.0: 10,810 passed, 7 skipped, 1 unrelated existing watcher test failed.
    • net9.0: 10,336 passed, 420 skipped, 1 unrelated existing watcher test failed.
    • The failure in both runs was RunCore_SubprojectObservesAncestorIgnoreFileChanges_Issue4592. It passed when rerun alone on net9.0; on net8.0 it also failed alone on the latest origin/main, confirming that it is not introduced by this patch.
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore
  • dotnet run --project tools/CodeIndex.Changelog -- check
    • Validated 51 fragments.
  • Local CodeIndex status check
    • index_matches_workspace: true
    • failed_checks: []
    • fold/graph/issues readiness: ready

Documentation and changelog

  • Updated the English and Japanese YAML outline documentation in USER_GUIDE.md.
  • Updated the English and Japanese regression coverage notes in TESTING_GUIDE.md.
  • Added changelog.d/unreleased/4873.fixed.md.

Adversarial review

  • Round 1 found that unchanged YAML files could retain stale v2 hierarchy rows; the YAML extractor contract bump and full-scan regression test address it.
  • Round 2 returned no findings and rated the patch correct (confidence 0.92).

Follow-ups

Fixes #4873

@Widthdom
Widthdom marked this pull request as ready for review July 29, 2026 08:51
@Widthdom
Widthdom merged commit 5c6890d into main Jul 29, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4873 branch July 29, 2026 08:52
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.

Preserve YAML sequence hierarchy depth in structured symbols

1 participant