Repository navigation
Description
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
[-]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[/+]tale-code-bot commentedon Oct 31, 2026
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
trainat6d659ee6e1bf1d30612287b1aad039c2583a6c3e.ERASE-R4NOT_RETRIABLE), and a new request is filed instead. New[ERASE-R4]test.CLOG-R486b31e3cd313d14987c631e38d2a9ce9f163566amakes 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.KNOW-R9security). Block must fail closed on both paths.SBX-R3ORG_FORBIDDEN). The test that carries the rule is re-titled.TFA-R1TFA-R4, which #4437 (3097c95df9da93ec4d457600b499b25ed641103f) fixed and closed. The merge across organizations is still there.TEAM-R3PROVN-R4004953f62f4335b9d10238ed08586b916e6fbfc7(#4988) removedseedDefaultAutomationPacksand the rule. A new organization starts with no automation (PROVN-R9,PROVN-R10).SBX-R8HOLD-R3HOLD-R4, states self-approval andTALE_LEGAL_HOLD_SINGLE_ADMIN_OK. Two new tests.The spec corrections (rows 1, 4, 8, 9 and 10) are on the branch
docs/spec-statements-match-code. They reachmainwith the merge train, and that commit closes this issue.docs(platform): make five domain spec statements match the code
fix(platform): answer TEAM_FORBIDDEN to a non-admin's member change
fix(platform): answer TEAM_FORBIDDEN to a non-admin's member change
fix(platform): answer TEAM_FORBIDDEN to a non-admin's member change