Repository navigation
Flag sources that changed since ingest; Flatpak dev loop and PDF support - #42
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…F support Generated pages rarely go wrong because the model invents something; they go wrong because the source moved on. Every source already stores the hash it was ingested from, so drift is a hash comparison: - core/lint.py: ChangeDetector reports ingested sources whose original file no longer matches, with the pages that cite them (hashes memoised by size and mtime). - IngestionManager.refresh_source(): take the new version, update hash and size, re-ingest (builds on reingest_source from #30). - UI: changed sources are marked "changed since ingest"; Re-ingest becomes "Update"; a toast on open and when the window regains focus. - MCP: stale_sources tool, the lint step of Karpathy's pattern. Flatpak: - make start-flatpak runs the dev loop inside org.gnome.Platform, whose GTK/libadwaita differ from the host's; documented in CONTRIBUTING. - Vendor pypdf 6.19.0: the 0.2.2 bundle cannot import PDFs. - README no longer says "Flatpak planned": the Pages remote installs. Suggested by a reader on dev.to (FromTheArchitect, comment 3i4d5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # gknowledge/ui/window.py
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.
Prompted by a comment on the dev.to launch article from a Fedora user building a GNOME app. Three points, three changes.
Drift, not hallucination
Every source already stores the SHA-256 it was ingested from, and every page stores the source ids behind it, so drift is a hash comparison:
core/lint.py:ChangeDetector.stale_sources()returns ingested sources whose original file no longer matches, each with the pages that cite it. Hashes are memoised by (path, size, mtime). A deleted original is not drift.IngestionManager.refresh_source(): copies the new version intosources/, updates hash and size, then re-ingests throughreingest_sourcefrom fix: support source re-ingestion and removal #30.stale_sourcestool, the lint step of Karpathy's pattern.The rest of lint (orphans, broken links, duplicate titles: #2, #14) can live in the same module.
Develop against the runtime users get
make start-flatpakruns themake startloop insideorg.gnome.Platform(version read from the manifest). Tested on GNOME 51: the app runs, and the differences from the host libadwaita show (accent colour, for example). Documented in CONTRIBUTING.Flatpak
flatpak install --user https://openapi.github.io/gknowledge/io.gknowledge.Gknowledge.flatpakref→ 0.2.2 launches). Closes Fix the Flatpak build (appstreamcli compose fails) #24.import pypdf, so PDFs could not be imported.pypdf6.19.0 is now vendored from its wheel. Check theflatpakCI job on this PR: it is stillcontinue-on-error.Tests
make testandpytest tests: 17 passed, including new tests for drift detection, refresh and the MCP tool. The UI was checked by hand with a modified source, on the host GTK and on the GNOME 51 runtime.🤖 Generated with Claude Code