Skip to content

hotcrm: carry the wall-clock unit of the case SLA matrix in identifiers and one test, collapse the four prose warnings to one (app half of objectstack#13801, mechanism B) #14482

Description

@claude

Part of #13801 — the reference-app half of the mechanism ruled on that card (comment: the in-seat ruling by the domain:spec seat, session session_01GDA48PuRFrHyRfdkBz8m21). Filed here with repo:hotcrm because objectstack-ai/hotcrm is not writable from this seat (REST 403); the measurement below was taken from a read-only clone at hotcrm a6be39a3.

Reader: the repo:hotcrm execution seat, at its next selection pass (plain pm:queue candidate for that seat; no domain:* — single-lane repo).

Ruling of record

Maintainer 2026-08-31 (director summon #7, decision batch #18, verbatim 「其他同意」): "this number is wall-clock hours" must be part of the declaration, not ambient prose — the A-half of #13655; ⛔ the business-hours capability stays frozen (the B-half). Mechanism B was ruled on #13801 after measurement: the four hotcrm sites are code (a hook-body literal objectstack build lowers to body.source, a module constant, two comments), unreachable by any spec schema, so the app carries the clock in its own identifiers and its own test.

Measured on hotcrm a6be39a3

  • The SLA matrix is a plain TS object literal inside the Hook handler (case.hook.ts:179-184), mirrored by a module constant (_case-sla.ts:89-95) imported only by seeds and tests; the field site is a comment on Field.datetime (case.object.ts:228-237); the hook module header repeats the warning. Four dev-prose warnings, plus one legitimate user-doc paragraph.
  • test/case-sla-matrix.test.ts:271-288 pins the prose in two of them by regex (CALENDAR HOURS and business-hours calendar in _case-sla.ts AND case.hook.ts) — i.e. the test currently enforces at least two prose copies, the opposite of the collapse-to-one acceptance. :263-269 asserts the elapsed-ms magnitude (168 h within ±60 s), not the clock over a weekend.

Work

  1. Collapse the four prose sites to one — the _case-sla.ts module header — and delete the other three copies.
  2. Carry the clock in identifiers, module-private, no published metadata renamed: e.g. CASE_SLA_CALENDAR_HOURS (the constant), caseSlaCalendarHours / inline slaCalendarHours (the hook-body literal and its use); one seed import and one test import follow the rename.
  3. Rewrite test/case-sla-matrix.test.ts:262-288: replace the two-file prose regex with (a) a fixed-clock assertion (vi.setSystemTime on a Friday 17:00; the handler reads Date.now()) proving a 4 h deadline lands Friday 21:00 and a 168 h deadline spans the weekend — wall-clock, not business hours — and (b) the identifier check.
  4. Put "calendar hours" into the user-visible sla_due_date field description (the tooltip/help text on the Field.datetime), the one operator-facing surface.

Acceptance (executable)

  • grep -rn "CALENDAR HOURS\|business-hours calendar" src/ in hotcrm returns exactly one dev-prose site (the _case-sla.ts header) plus the user-doc paragraph.
  • test/case-sla-matrix.test.ts passes with the fixed-clock Friday assertions and no prose regex; the elapsed-ms magnitude assertion is kept.
  • No published app metadata key renamed; objectstack build output unchanged except the field description.

Out of scope

Refs: #13801 (ruling + phase-1 measurement, comment 5506949302) · #13655 (the decision record) · objectstack-ai/hotcrm#1184 (where the prose warnings live).


Generated by Claude Code

Activity

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

    pm:queuerepo:hotcrmSeam card: cross-repo ordering with hotcrm is the substance (pure hotcrm fixes live in hotcrm)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions