Skip to content

docs(platform): nine statements in the #4420 domain specs disagree with the code, and one Not yet omits two gaps #4425

Closed

Description

@yannickmonney

Found in the post-merge review of #4420 (TALE-947, agent #6, run 2d1106e9), at merge 464e1d9b / head 1948429b. Every file cited below is unchanged on main 8b750caf30.

The specs added by #4420 were read against the code, not against the tests, for a sample of 21 of the 57 domains (about 90 of the 480 rules). The statements below disagree with the code. In each case nothing in the spec, including its Not yet section, says so.

The repo rule since #4420 is that a change to backend domain behaviour moves the spec rule and its test title together. So each item needs a decision, made per item:

  • Code is right: correct the spec. Where a test is tagged, re-title it in the same change.
  • Spec is right: fix the code, with a red-first test.

The two-factor grace defect is tracked separately in #4424.

# Spec statement (path:line) What the code does (path:line) Severity
1 erasure, ERASE-R4 (erasure/spec.md:43-45): "A request that started and did not finish … is run again without a new approval." Not yet (:100): a request that takes too long "is ended with a message and can be retried". The watchdog marks a stuck request failed with ERASURE_WATCHDOG_TIMEOUT_MESSAGE (erasure/service.ts:2011-2012). Retry refuses exactly that receipt with NOT_RETRIABLE, "File a new request instead" (erasure/service.ts:572-580). The user docs agree with the code: "a watchdog timeout may require a new request" (docs/en/platform/admin/governance/data-subject-requests.md:44). MEDIUM
2 changelog, CLOG-R4 (changelog/spec.md:38-41): "When no release can be loaded, the reader gets an error, not an empty list." Page 1 answering 200 returns parseReleasesHtml(html) as is (core/changelog/internal_actions.ts:166-167). A JS-shell, redesigned or proxy-block page parses to []. Then listReleases stops at releases.length === 0 (changelog/service.ts:67), and the route answers 200 { releases: [] } (changelog/routes.ts:21), which reads as "you are up to date". MEDIUM
3 knowledge, KNOW-R9 (knowledge/spec.md:157-159): "There is one exception: when the protection cannot be started for a policy, documents are indexed unmasked". (a) That exception applies in Block mode too: if (scrubber === null) return { kind: 'index', text } (core/knowledge/pii_gate.ts:165-166) never reads the mode. (b) A second fail-open path exists. A scan step error indexes the text unscrubbed in every mode, with one console.warn per document (pii_gate.ts:189-196, "fail-open by design"). The rule names neither. Both fail-open paths sit inside a tagged rule, so a fail-closed decision would also have to break a [KNOW-R9] test. The rule should state both and the Block behaviour, or move them to Not yet as an open question. MEDIUM
4 sandbox, SBX-R3 (sandbox/spec.md:41-42): "The organization is always the one the person is signed in to; one named in the request is ignored." The organization is the one named in the request. requireOrgMember reads c.req.query('orgId') (auth/org.ts:48), checks membership (:56-60) and sets it (:76). The access is still safe, because membership is enforced. The statement is false, though, and the tests that seem to hold it mock the middleware to a fixed organization (see #4426). MEDIUM
5 two_factor, TFA-R1 (two_factor/spec.md:12-15): "When one does [require a second factor], its requirement applies to the account". Every organization's policy is merged field by field, including organizations that require nothing, which default to 7 days (two_factor/service.ts:193-206, core/governance/helpers.ts:17-19). Enforcing org A gives 30 days and non-enforcing org B gives the default 7: the person gets 7. A non-enforcing org with a 0-day grace blocks at once (service.ts:259). The helper's comment says "shortest positive grace wins" (helpers.ts:8-9), but Math.min also takes 0. MEDIUM
6 teams, TEAM-R3 (teams/spec.md:30-33): adding or removing a member, deleting, and the preview are refused with TEAM_FORBIDDEN. Only the preview and the delete answer TEAM_FORBIDDEN (teams/routes.ts:189, :207). Add and remove answer free-text errors: 'Only admins can add team members' (:282) and 'Only admins can remove team members' (:411). The [TEAM-R3] tests for those doors assert only the 403. LOW
7 provisioning, PROVN-R4 (provisioning/spec.md:33-36): provisioning that cannot read the catalog "says so. It does not conclude that there is nothing to add." seedDefaultAutomationPacks returns { provisioned: [], skipped: [] } for both an unreadable catalog (null) and an empty one (provisioning/service.ts:61-63). Only the loader's console.error reports it, even though the loader's own doc calls null "a misconfiguration to surface as a failure". LOW
8 sandbox, SBX-R8 (sandbox/spec.md:106-108): a stopped workspace "takes a slot again when it resumes. At the limit, the next start or resume is refused". A stopped pinned row resumes without the limit check (sandbox/sessions.ts:431, if (row.status === 'stopped' && !row.pinned)). setSessionPinned pins any live row, including a stopped one (sessions.ts:307-317). The exemption may be intended (SBX-R10 says a pinned workspace "can go on holding a slot"), but neither rule states it. LOW
9 legal_holds, HOLD-R3 (legal_holds/spec.md:28): "A release cannot be approved in the first five minutes after it was requested". The wait applies only when a different admin approves. With TALE_LEGAL_HOLD_SINGLE_ADMIN_OK=true the requester can self-approve, and that path skips the wait (legal_holds/service.ts:397-405 against :406-416). The spec never mentions the self-approval switch. LOW
10 conversations, Not yet: the #4420 PR body says it lists three undecided items. conversations/spec.md has one, the expired conversation (:343-351). Two items the PR body describes as listed are absent, and both are real in code. (a) A member-role person can be made assignee: assertAssignableMember refuses only null or disabled (conversations/service.ts:1044), while reply, close and mark-read refuse that role (CONV-R3). (b) The bulk send dialog says "This action can't be undone." (services/platform/messages/en.yml:1780-1781), although every reply is queued with the 10-second undo window (conversations/send.ts:291). LOW

All links in the 57 specs resolve; this issue is about statements only.

I ran no tests. Each row comes from reading the cited lines at 464e1d9b.

Activity

  1. changed the title [-]docs(platform): ten statements in the #4420 domain specs disagree with the code[/-] [+]docs(platform): nine statements in the #4420 domain specs disagree with the code, and one Not yet omits two gaps[/+] on Oct 6, 2026
  2. added
    agent-ready
    docs
    on Oct 29, 2026
  3. tale-code-bot commented on Oct 31, 2026

    @tale-code-bot
    Collaborator

    Where each row stands. From the Coder on task TALE-73, where triage decided to split this issue. The spec corrections are done there, and the code parts are filed as issues of their own. Checked on train at 6d659ee6e1bf1d30612287b1aad039c2583a6c3e.

    # Rule Where it goes
    1 ERASE-R4 Spec corrected. A request the watchdog stopped is refused on retry (NOT_RETRIABLE), and a new request is filed instead. New [ERASE-R4] test.
    2 CLOG-R4 Already settled, so dropped. 86b31e3cd313d14987c631e38d2a9ce9f163566a makes a page 1 with no release it can read throw (services/platform/backend/core/changelog/internal_actions.ts:173-178), so the reader gets an error, not an empty list.
    3 KNOW-R9 Filed as #5233 (security). Block must fail closed on both paths.
    4 SBX-R3 Spec corrected. The organization is the one the person is working in, and only an active member gets in (ORG_FORBIDDEN). The test that carries the rule is re-titled.
    5 TFA-R1 Filed as #5234. #4424 tracked the sliding grace deadline of TFA-R4, which #4437 (3097c95df9da93ec4d457600b499b25ed641103f) fixed and closed. The merge across organizations is still there.
    6 TEAM-R3 Filed as #5232. The code is wrong and the spec is right.
    7 PROVN-R4 Already settled, so dropped. 004953f62f4335b9d10238ed08586b916e6fbfc7 (#4988) removed seedDefaultAutomationPacks and the rule. A new organization starts with no automation (PROVN-R9, PROVN-R10).
    8 SBX-R8 Spec corrected. A pinned workspace resumes even at the limit. New test.
    9 HOLD-R3 Spec corrected. The five-minute wait binds an approval by another admin. A new rule, HOLD-R4, states self-approval and TALE_LEGAL_HOLD_SINGLE_ADMIN_OK. Two new tests.
    10 conversations, Not yet Both missing items added as undecided questions: (a) an assignee with the member role, (b) the bulk send's "This action can't be undone."

    The spec corrections (rows 1, 4, 8, 9 and 10) are on the branch docs/spec-statements-match-code. They reach main with the merge train, and that commit closes this issue.

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

    agent-readydocs

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions