Repository navigation
Commit 8fdf25a
test(dogfood): take the admin search terms from rows the stock admin is served (#33449)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DXuamRUC67fx2TTYrFfyuSH)_
Fixes #33429
Clause-②: no — a test-only change in the private `@objectstack/dogfood`
package; nothing publishes.
Metadata-protocol: none
## Maintainer quick read
- What changes: one dogfood test now picks its search words from rows
the admin can actually see, so it stops failing at random in the merge
queue.
- Why: it ejected #33364 and #33409 from the queue. It is not a product
bug. Sometimes the word it picked came from an activity row about an
internal object (`sys_oauth_resource`) that no one is allowed to read
through the data API, so the admin's search correctly found nothing.
- Risk and rollback: test only. Rollback is a revert.
- Needed from you: nothing.
## Cause (measured locally on the stock showcase boot)
- The test took its term from `ql.find(table, { limit: 1 })` under the
system context, with no sort. That row varied between boots: four boots
gave `showcase_invoice_line`, `showcase_expense_line`, `showcase_task`
and `sys_oauth_resource`.
- The boot writes one `sys_activity` row about `sys_oauth_resource` (the
MCP resource registration, no actor). `GET /data/sys_oauth_resource`
answers 404 `OBJECT_API_DISABLED`, and the activity read gate serves a
row only to a reader who can read its parent, so the stock admin is
served none of that object's activity rows.
- A probe over every `object_name` the boot wrote: the admin's `$search`
and its `$filter` on the name both answer more than 0 rows for every
name except `sys_oauth_resource`, where both answer 0. When that row
came first, line 96 saw 0. Both victims failed on that assertion, not on
a timeout.
No wait or retry is added.
## What changes
- `packages/qa/dogfood/test/audit-log-admin-search.dogfood.test.ts`:
each term is the `object_name` of the newest row the stock admin reads
through the same data door (`$orderby=created_at desc` on
`sys_audit_log`, `timestamp desc` on `sys_activity`, `$top=1`). The
armed control and the comment say so.
## Verification
- The changed file, run 3 times on a built tree: 3/3 passed each run.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset. (Nothing
publishes here.)
- [x] 6. `packages/spec` is not touched.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
Co-authored-by: Claude <noreply@anthropic.com>1 parent b392ff7 commit 8fdf25a
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
47 | 54 | | |
48 | 55 | | |
49 | 56 | | |
| |||
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
| 71 | + | |
64 | 72 | | |
65 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
66 | 76 | | |
67 | 77 | | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
71 | | - | |
| 81 | + | |
72 | 82 | | |
73 | 83 | | |
74 | 84 | | |
| |||
0 commit comments