Repository navigation
fix: support source re-ingestion and removal - #30
Aaqibhafeezkhan wants to merge 1 commit into
Conversation
francescobianco
left a comment
There was a problem hiding this comment.
Thank you @Aaqibhafeezkhan, this is a substantial contribution and it closes one of the most important gaps in gknowledge.
Until now, ingestion was a one-way street: if a document was updated, ingested with the wrong model, or simply did not belong in the project, the only fix was to start a new knowledge base. With this PR the knowledge base becomes something you can actually maintain over time, which is the whole point of the "evolving knowledge base" idea.
What makes it solid:
- Provenance-aware cleanup.
_detach_sourcedeletes only the pages that the source alone supported, while pages shared with other sources are kept and just lose the[[source]]link. A shared concept page never disappears because one of its sources was removed. - No stale state left behind. Jobs, review items,
mentions.jsonentries, the index, the overview and the log are all updated, so the wiki, the database and the cache stay consistent. - Safe by design.
_managed_pathrefuses paths outsidesources/andknowledge/, both actions are blocked while an ingestion is running, and Remove asks for confirmation with a destructive-styled dialog. - Tests for both flows, including the tricky case of a page shared between two sources.
Great work, and thank you again!
|
@Aaqibhafeezkhan since you now know the source鈫抪age lifecycle better than anyone, here are the open issues that build directly on this PR, in case you want to keep going:
None of this is required for merging #30. They're just the places where your work pays off most. And of course, the invitation to join https://github.com/openapi/contributors stands 馃檪 |
Thanks @francescobianco Will check them out :) |
Closes #18