Skip to content

Work calendars: add test cells for four organization rules that hold by reading only #35800

Closed as not planned

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb

Area: data-1 · follow-up of #35355 (PR #35642 contract review 7033477356, N8)

维护者速读

  • 问题: 工作日历的组织隔离规则里,有四种情况目前是靠读代码确认成立的,没有自动化测试覆盖。
  • 要做: 为这四种情况各补一条测试,让以后的改动一旦破坏它们就会报错。
  • 不做会怎样: 现在行为是对的;但以后有人改动相关代码时,可能悄悄把节假日关联到别的组织的日历,导致截止时间算错而无人察觉。
  • 你要做的: 无需决定,按普通改动走。

What

#35642 pins the sys_work_calendar / sys_work_calendar_exception organization rules under isolated with system writers and members. The contract review confirmed four more legs by reading, with no cell:

  1. The exception→calendar rule (a calendar of another organization is refused) under the group posture, with the other organization in the caller's accessible set.
  2. A create with no organization outside single (the hooks cannot read, so the create is refused).
  3. The import door with an exception row naming a calendar of another organization: that row is refused alone, and the rest of the batch lands.
  4. An exception update that carries both a new organization_id and calendar: refused on the organization rule, with zero reads. The read recorder today counts one-default reads only, so it needs to count the calendar read too.

Done when

Each of the four legs has a cell in the calendar rest test file (or the objectql unit file for leg 4). Each cell asserts the 400 VALIDATION_FAILED envelope and its reason, and has a CONTROL where the rule should not fire. Ablating each rule turns its cell red.

Grade: area:data · Test coverage · reach: maintainers of the calendar hooks · evidence: read (contract review 7033477356 N8) → p2.

Activity

  1. added
    priority:p2
    domain:server
    on Nov 20, 2026
  2. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    2026-11-20T08:49Z · Moved to the weekly data sweep #35765 as a row (maintainer-approved sweep cards, 「同意」; rule row 6 on #35760). This card's ask — four test cells pinning the work-calendar organization rules that hold today only by reading — is small and low-risk (size S); one PR ships it with the week's other data rows. The body here stays the detail.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:datadomain:serverpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions