Repository navigation
ci: index the docs on Context7 and refresh on push - #69
Conversation
Context7 has no simple-rss library yet; a search returns only Ruby's standard rss library, so agents that use Context7 cannot retrieve this gem's API. context7.json indexes the README and CHANGELOG, leaves out the tests, signatures, workflows, and maintainer files, and gives agents six rules taken from the README and checked against lib/. It also carries the url and public_key that Context7 reads to verify the maintainer's claim on the library. The refresh workflow asks Context7 to refresh the index after a push to master that changes the README, the CHANGELOG, or context7.json. Context7 allows one refresh every 10 days for one library and answers too-early before then, so that answer ends the job with a notice. Any other non-200 answer fails the job.
|
| "SimpleRSS.fetch returns nil when a conditional GET answers 304 Not Modified, so handle nil when you poll with ETag or Last-Modified.", | ||
| "SimpleRSS.discover finds the feeds that a website advertises. It needs gem \"nokogiri\", \">= 1.16\", \"< 2\" on CRuby; without HTML5 support it raises SimpleRSS::DiscoveryDependencyError before any request.", | ||
| "Use normalized_entries for consistent URLs, dates, content, authors, categories, and attachments across RSS, Atom, and JSON Feed.", | ||
| "simple-rss reads feeds and does not generate new ones. To write a parsed feed back out, use to_xml(format: :rss2) or to_xml(format: :atom)." |
There was a problem hiding this comment.
JSON Feed guidance suggests unsupported export
This rule recommends to_xml for any parsed feed, but JSON Feed input makes that call raise SimpleRSSError. Agents following it may suggest export code that fails. Limit the recommendation to parsed XML feeds and note that JSON Feed cannot be converted to XML.
| "simple-rss reads feeds and does not generate new ones. To write a parsed feed back out, use to_xml(format: :rss2) or to_xml(format: :atom)." | |
| "simple-rss reads feeds and does not generate new ones. To write a parsed XML feed back out, use to_xml(format: :rss2) or to_xml(format: :atom). Calling to_xml on a JSON Feed raises SimpleRSSError; JSON Feed to XML conversion is not supported." |
Knowledge Base Used: Feed parsing API and XML model
Prompt To Fix With AI
This is a comment left during a code review.
Path: context7.json
Line: 16
Comment:
**JSON Feed guidance suggests unsupported export**
This rule recommends `to_xml` for any parsed feed, but JSON Feed input makes that call raise `SimpleRSSError`. Agents following it may suggest export code that fails. Limit the recommendation to parsed XML feeds and note that JSON Feed cannot be converted to XML.
```suggestion
"simple-rss reads feeds and does not generate new ones. To write a parsed XML feed back out, use to_xml(format: :rss2) or to_xml(format: :atom). Calling to_xml on a JSON Feed raises SimpleRSSError; JSON Feed to XML conversion is not supported."
```
**Knowledge Base Used:** [Feed parsing API and XML model](https://app.greptile.com/craftsmanfounder/-/custom-context/knowledge-base/cardmagic/simple-rss/-/docs/feed-parsing-api.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Fixed in 88bac66 with your suggested wording. Confirmed in lib/simple-rss.rb: to_xml raises SimpleRSSError "JSON Feed to XML conversion is not supported" when the feed is a JSON Feed.
Review feedback on #69. The rule recommended to_xml for any parsed feed, but to_xml raises SimpleRSSError for a JSON Feed (lib/simple-rss.rb and the README both say so). The rule now limits to_xml to parsed XML feeds and states that JSON Feed to XML conversion is not supported.
|
@greptileai Please review the latest commit 88bac66. The to_xml rule is now limited to parsed XML feeds, as you suggested. |
Why
Context7 has no
simple-rsslibrary yet. A search returns only Ruby's standardrsslibrary, so coding agents that use Context7 cannot retrieve this gem's API.What changes
context7.jsonindexes the README and CHANGELOG and leaves outtest/,sig/,.github/,AGENTS.md, andCLAUDE.md. It gives agents six rules taken from the README: installation,parseandfetch, the nil result for 304 Not Modified, the optional Nokogiri dependency ofdiscover,normalized_entries, andto_xml. It also carries theurlandpublic_keythat Context7 reads to verify the maintainer's claim. Thepublic_keyis the maintainer's public account key, which Context7 designs to be committed..github/workflows/context7-refresh.ymlasks Context7 to refresh the index after a push tomasterthat changes the README, CHANGELOG, orcontext7.json. Context7 allows one refresh every 10 days for a library and answerstoo-earlybefore then; that answer ends the job with a notice. Any other non-200 answer fails the job. TheCONTEXT7_API_KEYrepository secret is set.No CHANGELOG entry:
AGENTS.mdsays that tooling edits do not need a release-note bullet.Validation
actionlintpasses, andcontext7.jsonparses.lib/:fetchreturns nil onNet::HTTPNotModified,discoverraisesSimpleRSS::DiscoveryDependencyErrorwithout Nokogiri HTML5 support, andnormalized_entriesandto_xml(format:)exist.