Fix Atom relation links and add release history - #63
Conversation
Expose documented relation accessors alongside legacy keys. Extract relation URLs from direct child links without borrowing neighboring attributes or returning nested media markup. Preserve legacy link selection and document the additional hash and JSON keys. Backfill the changelog from tagged releases and version-changing commits through the first Git import. Include it in the gem and its metadata. Move shared guidance to AGENTS.md, import it from CLAUDE.md, and require changelog updates with behavior changes and releases. Closes #57
Greptile SummaryThis PR corrects Atom relation-link extraction and exposes documented underscore aliases while retaining legacy keys. It also adds release history and consolidates repository guidance.
Confidence Score: 5/5The PR appears safe to merge; no remaining actionable correctness, security, or repository-rule violations were identified. The current implementation preserves direct-child boundaries, relation aliases, legacy keys, and serialization behavior. Both previous threads are resolved, and the follow-up removes the redundant guard while demonstrating that quoted URL-ending slashes remain inside their closing quotes and therefore do not alter nesting depth. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Entry content] --> B[Tokenize XML-like markup]
B --> C{Opening or closing element?}
C -->|Closing| D[Decrease nesting depth]
C -->|Opening| E{Direct child link?}
E -->|Yes| F[Parse rel and href attributes]
E -->|No| G[Track nesting depth]
F --> H{Requested relation matches?}
H -->|Yes| I[Store underscore and legacy keys]
H -->|No| G
Reviews (2): Last reviewed commit: "refactor: simplify relation token guards" | Re-trigger Greptile |
Use the attribute capture to skip non-element tokens with one guard. Cover paired elements whose quoted URLs end in a slash. The case already preserves nesting because the captured closing quote follows the slash.
|
@greptileai Please review the current head, The redundant token guard has been removed. The quoted-trailing-slash example was checked before changing the guard: Current-head CI passes on Ruby 3.2, 3.3, 3.4, and 4.0, with lint and type checking also passing. Please reassess the changes and report any remaining actionable findings and an updated confidence score. |
Atom relation URLs were available only under legacy keys such as
:"link+alternate", leaving the documentedlink_alternateaccessor empty. The extractor also losthrefattributes placed beforereland could return nested media markup as a URL.Add the documented method/hash aliases while retaining the legacy keys. Read relation-specific
hrefvalues from direct child links in the current entry, handling attribute order, whitespace, quote styles, and paired or self-closing elements. Keep nested metadata, content, comments, and CDATA from supplying another relation's URL. Preserve relative URLs, existing case-insensitive matching, custom relation tags, anditem.linkbehavior. Document both keys in hash/JSON serialization.Add
CHANGELOG.mdfollowing solid-objects-ruby's dated, user-facing release notes. Backfill version changes through the first Git import in 2006, cite their source boundaries, and distinguish source-history dates and intermediate versions from verified publications. Record #57 and #58 underUnreleased, include the changelog in the gem, and expose its RubyGems metadata URL. Move project guidance toAGENTS.md, add changelog maintenance and release rules, and makeCLAUDE.mdcontain only@AGENTS.md.Validation: the documented-accessor regression failed with an expected article URL and actual
nilbefore the fix. Eleven regression tests cover accessors, legacy keys, extraction boundaries, serialization, and a reduced fixture based on the archived fork feed; all three entries in the complete archived fixture also return their article URLs through both keys. The full suite passes on Ruby 3.4.8 (123 tests, 275 assertions; 3 existing network-test omissions), along with RuboCop, RBS validation, and Steep. Built the gem and verified changelog inclusion and metadata; checked all 16 historical Git references and the exactCLAUDE.mdimport.GitHub CI passes on Ruby 3.2, 3.3, 3.4, and 4.0, including lint and type checking. Hound's style comments conflict with the repository's
.rubocop.yml: double quotes are required; the configured line, method, ABC, and cyclomatic limits permit these changes. Those comments were resolved using the repository configuration and passing RuboCop result.Review follow-up: simplified token filtering to one guard. The reported quoted-trailing-slash nesting case already passed: the captured attribute text ends in its closing quote, so a URL's slash cannot be mistaken for a self-closing element. Extended the nested-source/content test with both quote styles and verified it passed before changing the guard.
Closes #57.