Repository navigation
Conversation
regenerate_indexes() never read the existing index.md and wrote the listing without frontmatter, so an okf_version declared per SPEC.md §8/§12 was dropped on every enrich run. Carry the key forward at the bundle root only; other index files stay frontmatter-free.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
regenerate_indexes()rewrites everyindex.mdfrom scratch and never reads the existing file, so anokf_versiondeclared in the bundle-rootindex.md— the only place SPEC.md §8/§12 allow it — is dropped on everyenrichrun (runner.pycalls it at the end ofenrich_all).This change reads the existing bundle-root
index.mdbefore rewriting it and re-emits itsokf_versionkey ahead of the regenerated listing. Only that key is carried, and only at the bundle root; every otherindex.mdstays frontmatter-free, as §8 requires.Reproduced on a copy of
bundles/acme_retailat ad30107 withokf_version: "0.2"added to the rootindex.md: before this change the key is gone after one run; after it, it survives.Notes:
yaml.safe_dumprenders the value asokf_version: '0.2'(single quotes); that is the same YAML string as the spec's"0.2".tests/test_index.py::test_regenerate_preserves_root_okf_version. Full suite: 40 passed.Related to #26 (gap 1 there is the behaviour this fixes).