feat(notifications): expose delivery and ACK evidence - #86
feat(notifications): expose delivery and ACK evidence#86chuanxu742-glitch wants to merge 1 commit into
Conversation
|
Warning Review limit reachedNext included review available in 25 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Warning Your free Security trial is over. An organization admin can activate billing to continue. 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. Comment |
|
✅ Health of changed files: 4.1 → 4.9 (+0.8) 📋 At a glance ✅ Health gate: passed 📌 Before you merge
🔎 More signals (4)🗺️ Change map flowchart LR
subgraph PR ["Changed in this PR (2 with dependents)"]
f_frontend_lib_api_endpoints_ts[".../api/endpoints.ts 🔥"]:::changed
f_frontend_lib_api_hooks_ts[".../api/hooks.ts 🔥"]:::changed
end
f_backend_api_v1_workflows_py[".../v1/workflows.py"]
f_frontend_lib_api_endpoints_ts --> f_backend_api_v1_workflows_py
f_backend_models___init___py["backend/models/__init__.py"]
f_frontend_lib_api_endpoints_ts --> f_backend_models___init___py
f_backend_schemas_workflow_py["backend/schemas/workflow.py"]
f_frontend_lib_api_endpoints_ts --> f_backend_schemas_workflow_py
f_backend_workflow_capability_projection_py["backend/workflow/capability_projection.py"]
f_frontend_lib_api_endpoints_ts --> f_backend_workflow_capability_projection_py
f_frontend_lib_api_hooks_ts --> f_backend_api_v1_workflows_py
f_frontend_lib_api_hooks_ts --> f_backend_models___init___py
f_frontend_lib_api_hooks_ts --> f_backend_schemas_workflow_py
f_frontend_lib_api_hooks_ts --> f_backend_workflow_capability_projection_py
more(["+89 more dependents"])
PR --> more
w_frontend_lib_api_types_ts(["⚠️ .../api/types.ts changed together 13×, not in PR"]):::warn
f_frontend_lib_api_endpoints_ts -.- w_frontend_lib_api_types_ts
w_frontend_lib_navigation_ts(["⚠️ frontend/lib/navigation.ts changed together 10×, not in PR"]):::warn
f_frontend_lib_api_hooks_ts -.- w_frontend_lib_navigation_ts
classDef changed fill:#dbeafe,stroke:#1d4ed8,color:#1e3a5f
classDef warn fill:#fef3c7,stroke:#b45309,color:#78350f
classDef guard fill:#dcfce7,stroke:#15803d,color:#14532d
Solid arrows: code that imports the changed files (93 direct dependents, from the last indexed snapshot). Dashed: history/tests. 🔥 Hotspots touched (3)
🔗 Hidden coupling (2 files)
💀 Dead code (10 findings)
7 more
👀 Suggested reviewers @2233admin 📊 See the full report for this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47c3cdc015
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| queryFn: ({ pageParam }) => api.listNotificationRules({ ...params, page: pageParam }), | ||
| getNextPageParam: (lastPage) => { | ||
| const meta = lastPage.meta | ||
| return meta && meta.page < meta.pages ? meta.page + 1 : undefined |
There was a problem hiding this comment.
Add a stable order before paging notification rules
When more than 50 rules exist, this fetches successive offset pages from list_rules, but the backend query in backend/api/v1/notifications.py:40-42 applies OFFSET/LIMIT without any ORDER BY. SQL does not guarantee a consistent row order between requests, so loading the next page can duplicate already displayed rules and permanently omit others; the client-side deduplication only hides duplicates and cannot recover skipped rules. Add a deterministic backend ordering (ideally with a unique tie-breaker) before relying on this infinite query.
Useful? React with 👍 / 👎.
Closes #84
Product outcome
Operability and data integrity
not_requiredACK values according to transport state while allowing a real downstream ACK to override a transport-side timeout/failure inference.Verification
node --experimental-strip-types --test scripts/notification-delivery-status.test.mjs scripts/check-notification-evidence-regressions.mjs— 14/14 passednode node_modules/typescript/bin/tsc --noEmit— passednode node_modules/next/dist/bin/next build— passed, 42/42 pages generatedgit diff --check— passed