Conversation
…tility Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace top-level-only key sort with recursive stableStringify so nested objects (enclosure, category) hash identically regardless of field insertion order - Rename unused `date` binding to `_date` to silence lint warnings - Re-throw write errors in saveDateIndex so callers see disk/permission failures instead of them being silently swallowed - Strengthen makeItemKey test to use two objects with different insertion orders rather than the same reference twice - Add test for corrupt/invalid JSON in loadDateIndex index file Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… import Wrap saveDateIndex in its own try/catch so a transient disk error on the date-index file no longer suppresses the webhook or marks the feed update as failed. Also promote getPreviousFeedHistory and storeFeedHistory to the existing static import of feed-history.utility, eliminating the redundant dynamic import inside the webhook block. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add biome.json (recommended rules, excludes frontend/ and public/) - Add lint and test scripts to package.json - Apply auto-fixes: node: import protocol, parseInt radix, import type, template literals, optional chaining, useConst, useLiteralKeys - 215 → 119 remaining violations (95 noExplicitAny, 12 noControlCharactersInRegex, others require manual review) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Enclosure URLs with query string ampersands (e.g. ?foo=1&bar=2) were written raw into XML attributes, producing invalid XML. Use fetchUrl for the content-length HEAD request and sanitizeURLForXML for the feed output, matching the existing behaviour in buildRSSFromApiData. Fixes: "EntityRef: expecting ';'" parse error on feeds with image enclosures. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ntrolled format string' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ntrolled format string' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Enhance feed-history utility with date index support and fixes
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.
Summary
(feed-history/{feedId}.dates.json) records each item's first-seen timestamp by a stable SHA-256 fingerprint of its content (excluding date). Subsequent scrapes restore the original date for
recognised items, preventing RSS clients from treating existing items as new on every poll.
the same stable fingerprint, making GUIDs consistent across scrapes.
';'). The URL is now sanitized for XML output while the raw URL is still used for the content-length fetch.
import type, template literals, optional chaining, useConst).
Migration note
On the first scrape after deploying, feeds without an explicit GUID selector configured will have new GUIDs generated for all existing items (one-time only — the algorithm changed from a
date-dependent hash to a stable one). Subscribers may see all items appear as unread once.