Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

feat(access): owner-bound put_page writes to default stay shared; POST /ingest still refuses (GST-2059 x GST-2051)

garrytanc26492767622
diff --git a/docs/guides/access-designations.md b/docs/guides/access-designations.md
index f4a1eff620..008fa661e1 100644
--- a/docs/guides/access-designations.md
+++ b/docs/guides/access-designations.md
@@ -107,7 +107,9 @@ Pinned-question pages are the owner's own and read as private. The owner reads t
add --prefix <folder>/ --readers <list>` does the same for a folder. This is the boundary between people in a
shared brain, and it binds the owner too: the owner reads such a page only when listed. No grant, hatch or owner
binding relaxes it. Use it for a page that belongs to specific people in a shared brain; a single-user brain needs
-none. The page's writers set it; widening a folder rule waits for `gbrain access apply`. See
+none. The page's writers set it; widening a folder rule waits for `gbrain access apply`. A credential bound to a
+member with `default` as its write source gets it on the pages it creates there (`readable_by: [member:<id>]`),
+except the owner's, whose new pages stay shared (`POST /ingest` still refuses both). See
[company brain, Model C](../tutorials/company-brain.md#two-scoping-models-pick-the-one-that-matches-your-shape).
### Fact visibility (`private` | `world`)
diff --git a/src/core/behavior-change-notice.ts b/src/core/behavior-change-notice.ts
index ccdd263c83..20b8743b24 100644
--- a/src/core/behavior-change-notice.ts
+++ b/src/core/behavior-change-notice.ts
@@ -1492,7 +1492,7 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText;
{ since: '0.60.621.0', id: 'ungranted_member_writes_gst2051', text: 'A token or OAuth client bound to a member (`gbrain auth rescope --member <id>`) whose write source is `default` (no `--sources`, `--sources default`, or an OAuth client at its registration default) writes where every credential without a source grant reads. A page it creates there is now written with `readable_by: [member:<id>]`, so other members and unbound tokens no longer read it; rewriting it without `readable_by` keeps those readers, naming readers widens it, an edit to an existing page with no readers leaves it shared, and `POST /ingest` refuses such a credential. Pages derived from such a page (atoms, chronicle events, `derived_from` pages, a synthesized concept using it) are readable by no remote caller, the writer included; a page teammates should read names its readers when created, because every other remote credential, unbound tokens included, gets page_not_found writing a slug a member created until the operator adds readable_by on the brain host. Credentials writing to another source and unbound credentials are unchanged, and pages written before the upgrade keep their readers (`gbrain access who-can-read <slug>`).' },
{ since: '0.60.622.0', id: 'think_window_trajectory_gst731', text: '`think` on a question that names one month or day (or given `since`/`until`) still gets the entity\'s trajectory: each metric\'s latest reading before the window now joins the readings inside it, as the value in force when the window opens (unless its `valid_until` ended by then), and an entity page dated outside the window still names whose trajectory to read (it stays out of the evidence). Before, "MRR in April" with readings in March and June, or a company page last edited outside the month, injected no trajectory. `WINDOW_EXCLUDED_<n>_TRAJECTORY_POINTS` no longer counts the carried reading.' },
{ since: '0.60.622.0', id: 'purge_cancels_deferred_write_gst1602', text: 'With `persistence.refresh_barrier` on, `gbrain forget <id> --purge` no longer refuses `purge_blocked_pending_recovery` while a write deferred behind a refresh holds the claim in its staged body: the deferred write was never claimed, so the purge cancels it with `purged_content`, as it does a queued one, and removes the content at once instead of up to 15 minutes later.' },
- { since: 'TBD', id: 'owner_reads_private_gst2059', text: 'A brain can now name its owner: `gbrain access owner set <member>` (config `access.owner_member`, an enabled member). Every remote credential or stdio server bound to that member reads the whole brain, `visibility: private` pages, privacy-alias pages (`access: private`, ...), derived and pinned-question pages included, through `get_page`, `search`, `query`, `recall` and the other page reads in the sources its grant reads, and `recall` returns its private facts. `readable_by` and folder rules still bind it, and it is not relaxed when it speaks for a shared-room audience. Other members, unbound and public callers are unchanged. `_meta.access.relaxation` reads `owner` for such a call, and `gbrain access check --token <name>` reports it. `gbrain repair private-labels` (named runs only) previews the `access: private` labels stamped on ordinary pages with counts per category, keeps real restrictions, and clears the rest in reviewed batches (`--apply --expect <hash>`), recording each change so `--class restore` can put it back. The bulk-ingestion page template no longer writes an `access:` line; what each designation means is in docs/guides/access-designations.md.' },
+ { since: 'TBD', id: 'owner_reads_private_gst2059', text: 'A brain can now name its owner: `gbrain access owner set <member>` (config `access.owner_member`, an enabled member). Every remote credential or stdio server bound to that member reads the whole brain, `visibility: private` pages, privacy-alias pages (`access: private`, ...), derived and pinned-question pages included, through `get_page`, `search`, `query`, `recall` and the other page reads in the sources its grant reads, and `recall` returns its private facts. `readable_by` and folder rules still bind it, and it is not relaxed when it speaks for a shared-room audience. A page the owner\'s credential creates in `default` through `put_page` is not kept to the owner (no `readable_by: [member:<id>]`). Other members, unbound and public callers are unchanged. `_meta.access.relaxation` reads `owner` for such a call, and `gbrain access check --token <name>` reports it. `gbrain repair private-labels` (named runs only) previews the `access: private` labels stamped on ordinary pages with counts per category, keeps real restrictions, and clears the rest in reviewed batches (`--apply --expect <hash>`), recording each change so `--class restore` can put it back. The bulk-ingestion page template no longer writes an `access:` line; what each designation means is in docs/guides/access-designations.md.' },
];
/** The newest disclosed change's release: the notice id moves only when a release adds rows. */
diff --git a/src/core/persistence/page-prepare.ts b/src/core/persistence/page-prepare.ts
index b1f2938e69..ec972ba265 100644
--- a/src/core/persistence/page-prepare.ts
+++ b/src/core/persistence/page-prepare.ts
@@ -37,7 +37,7 @@ import { recordedPathFromFileUri, scannerSlugRootMode, scannerSourcePath } from
import { engineMutationPrecondition, parseMutationPrecondition } from './preconditions.ts';
import { assertPurgeParams } from './purge-params.ts';
import { authorizeWrite, slugDisclosable } from './authority.ts';
-import { remoteReadersChecked, defaultSourceMemberWriter, defaultSourceWriterReaders } from './page-visibility.ts';
+import { remoteReadersChecked, defaultSourceMemberWriter, defaultSourceWriterIsOwner, defaultSourceWriterReaders } from './page-visibility.ts';
import { findLiveFileClaimants, type FileClaimant, type FileClaimTarget } from './file-claims.ts';
import { digest, sha256 } from './digest.ts';
import { replaceableFile } from '../facts/file-body-guard.ts';
@@ -976,7 +976,7 @@ async function prepareInlineOrSegmentedMutation(unbounded: BrainEngine, row: Wri
// #5575: the page's tier, computed once before import so the write gate sees exactly it (ENG-18).
const trust = provenanceWriteTrust(row, typeof content === 'string' && !isFenceEditWrite(row) ? parseMarkdown(content, row.slug, { activePack }).frontmatter : null, snapshot?.page.frontmatter);
const gateTrust = pageGateTrust(row, trust, storedTier);
- const defaultSourceWriter = row.operation === 'restore_page' || row.operation === 'revert_version' ? null : await defaultSourceMemberWriter(engine, row.authority);
+ const defaultSourceWriter = row.operation === 'restore_page' || row.operation === 'revert_version' ? null : await defaultSourceMemberWriter(engine, row.authority), defaultSourceOwner = await defaultSourceWriterIsOwner(engine, defaultSourceWriter);
// The apply diet: the publisher's locked read of row.slug is the import base, and one read after the
// last page write serves the read-back check, the seal, the core notice and the receipt (as sync does).
const lean = options.coordinated === true && !targetDeleted && row.operation !== 'restore_page' && !versionTags;
@@ -998,7 +998,7 @@ async function prepareInlineOrSegmentedMutation(unbounded: BrainEngine, row: Wri
provenance = putProvenance(row, snapshot, page);
suppliedTrustMarker = page.frontmatter.trust_tier;
stampPageTrustMarker(row, page.frontmatter, trust, storedTier, snapshot?.page.frontmatter);
- defaultSourceWriterReaders(defaultSourceWriter, page.frontmatter, snapshot?.page);
+ defaultSourceWriterReaders(defaultSourceWriter, page.frontmatter, snapshot?.page, defaultSourceOwner);
if (privateRequest) assertPrivateRequestKept(row, page.frontmatter);
},
prepare: async value => { prepared = value; return value.result; },
diff --git a/src/core/persistence/page-visibility.ts b/src/core/persistence/page-visibility.ts
index 3d626f2cd1..ad400a87e1 100644
--- a/src/core/persistence/page-visibility.ts
+++ b/src/core/persistence/page-visibility.ts
@@ -1,10 +1,10 @@
import { opError } from '../ops/contract.ts';
-import { callerAccessAllowedSql, callerIdentities, currentCallerAccess, readPolicyFragment, readRemotePolicyNow, withCallerAccess } from '../search/private-visibility.ts';
+import { callerAccessAllowedSql, callerIdentities, currentCallerAccess, OWNER_MEMBER_KEY, readPolicyFragment, readRemotePolicyNow, withCallerAccess } from '../search/private-visibility.ts';
import { parseMarkdown } from '../markdown.ts';
import { folderAccessForAll, memberIdentityFor, resolveAudienceIdentities } from '../access/caller.ts';
import type { AudiencePrincipal } from '../access/audience.ts';
import { parseStoredActor, storedActorIdentity } from '../access/actor.ts';
-import { hasReaders, normalizePrincipal, normalizeReaders, readersAllow, NOBODY } from '../access/principals.ts';
+import { ACCESS_ID_RE, hasReaders, normalizePrincipal, normalizeReaders, readersAllow, NOBODY } from '../access/principals.ts';
import { catalogueError } from '../error-catalogue.ts';
import type { SqlEngine, WriteAuthority } from './model.ts';
@@ -158,16 +158,30 @@ export async function defaultSourceMemberWriter(engine: SqlEngine, authority: Pi
return row?.member_id ? `member:${row.member_id}` : null;
}
+/**
+ * GST-2059: whether a default-source member writer is the brain owner (config access.owner_member, an enabled member),
+ * whose new pages stay shared. A disabled or removed owner member is not the owner here, so its pages keep the stamp.
+ */
+export async function defaultSourceWriterIsOwner(engine: SqlEngine, writer: string | null): Promise<boolean> {
+ if (!writer) return false;
+ const [row] = await engine.executeRaw<{ value: string }>('SELECT value FROM config WHERE key=$1', [OWNER_MEMBER_KEY]);
+ const owner = row?.value?.trim();
+ if (!owner || !ACCESS_ID_RE.test(owner) || writer !== `member:${owner}`) return false;
+ const [live] = await engine.executeRaw<{ id: string }>('SELECT id FROM access_members WHERE id = $1 AND disabled_at IS NULL AND tombstoned_at IS NULL', [owner]);
+ return !!live;
+}
+
/**
* GST-2051: the readers a page written by a default-source member writer (defaultSourceMemberWriter) keeps when its content
- * names none: the stored page's readers when it has them, else the writer alone for a page this write creates. An
- * existing page with no readers stays as it is. Only ever narrows: a page naming readers is left to the caller.
+ * names none: the stored page's readers when it has them, else the writer alone for a page this write creates, unless
+ * the writer is the brain owner (GST-2059), whose new pages stay shared. An existing page with no readers stays as it
+ * is. Only ever narrows: a page naming readers is left to the caller.
*/
-export function defaultSourceWriterReaders(writer: string | null, frontmatter: Record<string, unknown>, stored: { frontmatter?: unknown; deleted_at?: unknown } | null | undefined): void {
+export function defaultSourceWriterReaders(writer: string | null, frontmatter: Record<string, unknown>, stored: { frontmatter?: unknown; deleted_at?: unknown } | null | undefined, owner = false): void {
if (!writer || hasReaders(frontmatter)) return;
const live = stored && stored.deleted_at == null ? stored : null;
if (live && hasReaders(live.frontmatter)) frontmatter.readable_by = (live.frontmatter as Record<string, unknown>).readable_by;
- else if (!live) frontmatter.readable_by = [writer];
+ else if (!live && !owner) frontmatter.readable_by = [writer];
}
/** The one refusal a remote writer gets for a target it may not see; other visibility refusals reuse it verbatim. */
diff --git a/src/core/persistence/upload-streamed.ts b/src/core/persistence/upload-streamed.ts
index a3000ec645..0264cd667b 100644
--- a/src/core/persistence/upload-streamed.ts
+++ b/src/core/persistence/upload-streamed.ts
@@ -41,7 +41,7 @@ import { stagedUploadParts, stagedUploadWork, type StagingBodyRef } from './page
import type { PreparedMutation } from './coordinator.ts';
import type { WriteRequest } from './model.ts';
import { assertPrivateRequestKept, privateRequestGuarded, readPrivateRequest } from './visibility-request.ts';
-import { defaultSourceMemberWriter, defaultSourceWriterReaders } from './page-visibility.ts';
+import { defaultSourceMemberWriter, defaultSourceWriterIsOwner, defaultSourceWriterReaders } from './page-visibility.ts';
const text = (value: unknown) => (typeof value === 'string' ? value : null);
@@ -94,6 +94,7 @@ export async function prepareStreamedUpload(engine: BrainEngine, row: WriteReque
if (remote && snapshot && !snapshot.page.deleted_at) await assertNothingHiddenDropped(engine, row, snapshot, p);
const storedTier = remote && snapshot ? await storedPageTier(engine, row.source_id, row.slug) : null;
const defaultSourceWriter = await defaultSourceMemberWriter(engine, row.authority);
+ const defaultSourceOwner = await defaultSourceWriterIsOwner(engine, defaultSourceWriter);
let trust: WriteTrust | undefined;
const dir = await mkdtemp(join(tmpdir(), 'gbrain-upload-'));
let ready: StreamedPreparedImport | undefined;
@@ -121,7 +122,7 @@ export async function prepareStreamedUpload(engine: BrainEngine, row: WriteReque
stamp: (frontmatter: Record<string, unknown>) => {
keepStoredProvenance(frontmatter, snapshot?.page.frontmatter);
stampPageTrustMarker(row, frontmatter, trust, storedTier, snapshot?.page.frontmatter);
- defaultSourceWriterReaders(defaultSourceWriter, frontmatter, snapshot?.page);
+ defaultSourceWriterReaders(defaultSourceWriter, frontmatter, snapshot?.page, defaultSourceOwner);
},
} } : {}) },
coordinated: { snapshot, sha256: ref.sha256, slug: row.slug, prepare: async value => { ready = value; return value.result; },
diff --git a/test/access-owner-default-writes.test.ts b/test/access-owner-default-writes.test.ts
new file mode 100644
index 0000000000..200d4957b3
--- /dev/null
+++ b/test/access-owner-default-writes.test.ts
@@ -0,0 +1,127 @@
+/**
+ * GST-2059 x GST-2051: the brain owner's credential bound with no source grant writes to `default` like any member, but
+ * its new pages are meant for the whole brain, so the GST-2051 new-page stamp (readable_by: [member:<id>]) skips it.
+ * 1. Protects: an owner-token create in default stays shared (no readable_by, other members read it); a non-owner
+ * member's create is still stamped; an owner rewrite of another member's restricted page with no readable_by keeps
+ * the stored readers (the carry still runs for the owner); POST /ingest still refuses the owner, because the
+ * capture job writes without the readers carry and could strip readable_by from a page the owner may read.
+ * 2. Fails when: the owner's new page is stamped, a non-owner's is not, or the owner's rewrite drops stored readers.
+ * 3. Real seams: tokens minted by the token service and bound with SQL, verified by the serve --http verifier,
+ * dispatched through MCP dispatch with remote=true; the durable write path of a repo-less brain.
+ */
+import { afterAll, beforeAll, describe, expect, test } from 'bun:test';
+import express from 'express';
+import type { Server } from 'node:http';
+import type { AddressInfo } from 'node:net';
+import { randomUUID } from 'node:crypto';
+import type { BrainEngine } from '../src/core/engine.ts';
+import { PGLiteEngine } from '../src/core/pglite-engine.ts';
+import { GBrainOAuthProvider } from '../src/core/oauth-provider.ts';
+import { sqlQueryForEngine } from '../src/core/sql-query.ts';
+import { mintLegacyToken } from '../src/core/token-mint.ts';
+import { dispatchToolCall } from '../src/mcp/dispatch.ts';
+import { mountWebhooks } from '../src/commands/serve-http-webhooks.ts';
+import type { ServeHttpContext } from '../src/commands/serve-http.ts';
+import { __resetPrivateVisibilityCacheForTests } from '../src/core/search/private-visibility.ts';
+import { setOwner } from '../src/core/access/owner.ts';
+import { defaultSourceWriterIsOwner } from '../src/core/persistence/page-visibility.ts';
+import type { AuthInfo } from '../src/core/ops/contract.ts';
+import { testBackends } from './helpers/test-backends.ts';
+import { isolatedPersistencePostgres } from './helpers/persistence-postgres.ts';
+
+const marker = (tag: string) => 'ownerdefault' + tag + randomUUID().slice(0, 8);
+const note = (title: string, body: string, readers = '') =>
+ ['---', 'type: note', 'title: ' + title, ...(readers ? ['readable_by: ' + readers] : []), '---', '# ' + title, '', body].join('\n');
+
+for (const kind of testBackends()) {
+ describe('owner writes to default (' + kind + ', repo-less)', () => {
+ let engine: BrainEngine;
+ let close: () => Promise<void>;
+ const tokens: Record<string, string> = {};
+ const provider = () => new GBrainOAuthProvider({ sql: sqlQueryForEngine(engine), transaction: fn => engine.transaction(tx => fn(sqlQueryForEngine(tx))) });
+
+ async function call(who: string, op: string, params: Record<string, unknown>) {
+ const auth = await provider().verifyAccessToken(tokens[who]) as unknown as AuthInfo;
+ const out = await dispatchToolCall(engine, op, { ...params }, { remote: true, transport: 'http', auth, sourceId: auth.sourceId ?? 'default', takesHoldersAllowList: ['world'] });
+ return { isError: out.isError === true, text: out.content.map(c => c.text).join('\n') };
+ }
+ async function readers(slug: string) {
+ const [row] = await engine.executeRaw<{ frontmatter: Record<string, unknown>; page_readers: string[] | null }>(
+ "SELECT frontmatter, page_readers FROM pages WHERE source_id='default' AND slug=$1 AND deleted_at IS NULL", [slug]);
+ return { readable_by: row.frontmatter.readable_by, page_readers: row.page_readers };
+ }
+ async function revision(slug: string): Promise<string> {
+ const out = await dispatchToolCall(engine, 'get_page', { slug, include_content: true }, { remote: false, sourceId: 'default' });
+ return (JSON.parse(out.content.map(c => c.text).join('\n')) as { revision: string }).revision;
+ }
+
+ beforeAll(async () => {
+ if (kind === 'postgres') ({ engine, close } = await isolatedPersistencePostgres(process.env.DATABASE_URL!));
+ else { engine = new PGLiteEngine(); await engine.connect({ engine: 'pglite' } as never); await engine.initSchema(); close = () => engine.disconnect(); }
+ __resetPrivateVisibilityCacheForTests();
+ for (const id of ['owner-example', 'alice-example', 'bob-example']) await engine.executeRaw('INSERT INTO access_members (id) VALUES ($1)', [id]);
+ await setOwner(engine, 'owner-example');
+ for (const [name, member] of [['owner', 'owner-example'], ['alice', 'alice-example'], ['bob', 'bob-example']] as const) {
+ const minted = await mintLegacyToken(engine, { name, scopes: ['read', 'write'], takesHolders: ['world'] });
+ tokens[name] = minted.token;
+ await engine.executeRaw('UPDATE access_tokens SET member_id = $2 WHERE id = $1::uuid', [minted.id, member]);
+ }
+ }, 240_000);
+ afterAll(async () => { await close?.(); }, 60_000);
+
+ test('an owner-token create in default stays shared, and another member reads it', async () => {
+ const canary = marker('new');
+ const slug = 'notes/owner-note-' + canary;
+ expect((await call('owner', 'put_page', { slug, content: note('Owner note', 'Owner code ' + canary + '.'), request_id: randomUUID() })).isError).toBe(false);
+ expect(await readers(slug)).toEqual({ readable_by: undefined, page_readers: null });
+ expect((await call('bob', 'get_page', { slug })).text).toContain(canary + '.');
+ }, 240_000);
+
+ test('a non-owner member create in default is still kept to its member', async () => {
+ const canary = marker('member');
+ const slug = 'notes/alice-note-' + canary;
+ expect((await call('alice', 'put_page', { slug, content: note('Alice note', 'Alice code ' + canary + '.'), request_id: randomUUID() })).isError).toBe(false);
+ expect(await readers(slug)).toEqual({ readable_by: ['member:alice-example'], page_readers: ['member:alice-example'] });
+ expect((await call('bob', 'get_page', { slug })).text).not.toContain(canary + '.');
+ }, 240_000);
+
+ test('an owner rewrite of a member page with no readable_by keeps the stored readers', async () => {
+ const canary = marker('carry');
+ const slug = 'notes/alice-shared-with-owner-' + canary;
+ expect((await call('alice', 'put_page', { slug, content: note('Alice and owner', 'First ' + canary + '.', '[alice-example, owner-example]'), request_id: randomUUID() })).isError).toBe(false);
+ const rewrite = await call('owner', 'put_page', { slug, content: note('Alice and owner', 'Second ' + canary + '.'), expected_revision: await revision(slug) });
+ expect(rewrite.isError).toBe(false);
+ expect((await readers(slug)).page_readers?.slice().sort()).toEqual(['member:alice-example', 'member:owner-example']);
+ expect((await call('bob', 'get_page', { slug })).text).not.toContain(canary + '.');
+ }, 240_000);
+
+ test('POST /ingest still refuses the owner, whose capture job would not keep a stored page\'s readers, and other members', async () => {
+ const app = express();
+ const pass: express.RequestHandler = (_req, _res, next) => next();
+ mountWebhooks(app, { engine, resourceVerifier: provider(), resourceMetadataUrl: 'http://127.0.0.1/.well-known/oauth-protected-resource',
+ ingestRateLimiter: pass, githubWebhookLimiter: pass, broadcastEvent: () => {} } as unknown as ServeHttpContext);
+ const server = await new Promise<Server>(resolve => { const s = app.listen(0, '127.0.0.1', () => resolve(s)); });
+ try {
+ const base = 'http://127.0.0.1:' + (server.address() as AddressInfo).port;
+ const ingest = (who: string, body: string) => fetch(base + '/ingest', { method: 'POST', body,
+ headers: { authorization: 'Bearer ' + tokens[who], 'content-type': 'text/markdown' } });
+ expect((await ingest('owner', note('Owner ingest', 'Ingest ' + marker('owneringest') + '.'))).status).toBe(403);
+ expect((await ingest('alice', note('Alice ingest', 'Ingest ' + marker('aliceingest') + '.'))).status).toBe(403);
+ } finally {
+ await new Promise<void>(resolve => server.close(() => resolve()));
+ }
+ }, 240_000);
+
+ test('only the enabled owner member counts: a disabled owner or another member keeps the stamp', async () => {
+ expect(await defaultSourceWriterIsOwner(engine, 'member:owner-example')).toBe(true);
+ expect(await defaultSourceWriterIsOwner(engine, 'member:alice-example')).toBe(false);
+ expect(await defaultSourceWriterIsOwner(engine, null)).toBe(false);
+ await engine.executeRaw('UPDATE access_members SET disabled_at = now() WHERE id = $1', ['owner-example']);
+ try {
+ expect(await defaultSourceWriterIsOwner(engine, 'member:owner-example')).toBe(false);
+ } finally {
+ await engine.executeRaw('UPDATE access_members SET disabled_at = NULL WHERE id = $1', ['owner-example']);
+ }
+ }, 240_000);
+ });
+}
diff --git a/test/postgres-unit-arms.txt b/test/postgres-unit-arms.txt
index 58be68e1c9..5204d12ad7 100644
--- a/test/postgres-unit-arms.txt
+++ b/test/postgres-unit-arms.txt
@@ -21,6 +21,7 @@ test/access-member-facts.test.ts
test/access-member-sweep.test.ts
test/access-members.test.ts
test/access-on-behalf-of.test.ts
+test/access-owner-default-writes.test.ts
test/access-owner-reads.test.ts
test/access-page-indexes-online.test.ts
test/access-qm-actor.test.ts