Content writes have no default item cap, no hook timeout, and an idempotency lease that is never renewed

Đang mở
#3,307 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
backend, databases, testing

Hướng nghiên cứu

Start with the cited files under src/FluentCMS.Core/: Schema/FieldTypes/FieldLengths.cs, Content/Validation/DeclarativeValidator.cs, Content/Hooks/HookPipeline.cs, and Idempotency/IdempotencyStore.cs. Read the related spec and trace how field limits, hook execution, and idempotency leases are handled; then find the existing tests for each area. Done means all three acceptance cases pass, with tests covering them.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area:content type:bug

Problem

  1. Multiple-value fields have no default item cap. Schema/FieldTypes/FieldLengths.cs:18-19 gives them no default and Content/Validation/DeclarativeValidator.cs:106 checks only a declared maximum. Over HTTP the 2 MiB body is the bound; SDK calls and imports have none.
  2. A hook can hold the write transaction without limit. Hooks run inside it by design (spec line 684), but there is no hook timeout (Content/Hooks/HookPipeline.cs:98-108), and SQLite takes the write lock at begin (Content/ContentService.cs:546).
  3. A write can run twice under one idempotency key. The claim itself is safe (Idempotency/IdempotencyStore.cs:66-95,125-133), but the 5-minute lease is never renewed (Idempotency/IdempotencyOptions.cs:17). A handler that runs longer, or a retry after a client abort (Api/Common/IdempotentRequests.cs:44-49), can take the key over while the first run is still working.

Paths are under src/FluentCMS.Core/.

Proposal

  • A default cap of 1,000 items for multiple and blocks fields; a declared maximum overrides it.
  • A configurable hook timeout and a warning that names a slow hook.
  • Renew the lease while the handler runs.

Acceptance

  • A value with more than 1,000 items is refused unless the field declares a higher maximum
  • A hook over the timeout fails the write with a problem naming the hook
  • A handler that runs longer than the lease is not run a second time under its key
  • Tests for each

Found in the code review of 17 Nov 2026.

Ngôn ngữ chính
C#
Star
567
Fork
107
Merge trung bình
1 giờ 19 phút
Pull request đã merge (30 ngày)
353

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fluentcms/FluentCMS

Tất cả issue của fluentcms/FluentCMS

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.