docs(qa): state the org-wall boundary at the dogfood autoconnect assertion (#7834) - #7919
Merged
Merged
Conversation
…rtion (#7834) `showcase-external-autoconnect.dogfood.test.ts` is a required-CI test that names the federated-read path and asserts `rows.length >= 3` on an authenticated admin read — the exact shape that should have caught #7738's fail-open federated read, and did not. It boots single-tenant, so the org predicate is never emitted and the assertion passes without ever crossing the wall. A green gate over a path it does not exercise reads as coverage. Per the maintainer's 2026-08-12 ruling on #7834 (option 2), record the boundary at the assertion site instead of building a posture-aware fixture: what the test does cover (the ADR-0062 D8 autoconnect path — real, hence not skipped), what it does not (the organization wall), why (no `opts.multiTenant` => no `isolated` posture request, `autoDefaultOrganization: false`, no org plugin => `execCtx.tenantId` undefined => `hasTenant` false), and where the regression defence actually lives (#7833's seam pin on `DriverOptions` in `packages/objectql/src/engine-external-tenant-scope.test.ts` — a unit/seam pin, explicitly not end-to-end proof). Comment-only; no behaviour change and no new assertion. Verified by re-measurement: with #7833's `!isFederated` guard locally removed and `@objectstack/objectql` rebuilt, this file still passes 3/3, and a probe in `buildDriverOptions` records `tenantId=undefined`/`hasTenant=false` for `showcase_ext_customer` and `showcase_ext_order` (0 of 1069 calls in the whole boot ever get a tenant). Probe reverted; nothing outside the comment changed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmZQLn86u9wLfoXQUBX7bs
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckNo hand-written docs reference the 0 changed package(s). ✅ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7834
Executes the maintainer's 2026-08-12 ruling (issue comment
5261737155) — option 2: accept that the federated-read × org-walled intersection is covered at the unit/seam tier only, and write that boundary onto the dogfood test. Comment-only: +44 lines, 1 file, 0 deletions, no behaviour change and no new assertion.Why a comment is the whole deliverable
This card exists because a green required test that names a path but boots it inert reads as coverage and is not. So a vague "see also #7833" note would reproduce the original problem in comment form. The comment states four things concretely — what IS covered, what is NOT, where the real defence lives, and why it is deliberately left this way.
Before / after
Before — the assertion carried no boundary statement at all:
After — 44 comment lines inserted immediately above
expect(rows.length).toBeGreaterThanOrEqual(3); the assertions themselves are byte-identical:Every factual claim in the comment, and the measurement behind it
The card's own failure class is pointing at coverage that is not there, so no claim below is inherited — each was re-measured on this branch's
origin/mainbase (d447939).1. The premise still holds at both cited sites
rows.length >= 3assertion still exists at the cited siteexpect(rows.length).toBeGreaterThanOrEqual(3)present inshowcase-external-autoconnect.dogfood.test.ts, in thefederated customer object is queryablecasebootStackrequestsisolatedonly whenopts.multiTenantis truthypackages/verify/src/harness.ts:const requestIsolatedPosture = !!opts.multiTenant && !prevTenancyPosture;/if (requestIsolatedPosture) process.env.OS_TENANCY_POSTURE = 'isolated';stack = await bootStack(showcaseStack);— single argumentpackages/verify/src/harness.ts:new AuthPlugin({ …, autoDefaultOrganization: false })multiTenantpackages/verify/src/harness.ts: theSimulatedOrgScopingPlugin/OrganizationsPluginmounts sit behindif (opts.multiTenant === 'posture-only') … else if (opts.multiTenant)2. The boot really is single-tenant — quoted from this test's own boot log
Corroborated in the same run by
[security] org-admin grant backfill complete {…,"posture":"single"}.3. The predicate does not fire — re-measured directly, not inferred
The comment's central claim is that the org predicate is never emitted here, in either direction. Two independent measurements, both run on this branch:
(a) The fix is a no-op for this file. #7833's
!isFederatedguard was temporarily removed frombuildDriverOptionslocally and@objectstack/objectqlrebuilt. The file still passed 3 passed / 3, reproducing #7738's dev's result. A test that could catch the defect would have gone red here.(b) A probe on the real call site. With the guard still removed, a temporary probe in
buildDriverOptionslogged every call in the whole boot:isFederated=trueyethasTenant=false— becauseexecCtx?.tenantId !== undefinedis the first conjunct and short-circuits, exactly as the comment says. Across the entire boot: 1069buildDriverOptionscalls, 0 withhasTenant=true, andtenantId=undefinedthe only value ever observed. There is no active org anywhere in this fixture, so the wall cannot be crossed by any assertion in this file.Both the guard removal and the probe were reverted;
git statusis clean apart from the comment, and@objectstack/objectqlwas rebuilt from unmodified source before the gates below.4. What #7833's pin actually covers — read from the merged code, not from its PR body
packages/objectql/src/engine-external-tenant-scope.test.tsexists onmain(PR #7833, merged2026-08-11). Read directly, it asserts onDriverOptions, in both directions:expect(call!.options?.tenantId ?? undefined).toBeUndefined()and the same fortenantIds, overit.each(READ_DOORS);expect(call!.options?.tenantId).toBe('org_msoroxgurm6423gz'), andtenantIdsstill threaded under thegroupposture;tenantIdby name still wins.It builds its own
ExecutionContextwith a literaltenantIdand a fake driver, so it is reachable without@objectstack/organizations— which is what makes it a usable defence here. It is a unit/seam pin: it constrains what the engine hands the driver, not what a walled deployment returns over HTTP. The comment says exactly that, in those words, with the ⛔ attached.5. The structural claim, corroborated by the suite itself
The card says the one honest walled harness is unavailable in this repo. That is observable in the run:
test/rls-multitenant.dogfood.test.ts— the file that would exercise cross-tenant isolation — skips entirely here (1 skipped (1)file /2 skipped (2)tests) because@objectstack/organizationsis absent. It is the whole of the "1 skipped" file in the suite result below. Pre-existing and unrelated to this change.Verification
There is no behaviour to pin here. The deliverable is a comment; adding a test to assert that a comment exists would be theatre, and every alternative the card lists is explicitly forbidden by the ruling (no posture-aware fixture, no assertion on the single-tenant boot, no skip). So the verification obligation is: the claims are true (above), and the test still passes unchanged.
showcase-external-autoconnect.dogfood.test.ts(post-change, clean build)packages/qa/dogfoodfull suiterls-multitenantfile and are pre-existingeslinton the changed filepackages/qa/dogfoodtsc --noEmitpnpm build(full workspace)node scripts/pm/dispatch-gates.mjs packages/qa/dogfood/test/showcase-external-autoconnect.dogfood.test.tsNothing skipped, baselined or ratcheted by this change. Per the dispatch instruction the full
lint.ymlfarm was not run locally — CI runs it once.Changeset
Comment-only, no publishable change ⇒
skip-changesetlabel rather than an empty changeset.Scope held
packages/qa/dogfood/test/showcase-external-autoconnect.dogfood.test.tsis changed.packages/verify/src/harness.tsposture logic untouched.packages/rest/**,packages/runtime/**,packages/mcp/**,docs/qa/platform-checklist/**,content/docs/releases/**— untouched.