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.
#4420 added about 110 new test cases. Most of them are meaningful and deterministic. The cases below have a title that names a rule, or a part of a rule, that their assertions do not hold: the mutation described stays green.
The domain-spec guard counts a rule as held once a running test's title names it, so each of these makes a rule look held when it is not. Each fix is test-only: add the missing case or assertion, or narrow the title.
| # | Test (path:line) | What is not held | Mutation that stays green | Severity |
|---|---|---|---|---|
| 1 | domains/control/routes.test.ts:40-51, row "another token" (:42) [CTRL-R2] |
The wrong token, 'not-the-token' (13 characters), differs in length from TOKEN ('control-token-for-tests', 23 characters, :23). The check a.length === b.length && timingSafeEqual(a, b) (domains/control/routes.ts:35) therefore short-circuits on length, and the byte comparison is never exercised. |
Replace :35 with return a.length === b.length;. All five control-door cases still pass, yet any 23-character bearer opens /reset-owner and /reseed. Fix: add a same-length wrong-token row. |
MEDIUM |
| 2 | domains/automations/store.delete-run.test.ts:199-200, :216-230, "refuses while a run is still %s, and removes nothing" [AUTO-R15] (describe) |
The fake answers any SELECT status FROM app.automation_runs with [{ status }], so the queued/running/waiting rows change only the error text. The status set (domains/automations/store.ts:2865) is never held. |
Narrow :2865 to ('queued', 'running'). All three rows stay green, while deleting an automation with a run waiting on a question, the spec's own AUTO-R15 example, now succeeds. |
MEDIUM |
| 3 | domains/conversations/send.test.ts:105-117, :884-911, "completes the drafted reply waiting on the conversation" [CONV-R12] |
The fake answers any statement containing FROM app.approvals, so the selection resource_id = … AND status = 'pending' (domains/conversations/draft.ts:194-197) is never held, and neither is reviewed_at_ms. |
Drop that predicate. A send then completes another conversation's draft, or a completed one, and the test stays green. | MEDIUM |
| 4 | domains/two_factor/service.enforcement.test.ts:107-113, "holds the person to the strictest policy among their organizations" [TFA-R1] |
The strict organization is always listed last, and the account has a password, so the exemption merge (core/governance/helpers.ts:19) is not exercised. |
A "last organization wins" merge passes. The same file's :154-169 (TFA-R4) is tracked in #4424. |
MEDIUM |
| 5 | domains/sandbox/routes.test.ts:62-67 (the mock), with the new assertions at :296-304 and :317-323 ([SBX-R2]) and the older one at :146-155 |
requireOrgMember is mocked to always set 'member-org'. The checks that a ?orgId=… named in the request "is ignored" are therefore true by construction. The real middleware uses that orgId (auth/org.ts:48, :76); see #4425 row 4. |
Nothing the production middleware does can fail these checks. | LOW |
| 6 | core/knowledge/crawl_action.redirects.test.ts:205-216, "never requests a page robots.txt disallows, and takes it out of the index" [KNOW-R14] |
retired() (:61-64) matches only the SET status = 'deleted' update. The content purge, purgePageContentIn(tx, domain, url) (core/knowledge/crawl_action.ts:1514), is not asserted. |
Delete :1514. The test stays green while the page's chunks stay indexed. Whether search also filters on the address status was not checked. |
LOW |
| 7 | domains/sandbox/workspace-cleanup.test.ts:81-86, "deletes after 30 days, switched on, unless the organization set otherwise" [SBX-R12] |
The body only snapshots the constant DEFAULT_SANDBOX_WORKSPACES. The fallback that applies it (domains/sandbox/workspace-cleanup.ts:728-733, ?? DEFAULT_SANDBOX_WORKSPACES) is not run. |
Change the fallback at :733. The test stays green. |
LOW |
| 8 | domains/knowledge/service.status-codes.test.ts:271, "spells each code a rule states [KNOW-R7] [KNOW-R8] [KNOW-R9] [KNOW-R10] [KNOW-R12]" |
A spelling-only constant pin carries five rule tags. Each of those rules has behavioural tests today (6–9 tagged titles each in #4420). But if those tests are removed or untagged, this test alone keeps all five rules "held" in the guard's eyes. | Not applicable: the risk is the guard's view, not a mutation. | LOW |
Paths are relative to services/platform/backend/. I ran no tests or mutations. Each "stays green" is reasoned from the code at 464e1d9b; a named check phase can confirm them.
Activity
test(platform): make eight #4420 tests hold the rules they name
test(platform): make eight #4420 tests hold the rules they name