Repository navigation
fix(kitchen-sink): re-key the hired-seat visitor test to the kitchen-sink org (FIX-1563) - #2191
Conversation
…-sink org (FIX-1563) The test landed with `acme:tok-acme` as its admin credential. The app now refuses any token that does not name `kitchen-sink`, so the admin flow ran without its resolver and both admin-seat cases failed on main. The test now boots the app's real `fsdev.config.ts`, as named-org.test.ts does: the real host resolver, registrar and admin flow, with the token bound to `kitchen-sink`. The in-app hire goes through mara's own `hire` tool rather than a hand-built registration. Both config-booting files get a 30s test timeout. A cold import of the app takes about 4.8s alone, and two of them in parallel workers outran vitest's 5s default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ANuyMVi3YS653fcghb9gtB
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_5c9c2898-d920-44b9-b92e-fe02bf72acc6) |
jhoffner
left a comment
There was a problem hiding this comment.
Second-look / improve-codebase-architecture pass on this PR (automated).
The fix itself looks sound: it re-keys the test to boot the app's real fsdev.config.ts the same way named-org.test.ts already does, which is the right level of fidelity for a production-wiring bug (a hand-built minimal boot is exactly what let the original regression through). The red/green evidence in the description is convincing and I found no correctness issue with the approach.
Left one finding below: this PR is the moment the real-app-boot mock/cleanup scaffolding (and a settle-poll act helper already duplicated once in hired-seat-auth.test.ts) became duplicated a second time across test files, which is a concrete, in-scope extraction opportunity rather than a drive-by refactor — non-blocking, for a follow-up agent to weigh.
Generated by Claude Code
…chen-sink tokens (FIX-1563) #2184 (FIX-1552) merged catalog cases written against the pre-#2159 acme/bravo constants, which #2159 removed, so main fails kitchen-sink typecheck. The operator's leg now lists with the kitchen-sink admin token; the other-org leg uses the token whose entry was refused at boot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ANuyMVi3YS653fcghb9gtB
|
Typecheck & Test was red on 4beaeb7, and the cause is on This PR's job is to turn
Generated by Claude Code |
main is red in kitchen-sink's hired-seat tests; #2191 fixes them. Ported here so this PR's CI can go green. It no-ops once #2191 merges. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V5TdMqMDvZFfm8UyokY5dh
…n base Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018e4MkWPYX62KRow9TSn75D
…'s CI runs green main is red on kitchen-sink typecheck and test after FIX-1563's tests met the named-org change. #2191 is the fix; this carries the same three files and no-ops once it lands. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HjqxvkwpzxMZtZgtK7EsRt
…n base Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018e4MkWPYX62KRow9TSn75D
jhoffner
left a comment
There was a problem hiding this comment.
Architect coherence: merge-ready.
Right fix for FIX-1563: exercise visitor vs admin hire on the real kitchen-sink org/resolver/registrar, not an acme token #2159 refuses. ACME/BRAVO cleanup restores typecheck. Prefer this first among the open set so other PRs aren’t judged against main’s known red.
Not owner approval / not the merge gate.
— FSD Architect
Ported verbatim from #2191 (cb80cdf): hired-seat-auth.test.ts and hired-seat-visitor-auth.test.ts referenced ACME/BRAVO, which main's FIX-1552/FIX-1563 merge left undefined, so kitchen-sink typecheck is red on main too. No-op once #2191 merges. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VZYLbMRNDkNp68tSBgftDN
The problem
main's kitchen-sink tests fail because #2169 merged before its re-key. #2169 added
test/hired-seat-visitor-auth.test.tswith anacme:tok-acmeadmin token. #2159 had already merged, and it makes the app accept only tokens bound tokitchen-sink. So the test's token is refused at boot, and on main the suite ends2 failed | 154 passed (156).What this does
It rewrites that one test so it runs on the wiring production has, as Codex asked on #2169. The test now boots the app's real
fsdev.config.ts, the same waynamed-org.test.tsdoes. That brings in the realresolveKitchenSinkPrincipalhost resolver, the real registrar and the real admin flow. The admin token iskitchen-sink:<tok>. The in-app hire goes through mara's ownhiretool, with a scripted model, instead of a hand-built registration. It checks the same four things:No production code changes. The fix from #2169 is already on main and untouched.
What's asked of you
Nothing to decide. This makes main green again.
Parts worth reviewing closely
apps/kitchen-sink/test/named-org.test.ts: one added line,vi.setConfig({ testTimeout: 30_000 }), and the same line in the new test. Each file cold-imports the whole app, which takes about 4.8 s.named-orgV18 took 4798 ms on its own against vitest's 5 s default. With two such files in parallel workers, V18 timed out 2 out of 2 runs. With the timeout in both files, the full suite passed 2 out of 2.Linear: FIX-1563 · Follows #2169 and #2159 (both merged) · Merges to
main· No changeset (kitchen-sink is private)How to review this — bug fix on the direct route; this PR is the only gate
Verification — main red, then green; both red states reproduced on the re-keyed test
All runs had
FSDEV_DEFAULT_MODELandFSDEV_INTENT_*unset.main at 95f8992, unmodified (
pnpm --filter @flow-state-dev/kitchen-sink test):Why it fails: with its only token refused, the admin flow has no resolver. So the "admin" hire runs as the test's visitor, and nothing lands at the admin-user address.
Re-keyed test, lib fix reverted (lib files from 5c57608): the visitor cases go red.
Re-keyed test, admin-resolver attach removed: the admin cases go red.
Both restored: the file gives
4 passed (4). The full kitchen-sink suite gives 22 files / 156 tests passing, on two runs. Rootpnpm typecheckandpnpm lintboth exit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01ANuyMVi3YS653fcghb9gtB
Generated by Claude Code
Note
Low Risk
Test-only changes; no production code paths are modified.
Overview
Re-keys the hired-seat visitor auth regression test so it boots kitchen-sink’s real
fsdev.config.ts(likenamed-org.test.ts) instead of a minimal in-memory stack with anacmeadmin token that #2159 now rejects at boot.The test still covers the same four behaviors (visitor access to mara’s in-app hire vs admin-hired seats), but in-app hire is exercised through mara’s scripted
hiretool and HTTP via the app router, withWORKFORCE_ADMIN_TOKENSset tokitchen-sink:<token>.named-org.test.tsgets a 30s Vitest timeout so cold full-app imports in parallel workers don’t hit the 5s default.Reviewed by Cursor Bugbot for commit 4beaeb7. Configure here.