Skip to content

fix(feeds): preserve fractional media rates and durations - #2382

Open
Aschenbath wants to merge 1 commit into
fb55:masterfrom
Aschenbath:fix/fractional-media-attributes-20261115
Open

Aschenbath wants to merge 1 commit into
fb55:masterfrom
Aschenbath:fix/fractional-media-attributes-20261115

Conversation

@Aschenbath

@Aschenbath Aschenbath commented Nov 15, 2026 •

Copy link
Copy Markdown

Media RSS numeric attributes currently use parseInt, so samplingrate="44.1" becomes 44 and framerate="29.97" becomes 29. The Media RSS specification includes a 44.1 kHz sampling-rate example.

Parse bitrate, frame rate, sampling rate and duration as floating-point numbers. File sizes, channel counts and image dimensions retain integer parsing. Add RSS and Atom regressions for fractional values, zero values and omitted attributes.

Validation on Windows with Node 24.22.0:

  • New feed tests against the original source: 2 failed, 7 passed; both failures demonstrate truncation of the four fractional attributes.
  • npm test: 96 tests passed, plus ESLint, TypeScript and Biome checks. Biome reports two existing configuration notices.
  • npm run build and git diff --check pass.

Prepared and validated with OpenAI Codex assistance.

View guided diff

Summary by CodeRabbit

  • Bug Fixes
    • RSS and Atom media metadata now preserves fractional and zero values for bitrate, frame rate, sampling rate, and duration. Other numeric media attributes continue to be parsed as integers, and missing values remain unset.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T10:50:52.978777Z 3ca239e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The media parser now preserves fractional values for bitrate, framerate, sampling rate, and duration. Integer-valued media attributes continue to use integer parsing. RSS and Atom tests cover fractional and zero values, integer attributes, and missing attributes.

Changes: Media attribute parsing

Layer / File(s) Summary
Parse and verify media numeric attributes
src/feeds.ts, src/feeds.spec.ts
The parser separates integer-valued attributes from floating-point attributes and uses Number.parseFloat for the latter. RSS and Atom tests check fractional and zero values, integer attributes, and absent numeric attributes.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: fb55

Merge Risk: Minimal · up to 3ca23

Media RSS bitrate, frame rate, sampling rate, and duration values now keep their fractional parts instead of being truncated. No outstanding merge risk was found, and the change is covered by new feed tests.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title states the main change: Media RSS/Atom numeric attributes for bitrate, framerate, sampling rate, and duration are now parsed as floating-point values instead of being truncated to integers. …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: Media RSS/Atom numeric attributes for bitrate, framerate, sampling rate, and duration are now parsed as floating-point values instead of being truncated to integers. The changeset (src/feeds.ts parsing split, and src/feeds.spec.ts regression tests for fractional and zero values) matches this title. The title uses the conventional commit form and is specific enough for a teammate scanning history.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the feed at dawn,
Fractions pass where bits had gone.
RSS and Atom show each value,
Zero stays; decimals do too.
The rabbit hops, its parsing done.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: b1a45af0-424f-4bee-a902-0e343a3c0800
Commits

Reviewing files that changed from the base of the PR and between 67f7eb2 and 3ca239e.

Files selected for processing: 2

  • src/feeds.spec.ts
  • src/feeds.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

View guided diff | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Preserves fractional media rates and durations in RSS and Atom feeds.

  • RSS and Atom media records keep fractional rates and durations.

Reviews (1) · Last reviewed commit: "Preserve fractional Media RSS numeric at..." · Reviewed by Greptile

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant