From f8174db69db29af36ea9cda1033858488e05a75f Mon Sep 17 00:00:00 2001 From: Anatolii Gorovyi Date: Thu, 15 Oct 2026 16:13:26 -0400 Subject: [PATCH 1/2] app init: take the app name from the login too, ask nothing The command still prompted for an app name, and whatever was typed became appName in reactiv.conf.js and the shell's display name while the folder and package were already named after the merchant slug from the login. The slug now fills the app name as well, --name is gone, and the command asks nothing. The no-TTY test now runs against an empty HOME so it exercises the not-logged-in path instead of the removed prompt. Co-Authored-By: Claude Fable 5.1 --- .changeset/init-identity-from-login.md | 5 +++++ README.md | 2 +- docs/commands.md | 5 ++--- docs/getting-started.md | 2 +- packages/cli/README.md | 2 +- packages/cli/src/commands/app/init.ts | 26 +++---------------------- packages/cli/test/init-run.test.ts | 24 +++++++++++------------ packages/cli/test/stub-commands.test.ts | 21 ++++++++++++++------ packages/cli/test/upgrade.test.ts | 2 +- packages/cli/test/walkthrough.test.ts | 24 +++++++++++------------ 10 files changed, 53 insertions(+), 60 deletions(-) create mode 100644 .changeset/init-identity-from-login.md diff --git a/.changeset/init-identity-from-login.md b/.changeset/init-identity-from-login.md new file mode 100644 index 0000000..13cc5de --- /dev/null +++ b/.changeset/init-identity-from-login.md @@ -0,0 +1,5 @@ +--- +'@reactivapp/cli': minor +--- + +`reactiv app init` no longer asks for an app name and no longer takes `--name`. The merchant slug from your login now names the folder, the package, the app shown in the shell and `appName` in `reactiv.conf.js`, next to the app UUID from the same login. diff --git a/README.md b/README.md index 2bc47b5..c3f9e2a 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ reactiv --version ```bash reactiv login # paste your API key at the hidden prompt -reactiv app init # asks for an app name, then installs dependencies +reactiv app init # scaffolds a folder named after your merchant and installs dependencies cd reactiv app run ios # pod install, Metro, build, launch on the booted simulator ``` diff --git a/docs/commands.md b/docs/commands.md index eb2ad56..38153a3 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -42,12 +42,11 @@ Prints the merchant and app UUID, the key label and holder, the key's expiry, th Scaffolds a new project from the current `@reactivapp/app-template`. ``` -reactiv app init [--name ] [--path ] [--bundle-id ] [--app-uuid ] [--skip-install] [--package-manager npm] +reactiv app init [--path ] [--bundle-id ] [--app-uuid ] [--skip-install] [--package-manager npm] ``` | Flag | Effect | | --- | --- | -| `--name` | The app name shown in the app. Prompted for when omitted. Any text except quotes, backslashes and newlines; it is not used for file or package names. | | `--app-uuid` | Optional. The app UUID; defaults to the app your login is provisioned for (`reactiv whoami` shows it) and is refused when it differs. | | `--path` | Parent directory to scaffold into. Default: the current directory. | | `--bundle-id` | iOS bundle identifier. Default: `com.reactiv.`. | @@ -56,7 +55,7 @@ reactiv app init [--name ] [--path ] [--bundle-id ] [--app-uu What happens: -1. Your login decides the project identity: the merchant slug Reactiv provisioned for your key (lowercase letters, digits and dashes) becomes the folder name, the root package name and the default bundle identifier; the app UUID comes from the same login. +1. Your login decides the project identity, and nothing is asked: the merchant slug Reactiv provisioned for your key (lowercase letters, digits and dashes) becomes the folder name, the root package name, the app name in `reactiv.conf.js` and the shell, and the default bundle identifier; the app UUID comes from the same login. 2. The current platform version and its pinned `react` and `react-native` versions are read from the registry, and the template is downloaded with npm so the transcript shows where it came from. 3. The template is expanded into `/`, which must not exist or must be empty. A `git init` follows, and the CLI refuses to continue if the scaffold's `.gitignore` does not ignore `.npmrc`. 4. Dependencies are installed in the root and in `app/` with install scripts turned off. The CLI tells you which packages declared one so you can run `npm rebuild` in `app/` if the native build needs it. diff --git a/docs/getting-started.md b/docs/getting-started.md index d1d9a60..2ef682c 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -54,7 +54,7 @@ reactiv app init cd ``` -The CLI asks for an app name (the name shown in the app; any text without quotes, backslashes or newlines), takes the app UUID and merchant slug from your login, resolves the current platform version, downloads the app template and installs dependencies. The folder is named after the merchant slug, for example `acme`, and it has two parts: +The CLI asks nothing: it takes the merchant slug and app UUID from your login, resolves the current platform version, downloads the app template and installs dependencies. The folder, the package and the app name in the shell are all the merchant slug, for example `acme`. The project has two parts: - **The root is your library.** This is what you submit. Your code lives in `src/`, and `package.json` declares the packages you add. - **`app/` is the runnable shell.** It wraps your library in a real app so you can run it. It is never submitted, and the platform version it runs is pinned for you. diff --git a/packages/cli/README.md b/packages/cli/README.md index 4f4fb6f..0e650ab 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -19,7 +19,7 @@ reactiv --version ```bash reactiv login # paste your API key at the hidden prompt -reactiv app init # asks for an app name, then installs dependencies +reactiv app init # scaffolds a folder named after your merchant and installs dependencies cd reactiv app run ios # pod install, Metro, build, launch on the booted simulator reactiv app submit --dry-run # every check, nothing published diff --git a/packages/cli/src/commands/app/init.ts b/packages/cli/src/commands/app/init.ts index be30d95..49d61f0 100644 --- a/packages/cli/src/commands/app/init.ts +++ b/packages/cli/src/commands/app/init.ts @@ -3,7 +3,6 @@ import {execFileSync} from 'node:child_process' import * as fs from 'node:fs' import * as os from 'node:os' import * as path from 'node:path' -import * as readline from 'node:readline/promises' import {createAuthContext, reportAuthError} from '../../lib/auth/context' import {gitIgnoreState, gitProbeEnv, installRoots} from '../../lib/auth/npmrc' @@ -13,16 +12,6 @@ import {APP_DIR, PLATFORM_PACKAGES, readManifest} from '../../lib/layout' import {run} from '../../lib/npm' import {defaultBundleIdentifier, expandedName, expandTemplate, isSlug} from '../../lib/scaffold' -const prompt = async (question: string, flagHint: string): Promise => { - if (!process.stdin.isTTY) { - throw new Error(`missing required value — pass ${flagHint} (interactive prompt needs a TTY)`) - } - const rl = readline.createInterface({input: process.stdin, output: process.stdout}) - const answer = await rl.question(question) - rl.close() - return answer.trim() -} - const assertNpmrcIgnored = (targetDir: string): void => { for (const root of installRoots(targetDir)) { const relative = path.relative(targetDir, path.join(root, '.npmrc')) @@ -45,7 +34,6 @@ export class AppInit extends Command { 'Scaffold a new Reactiv Plus app project from @reactivapp/app-template for the merchant you are logged in as (platform version stamped from the registry)' static override flags = { - name: Flags.string({description: 'app name shown in the app (any text without quotes, backslashes or newlines)'}), 'app-uuid': Flags.string({description: 'Reactiv app UUID; defaults to the app your login is provisioned for and is refused when it differs'}), path: Flags.string({description: 'parent directory to scaffold into', default: '.'}), 'package-manager': Flags.string({description: 'package manager for the project', options: ['npm'], default: 'npm'}), @@ -57,14 +45,6 @@ export class AppInit extends Command { const {renderSuccess, renderInfo} = await import('@reactivapp/cli-ui') const {flags} = await this.parse(AppInit) - const appName = flags.name ?? (await prompt('App name: ', '--name')) - if (!appName) this.error('app name is required (use --name)') - // The name is stamped into JSON and JS files — quotes/backslashes would - // corrupt the generated configs. - if (/["'\\\n]/.test(appName)) { - this.error('app name must not contain quotes, backslashes, or newlines') - } - const ctx = createAuthContext(this) let identity: Identity try { @@ -73,7 +53,7 @@ export class AppInit extends Command { return reportAuthError(this, error) } // The merchant the login is provisioned for decides the project identity: - // its slug is the folder and package name, its UUID the app. + // its slug is the folder, package and app name, its UUID the app. const appSlug = identity.merchant.slug if (!isSlug(appSlug)) { this.error(`the merchant slug Reactiv provisioned for this key ("${appSlug}") is not a plain lowercase name, so it cannot name a folder or package — contact Reactiv`) @@ -133,7 +113,7 @@ export class AppInit extends Command { try { for (const name of fs.readdirSync(templateDir)) createdEntries.add(expandedName(name)) fileCount = expandTemplate(templateDir, targetDir, { - appName, + appName: appSlug, appSlug, appUuid, bundleIdentifier: flags['bundle-id'] ?? defaultBundleIdentifier(appSlug), @@ -203,7 +183,7 @@ export class AppInit extends Command { } renderSuccess({ - headline: `Scaffolded ${appName}`, + headline: `Scaffolded ${appSlug}`, body: [ `${fileCount} files expanded to ${targetDir}`, `library: package.json + src/ (what gets submitted); runnable shell: ${APP_DIR}/`, diff --git a/packages/cli/test/init-run.test.ts b/packages/cli/test/init-run.test.ts index e1aa6a8..c275005 100644 --- a/packages/cli/test/init-run.test.ts +++ b/packages/cli/test/init-run.test.ts @@ -53,20 +53,20 @@ describe('app init and app run on the library layout', () => { // oclif wraps long error lines behind a ' ›' gutter; join them back up. const flat = (text: string): string => text.replace(/\s*›\s*/g, ' ').replace(/\s+/g, ' ') - const init = (name = 'Acme') => - runCli(['app', 'init', '--name', name, '--app-uuid', MERCHANT.appUuid, '--path', workDir], {cwd: workDir, env}) + const init = () => + runCli(['app', 'init', '--app-uuid', MERCHANT.appUuid, '--path', workDir], {cwd: workDir, env}) const installs = (): string[] => readFileSync(shim.log, 'utf8').split('\n').filter(line => line.startsWith('install ')) - it('takes the folder, package name and app UUID from the login, whatever the app name is', async () => { - const result = await runCli(['app', 'init', '--name', 'Acme Shop Deluxe', '--path', workDir], {cwd: workDir, env}) + it('takes the folder, package name, app name and app UUID from the login, asking nothing', async () => { + const result = await runCli(['app', 'init', '--path', workDir], {cwd: workDir, env}) expect(result.code).toBe(0) const project = join(workDir, 'acme') expect(JSON.parse(readFileSync(join(project, 'package.json'), 'utf8')).name).toBe('acme') const conf = readFileSync(join(project, 'reactiv.conf.js'), 'utf8') expect(conf).toContain(`appUuid: '${MERCHANT.appUuid}'`) - expect(conf).toContain("appName: 'Acme Shop Deluxe'") + expect(conf).toContain("appName: 'acme'") expect(result.stdout).toContain('cd acme') }) @@ -77,7 +77,7 @@ describe('app init and app run on the library layout', () => { 'POST /v1/tokens': () => ({status: 200, body: tokenResponse({merchant: {...MERCHANT, slug: '../outside'}})}), }) env = {...env, REACTIV_VENDING_API_URL: mock.url} - const result = await runCli(['app', 'init', '--name', 'Acme', '--path', workDir], {cwd: workDir, env}) + const result = await runCli(['app', 'init', '--path', workDir], {cwd: workDir, env}) expect(result.code).not.toBe(0) expect(flat(result.errorText)).toContain('is not a plain lowercase name') expect(existsSync(join(workDir, '..', 'outside'))).toBe(false) @@ -85,7 +85,7 @@ describe('app init and app run on the library layout', () => { }) it('refuses an --app-uuid that is not the app the login is provisioned for', async () => { - const result = await runCli(['app', 'init', '--name', 'Acme', '--app-uuid', '11111111-1111-1111-1111-111111111111', '--path', workDir], {cwd: workDir, env}) + const result = await runCli(['app', 'init', '--app-uuid', '11111111-1111-1111-1111-111111111111', '--path', workDir], {cwd: workDir, env}) expect(result.code).not.toBe(0) expect(flat(result.stderr)).toContain('is not the app your login is provisioned for') expect(existsSync(join(workDir, 'acme'))).toBe(false) @@ -117,10 +117,10 @@ describe('app init and app run on the library layout', () => { }, 60_000) it.each([ - ['React Native', 'react-native', 'the platform already uses'], - ['TypeScript', 'typescript', 'the project itself installs'], - ['Metro', 'metro', 'the project itself installs'], - ])('refuses the app name %s, whose package name would shadow a package', async (name, slug, reason) => { + ['react-native', 'the platform already uses'], + ['typescript', 'the project itself installs'], + ['metro', 'the project itself installs'], + ])('refuses the merchant slug %s, whose package name would shadow a package', async (slug, reason) => { // The slug comes from the login, so the mock merchant has to carry it. await mock.close() mock = await startMockVending({ @@ -128,7 +128,7 @@ describe('app init and app run on the library layout', () => { 'POST /v1/tokens': () => ({status: 200, body: tokenResponse({merchant: {...MERCHANT, slug}})}), }) env = {...env, REACTIV_VENDING_API_URL: mock.url} - const result = await init(name) + const result = await init() expect(result.code).not.toBe(0) expect(flat(result.errorText)).toContain(reason) expect(existsSync(join(workDir, slug))).toBe(false) diff --git a/packages/cli/test/stub-commands.test.ts b/packages/cli/test/stub-commands.test.ts index 047ca3d..293efea 100644 --- a/packages/cli/test/stub-commands.test.ts +++ b/packages/cli/test/stub-commands.test.ts @@ -1,12 +1,14 @@ import {execFileSync} from 'node:child_process' +import {mkdtempSync, rmSync} from 'node:fs' +import {tmpdir} from 'node:os' import {join} from 'node:path' import {describe, expect, it} from 'vitest' const binPath = join(__dirname, '..', 'bin', 'run') -const runCli = (args: string[]): {stdout: string; stderr: string; failed: boolean} => { +const runCli = (args: string[], env: NodeJS.ProcessEnv = process.env): {stdout: string; stderr: string; failed: boolean} => { try { - const stdout = execFileSync('node', [binPath, ...args], {encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe']}) + const stdout = execFileSync('node', [binPath, ...args], {encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'], env}) return {stdout, stderr: '', failed: false} } catch (error) { const err = error as {stdout?: string; stderr?: string} @@ -15,10 +17,17 @@ const runCli = (args: string[]): {stdout: string; stderr: string; failed: boolea } describe('topic commands', () => { - it('app init without flags and no TTY fails with an actionable message', () => { - const result = runCli(['app', 'init']) - expect(result.failed).toBe(true) - expect(result.stderr).toContain('--name') + it('app init without a login fails with an actionable message instead of prompting', () => { + const home = mkdtempSync(join(tmpdir(), 'reactiv-stub-')) + const env = {...process.env} + delete env.REACTIV_API_KEY + try { + const result = runCli(['app', 'init'], {...env, HOME: home, XDG_CONFIG_HOME: home, XDG_CACHE_HOME: home}) + expect(result.failed).toBe(true) + expect(result.stderr).toContain('reactiv login') + } finally { + rmSync(home, {recursive: true, force: true}) + } }) it('app run ios outside a project fails with an actionable message', () => { diff --git a/packages/cli/test/upgrade.test.ts b/packages/cli/test/upgrade.test.ts index bad5462..927512c 100644 --- a/packages/cli/test/upgrade.test.ts +++ b/packages/cli/test/upgrade.test.ts @@ -74,7 +74,7 @@ describe('app upgrade against a mock vending API and a fixture registry', () => publish(A) transcript.length = 0 project = workDir - const init = await step(`scaffold at ${A}`, ['app', 'init', '--name', 'Acme', '--app-uuid', MERCHANT.appUuid, '--path', workDir]) + const init = await step(`scaffold at ${A}`, ['app', 'init', '--app-uuid', MERCHANT.appUuid, '--path', workDir]) expect(init.code).toBe(0) project = join(workDir, 'acme') clearNpmLog() diff --git a/packages/cli/test/walkthrough.test.ts b/packages/cli/test/walkthrough.test.ts index 2b68c03..2c5cafe 100644 --- a/packages/cli/test/walkthrough.test.ts +++ b/packages/cli/test/walkthrough.test.ts @@ -69,7 +69,7 @@ describe('scripted walkthrough against a mock vending API: login → app init const init = await step( 'scaffold: registry lookups through a throwaway user config, then the managed block before npm install', - ['app', 'init', '--name', 'Acme', '--app-uuid', MERCHANT.appUuid, '--path', workDir], + ['app', 'init', '--app-uuid', MERCHANT.appUuid, '--path', workDir], {cwd: workDir}, ) expect(init.code).toBe(0) @@ -118,7 +118,7 @@ describe('scripted walkthrough against a mock vending API: login → app init it('heals an E401 during init with one re-mint', async () => { await runCli(['login', '--with-token'], {cwd: workDir, env, input: `${API_KEY}\n`}) tokenReplies.push({status: 200, body: tokenResponse()}, {status: 200, body: tokenResponse({token: OTHER_TOKEN})}) - const init = await runCli(['app', 'init', '--name', 'Acme', '--app-uuid', MERCHANT.appUuid, '--path', workDir, '--skip-install'], { + const init = await runCli(['app', 'init', '--app-uuid', MERCHANT.appUuid, '--path', workDir, '--skip-install'], { cwd: workDir, env: {...env, FAKE_NPM_E401_ONCE: join(workDir, 'e401-done')}, }) @@ -130,7 +130,7 @@ describe('scripted walkthrough against a mock vending API: login → app init it('spends at most one re-mint per init across the platform lookup and the template download', async () => { await runCli(['login', '--with-token'], {cwd: workDir, env, input: `${API_KEY}\n`}) - const init = await runCli(['app', 'init', '--name', 'Acme', '--app-uuid', MERCHANT.appUuid, '--path', workDir, '--skip-install'], { + const init = await runCli(['app', 'init', '--app-uuid', MERCHANT.appUuid, '--path', workDir, '--skip-install'], { cwd: workDir, env: {...env, FAKE_NPM_E401_ONCE: join(workDir, 'e401-done'), FAKE_NPM_E401_ONCE_VERB: 'view', FAKE_NPM_E401_ALWAYS_VERB: 'pack'}, }) @@ -147,7 +147,7 @@ describe('scripted walkthrough against a mock vending API: login → app init await runCli(['login', '--with-token'], {cwd: workDir, env, input: `${API_KEY}\n`}) const moved = TOOLS_REGISTRY_URL.replace('/tools/', '/tools-moved/') tokenReplies.push({status: 200, body: tokenResponse()}, {status: 200, body: tokenResponse({toolsRegistryUrl: moved})}) - const init = await runCli(['app', 'init', '--name', 'Acme', '--app-uuid', MERCHANT.appUuid, '--path', workDir], { + const init = await runCli(['app', 'init', '--app-uuid', MERCHANT.appUuid, '--path', workDir], { cwd: workDir, env: {...env, FAKE_NPM_E401_ONCE: join(workDir, 'e401-done'), FAKE_NPM_E401_ONCE_VERB: verb}, }) @@ -162,7 +162,7 @@ describe('scripted walkthrough against a mock vending API: login → app init await runCli(['login', '--with-token'], {cwd: workDir, env, input: `${API_KEY}\n`}) const moved = TOOLS_REGISTRY_URL.replace('/tools/', '/tools-moved/') tokenReplies.push({status: 200, body: tokenResponse()}, {status: 200, body: tokenResponse({toolsRegistryUrl: moved})}) - const init = await runCli(['app', 'init', '--name', 'Acme', '--app-uuid', MERCHANT.appUuid, '--path', workDir, '--skip-install'], { + const init = await runCli(['app', 'init', '--app-uuid', MERCHANT.appUuid, '--path', workDir, '--skip-install'], { cwd: workDir, env: {...env, FAKE_NPM_E401_ONCE: join(workDir, 'e401-done'), FAKE_NPM_E401_ONCE_VERB: 'view'}, }) @@ -177,7 +177,7 @@ describe('scripted walkthrough against a mock vending API: login → app init const moved = TOOLS_REGISTRY_URL.replace('/tools/', '/tools-moved/') const soon = new Date(Date.now() + 5 * 60 * 1000).toISOString() tokenReplies.push({status: 200, body: tokenResponse({expiresAt: soon})}, {status: 200, body: tokenResponse({toolsRegistryUrl: moved})}) - const init = await runCli(['app', 'init', '--name', 'Acme', '--app-uuid', MERCHANT.appUuid, '--path', workDir], {cwd: workDir, env}) + const init = await runCli(['app', 'init', '--app-uuid', MERCHANT.appUuid, '--path', workDir], {cwd: workDir, env}) expect(init.code).not.toBe(0) expect(init.errorText).toContain('The Reactiv tools registry changed while setting up the project; nothing was scaffolded from mixed sources. Run `reactiv app init` again.') expect(mock.requests.filter(request => request.path === '/v1/tokens')).toHaveLength(2) @@ -190,7 +190,7 @@ describe('scripted walkthrough against a mock vending API: login → app init const soon = new Date(Date.now() + 5 * 60 * 1000).toISOString() const moved = REGISTRY_URL.replace('submissions-acme/', 'submissions-acme-moved/') tokenReplies.push({status: 200, body: tokenResponse({expiresAt: soon})}, {status: 200, body: tokenResponse({registryUrl: moved})}) - const init = await runCli(['app', 'init', '--name', 'Acme', '--app-uuid', MERCHANT.appUuid, '--path', workDir], {cwd: workDir, env}) + const init = await runCli(['app', 'init', '--app-uuid', MERCHANT.appUuid, '--path', workDir], {cwd: workDir, env}) expect(init.code).not.toBe(0) expect(init.errorText).toContain('The Reactiv submissions registry changed while setting up the project; nothing was scaffolded from mixed sources.') expect(readFileSync(shim.log, 'utf8').split('\n').filter(line => line.startsWith('install '))).toEqual([]) @@ -210,7 +210,7 @@ describe('scripted walkthrough against a mock vending API: login → app init }), }, ) - const init = await runCli(['app', 'init', '--name', 'Acme', '--app-uuid', MERCHANT.appUuid, '--path', workDir], {cwd: workDir, env}) + const init = await runCli(['app', 'init', '--app-uuid', MERCHANT.appUuid, '--path', workDir], {cwd: workDir, env}) expect(init.code).not.toBe(0) expect(init.errorText).toContain('The Reactiv tools and submissions registries changed while setting up the project') }, 60_000) @@ -219,7 +219,7 @@ describe('scripted walkthrough against a mock vending API: login → app init await runCli(['login', '--with-token'], {cwd: workDir, env, input: `${API_KEY}\n`}) const project = join(workDir, 'acme') mkdirSync(project) - const init = await runCli(['app', 'init', '--name', 'Acme', '--app-uuid', MERCHANT.appUuid, '--path', workDir], { + const init = await runCli(['app', 'init', '--app-uuid', MERCHANT.appUuid, '--path', workDir], { cwd: workDir, env: {...env, FAKE_NPM_E401_ALWAYS_VERB: 'install'}, }) @@ -237,7 +237,7 @@ describe('scripted walkthrough against a mock vending API: login → app init await runCli(['login', '--with-token'], {cwd: workDir, env, input: `${API_KEY}\n`}) const project = join(workDir, 'acme') mkdirSync(project) - const init = await runCli(['app', 'init', '--name', 'Acme', '--app-uuid', MERCHANT.appUuid, '--path', workDir], { + const init = await runCli(['app', 'init', '--app-uuid', MERCHANT.appUuid, '--path', workDir], { cwd: workDir, env: {...env, FAKE_NPM_E401_ALWAYS_VERB: 'install'}, }) @@ -248,7 +248,7 @@ describe('scripted walkthrough against a mock vending API: login → app init it('refuses to scaffold for an app UUID the login is not provisioned for, before minting anything', async () => { await runCli(['login', '--with-token'], {cwd: workDir, env, input: `${API_KEY}\n`}) - const init = await runCli(['app', 'init', '--name', 'Globex', '--app-uuid', '11111111-1111-1111-1111-111111111111', '--path', workDir], {cwd: workDir, env}) + const init = await runCli(['app', 'init', '--app-uuid', '11111111-1111-1111-1111-111111111111', '--path', workDir], {cwd: workDir, env}) expect(init.code).not.toBe(0) expect(init.errorText).toContain(`is not the app your login is provisioned for (${MERCHANT.appUuid})`) expect(mock.requests.filter(request => request.path === '/v1/tokens')).toEqual([]) @@ -259,7 +259,7 @@ describe('scripted walkthrough against a mock vending API: login → app init shim = installNpmShim(workDir, buildTemplateTarball(join(workDir, 'bad'), {gitignore: 'node_modules/\n'})) env = {...env, ...shim.env} await runCli(['login', '--with-token'], {cwd: workDir, env, input: `${API_KEY}\n`}) - const init = await runCli(['app', 'init', '--name', 'Acme', '--app-uuid', MERCHANT.appUuid, '--path', workDir], {cwd: workDir, env}) + const init = await runCli(['app', 'init', '--app-uuid', MERCHANT.appUuid, '--path', workDir], {cwd: workDir, env}) expect(init.code).not.toBe(0) expect(init.errorText).toContain("the scaffold's .gitignore does not ignore .npmrc") expect(existsSync(join(workDir, 'acme'))).toBe(false) From 2af538b22ceaa9696701f853a12b85b35ead492f Mon Sep 17 00:00:00 2001 From: Anatolii Gorovyi Date: Thu, 15 Oct 2026 16:51:06 -0400 Subject: [PATCH 2/2] Accept commits GitHub creates in the web UI Updating a pull request branch from main in the GitHub UI produces a merge commit authored under the maintainer's GitHub account address and committed by GitHub's no-reply identity. The commit-message scan now knows both. Co-Authored-By: Claude Fable 5.1 --- scripts/internal-reference-allowlist.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/internal-reference-allowlist.json b/scripts/internal-reference-allowlist.json index 6df474f..30fa1ec 100644 --- a/scripts/internal-reference-allowlist.json +++ b/scripts/internal-reference-allowlist.json @@ -84,6 +84,10 @@ { "address": "support@github.com", "reason": "the Signed-off-by address Dependabot puts on its commits" + }, + { + "address": "noreply@github.com", + "reason": "the committer GitHub puts on commits it creates in the web UI, such as updating a pull request branch from main or applying a review suggestion" } ], "allowedNumbers": [], @@ -180,6 +184,10 @@ { "domain": "users.noreply.github.com", "reason": "GitHub no-reply identities" + }, + { + "domain": "reactiv.ai", + "reason": "maintainers' GitHub account addresses, used as the author on commits GitHub creates in the web UI" } ] }