Skip to content

Let the 12h curation window through the gateway - #99

Merged
feruzm merged 1 commit into
mainfrom
feature/curation-window-12h
Sep 7, 2026
Merged

Let the 12h curation window through the gateway#99
feruzm merged 1 commit into
mainfrom
feature/curation-window-12h

Conversation

@feruzm

@feruzm feruzm commented Sep 7, 2026

Copy link
Copy Markdown
Member

The desk grows a window=12h band (posts created in the last 12 hours). The public feed query builder and the roster-feed body allowlist both key on CurationDeskQuery.Windows, so without the entry the gateway would drop the value silently and answer with all windows.

  • Windows gains 12h.
  • One assertion each on the public feed query and the roster-feed payload; mutation-checked (removing the entry fails both).

Companion to the esync 12h window PR; the vision-web option lands after both.

Summary by CodeRabbit

  • New Features
    • Added support for the 12h feed time window in public-feed and roster-feed queries.
    • The 12h value is now preserved in normalized URLs and forwarded in roster-feed responses.
  • Tests
    • Added coverage validating acceptance, normalization, and forwarding of the 12h window value.

The desk grows a window=12h band (posts created in the last 12 hours) for
curators who work one shift a day. The public feed query builder and the
roster-feed body allowlist both key on this set, so without the entry the
gateway would drop the value silently and answer with all windows.
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can copy the agent prompt from any finding and feed it to your IDE agent

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Allow 12-hour curation windows through the gateway

✨ Enhancement 🧪 Tests 🕐 Less than 10 minutes

Grey Divider

AI Description

• Allows window=12h through shared curation feed validation.
• Adds regression coverage preventing the gateway from silently dropping the new window.
Diagram

graph TD
  Client["Desk Client"] -->|feed request| Gateway["Curation Gateway"] -->|validates| Rules["Window Allowlist"] -->|permits 12h| Public["Public Query"] -->|forwards| Backend["Curation Backend"]
  Rules -->|permits 12h| Roster["Roster Payload"] -->|forwards| Backend
  Rules -->|permits 12h| Lane["Lane Metadata"] -->|forwards| Backend
Loading
High-Level Assessment

Extending the existing shared CurationDeskQuery.Windows allowlist is the optimal approach because public queries, roster payloads, and lane metadata already depend on it. Separate route-specific validation would duplicate policy and increase drift risk.

Files changed (3) +5 / -1

Enhancement (1) +1 / -1
PrivateApi.CurationDesk.csAdd 12h to the shared curation window allowlist +1/-1

Add 12h to the shared curation window allowlist

• Adds '12h' to 'CurationDeskQuery.Windows', allowing the value through public feed queries and JSON payload normalization that shares this set.

dotnet/EcencyApi/Handlers/PrivateApi.CurationDesk.cs

Tests (2) +4 / -0
CurationDeskPayloadTests.csVerify roster payloads retain the 12-hour window +3/-0

Verify roster payloads retain the 12-hour window

• Adds a regression assertion confirming roster-feed normalization preserves 'window=12h' instead of silently removing it.

dotnet/EcencyApi.Tests/CurationDeskPayloadTests.cs

CurationDeskQueryTests.csVerify public queries retain the 12-hour window +1/-0

Verify public queries retain the 12-hour window

• Extends enum allowlist coverage to confirm public feed URLs emit 'window=12h'.

dotnet/EcencyApi.Tests/CurationDeskQueryTests.cs

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 7c37924a-2d3d-420c-a436-2f304d3f90e4

📥 Commits

Reviewing files that changed from the base of the PR and between 6e65191 and 99aa963.

📒 Files selected for processing (3)
  • dotnet/EcencyApi.Tests/CurationDeskPayloadTests.cs
  • dotnet/EcencyApi.Tests/CurationDeskQueryTests.cs
  • dotnet/EcencyApi/Handlers/PrivateApi.CurationDesk.cs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The curation desk now accepts the 12h feed window. Query normalization preserves the value, and roster-feed payload validation forwards it unchanged.

Changes

Curation desk window support

Layer / File(s) Summary
Allow and validate the 12h window
dotnet/EcencyApi/Handlers/PrivateApi.CurationDesk.cs, dotnet/EcencyApi.Tests/CurationDeskQueryTests.cs, dotnet/EcencyApi.Tests/CurationDeskPayloadTests.cs
CurationDeskQuery.Windows accepts 12h. Tests verify URL preservation and roster-feed payload forwarding.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 99aa9

The gateway now preserves the 12-hour curation window for public feeds and roster-feed payloads, with assertions covering both paths. No current merge-blocking risk remains.

Poem

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: allowing the 12-hour curation window through the gateway.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/curation-window-12h

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

Comment @coderabbitai help to get the list of available commands.

@feruzm
feruzm merged commit f650fbb into main Sep 7, 2026
4 checks passed
@feruzm
feruzm deleted the feature/curation-window-12h branch September 7, 2026 16:45
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