Repository navigation
feat(star): the knowledge indexer records provenance, and stops scraping a function that is gone - #727
Merged
Conversation
…ing a function that is gone Second half of the indexer work begun in #719. That change stopped the indexer destroying metadata; this one makes it record what it cannot know and stop reporting a section it has never been able to fill. PROVENANCE IS DECLARED, NEVER INFERRED Every index entry now carries generated: true or false, and the indexer refuses on an entry that omits it or declares a non-boolean. Whether a file is authored or emitted by a pipeline is not derivable from its path -- knowledge/package-authoring/bindings/ holds pipeline output while its sibling directories hold hand-written material -- and getting it wrong is how a regeneration comes to overwrite something a person wrote. That is devlore-registry#80, which deleted curated metadata precisely because nothing recorded which was which. A NEW file is recorded as authored rather than refused. Not because the path says so, but because the two ways of being wrong are not symmetric: labelling a generated file authored costs one needless review of a regeneration, while labelling an authored file generated invites a pipeline to overwrite it. The default errs toward the harm that is recoverable, and each one is announced in the run output. A pipeline adding its own output should write the entry itself. A NINTH AND TENTH ASSET TYPE references/ holds generated reference material, so derived content has a home whose name states what it is rather than sitting at a domain root looking accidental. README.md is admitted at a domain root as furniture -- orientation addressed to a reader, the same call .github/frontmatter-exempt makes for a repository's own README. Named explicitly, so admitting a second kind of loose file stays a decision somebody has to make. THE PLATFORMS EXTRACTION IS DROPPED, NOT REPAIRED It parsed a buildSystemPrompt function in plan.go for a line reading "Known platforms:". Neither the function nor that string has existed in cmd/writ/writ/migrate since it was refactored. Two guards -- file.exists on the path, and an empty function list -- turned that into an empty list reported as success, so every generated reference has carried `platforms: []` while its three sibling sections populated correctly. Removed with everything that fed it: the _extract_platforms helper, the writ-structure.yaml scrape that supplied its comparison set, and an undocumented_platform contract check that could never fire because the list it iterated was always empty. If platform vocabulary is wanted it should be extracted from a constant family the way the other three are, not scraped from prose. The extractor also writes references/writ-migrate-vocabulary.yaml rather than systems-reference.yaml at the domain root. The old name described one of its four constant families and left the rest looking arbitrary; the new one states whose vocabulary it is. Thirteen integration tests cover both halves -- what is preserved, and each way the tree and its index can disagree. Phase A of docs/plans/cag-epic.md. devlore-registry's matching change lands second: it re-enables the index step, which builds star from this branch's default.
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.
Second half of the indexer work begun in #719. That change stopped the indexer destroying metadata;
this one makes it record what it cannot know, and stop reporting a section it has never been able to
fill.
Provenance is declared, never inferred
Every index entry now carries
generated: trueorfalse. The indexer refuses on an entry thatomits it, or declares a non-boolean.
Whether a file is authored or emitted by a pipeline is not derivable from its path —
knowledge/package-authoring/bindings/holds pipeline output while its sibling directories holdhand-written material. Getting it wrong is how a regeneration overwrites something a person wrote,
which is devlore-registry#80.
A new file is recorded as authored rather than refused, and that is a decision about which way
to be wrong:
The default errs toward the recoverable harm, and every one is announced in the run output. A
pipeline adding its own output should write the entry itself.
Two more asset types
references/— generated reference material gets a home whose name states what it is, ratherthan sitting at a domain root looking accidental.
README.mdat a domain root — furniture, orientation addressed to a reader. The same call.github/frontmatter-exemptmakes for a repository's own README, and named explicitly so admittinga second kind of loose file stays a decision.
The platforms extraction is dropped, not repaired
It parsed a
buildSystemPromptfunction inplan.gofor a line readingKnown platforms:. Neitherthe function nor that string has existed in
cmd/writ/writ/migratesince it was refactored. Twoguards —
file.existson the path, an empty function list — turned that into an empty list reportedas success. Every generated reference has carried
platforms: []while its three siblings populatedcorrectly.
Removed with everything that fed it: the
_extract_platformshelper, thewrit-structure.yamlscrape that supplied its comparison set, and an
undocumented_platformcontract check that couldnever fire because the list it iterated was always empty.
If platform vocabulary is wanted, it should come from a constant family the way the other three do,
not scraped from prose.
Also
The extractor writes
references/writ-migrate-vocabulary.yamlrather thansystems-reference.yamlat the domain root. The old name described one of its four constant families — source systems,
encryption systems, repo layers, platforms — and left the rest looking arbitrary.
Tests
Thirteen,
//go:build integration. Both halves: what is preserved, and each way the tree and itsindex can disagree — including the three new provenance cases.
Ordering
devlore-registry's matching change lands second. It re-enables the index step, which builds
starfrom this repository's default branch, so merging it first would run the old indexer againsta tree it will refuse.
Phase A of
docs/plans/cag-epic.md.