chore: OSS hygiene + parser/timezone polish - #28
Merged
Conversation
OSS hygiene / contributor-friendliness: - SECURITY.md with a private GitHub vulnerability-reporting channel, emphasizing HTML-sanitizer bypasses - .github issue forms (bug_report, feature_request, config) + PR template - Credo added (dev/test dep, .credo.exs, `mix precommit` step, and a CI `lint` job running `mix credo --strict`) - CI drift check: regenerate datetime_parser.ex from its .ex.exs source and fail if the committed file differs (timestamp header ignored) Minor polish: - Harden rss_body?/1: detect the feed type from the first real (root) element instead of any substring, so a literal "<rss" inside an Atom entry's content no longer misfires (with a regression test) - Document the NaiveDateTime timezone-loss ordering trade-off in README and Exoplanet.Post docs (offsets discarded; cross-feed order skew up to ~24h) CODE_OF_CONDUCT.md is intentionally not included yet (follow-up). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Contributor-friendliness and a couple of correctness/clarity polishes, split out from the larger checklist. Code of Conduct is intentionally left out of this PR and will follow once the rest is reviewed.
OSS hygiene
SECURITY.md— private reporting via GitHub vulnerability advisories, with a section calling out HTML-sanitizer bypasses as in-scope..github/templates — issue forms (bug_report,feature_request,config.yml) and aPULL_REQUEST_TEMPLATE.md. The issueconfig.ymlroutes security reports to private advisories and questions to Discussions..credo.exs, wired intomix precommitand a new CIlintjob runningmix credo --strict. Fixed the 3 issues it surfaced (twoparse_rss/parse_atomnesting refactors via extracted helpers; one test string switched to a sigil) — all behavior-preserving.lintjob regenerateslib/exoplanet/datetime_parser.exfrom its.ex.exssource and fails if the committed file differs, so the generated file can't silently drift. The volatile# Generated attimestamp header is ignored viagit diff -I.Minor polish
rss_body?/1hardening — feed-type detection now inspects only the first real (root) element instead of scanning the whole body for<rss/<rdf:RDF. An Atom feed that merely mentions those strings inside an entry's content is no longer misparsed as RSS. Added a regression test.DateTimeParserandNaiveDateTime.from_iso8601/1) discard UTC offsets, so cross-feed ordering can be skewed by up to ~24h. Now stated in the README andExoplanet.Postdocs (and referenced at the sort site) rather than living only in a code comment.Notes for the reviewer
lintCI job and the drift check run once on Elixir 1.18 / OTP 27 (version-independent), separate from the test matrix.config.ymllinks to GitHub Discussions; enable Discussions on the repo or I can repoint that link if you'd prefer.Test plan
mix precommitgreen (format,credo --strict, docs, 138 tests, 0 failures)<rss/<rdf:RDFin content parses as Atom🤖 Generated with Claude Code