From 1534821f505fee72743b9431640df1a489dd047e Mon Sep 17 00:00:00 2001 From: notgitika Date: Wed, 24 Jun 2026 12:38:28 -0400 Subject: [PATCH] fix(config-bundle): ungate custom branchName feature --- integ-tests/add-remove-config-bundle.test.ts | 4 +--- src/cli/commands/config-bundle/command.tsx | 4 +--- src/cli/primitives/ConfigBundlePrimitive.ts | 11 ++--------- .../__tests__/useAddConfigBundleWizard.test.tsx | 7 ++----- .../screens/config-bundle/useAddConfigBundleWizard.ts | 7 +------ 5 files changed, 7 insertions(+), 26 deletions(-) diff --git a/integ-tests/add-remove-config-bundle.test.ts b/integ-tests/add-remove-config-bundle.test.ts index 98c7d07a5..c6c37c257 100644 --- a/integ-tests/add-remove-config-bundle.test.ts +++ b/integ-tests/add-remove-config-bundle.test.ts @@ -109,9 +109,7 @@ describe('integration: add and remove config-bundle', () => { const bundle = config.configBundles.find(b => b.name === 'FullOptsBundle'); expect(bundle).toBeDefined(); expect(bundle!.description).toBe('A bundle with all optional fields'); - // --branch is gated behind ENABLE_GATED_FEATURES; when off, silently defaults to mainline - const expectedBranch = process.env.ENABLE_GATED_FEATURES === '1' ? 'feature-branch' : 'mainline'; - expect(bundle!.branchName).toBe(expectedBranch); + expect(bundle!.branchName).toBe('feature-branch'); expect(bundle!.commitMessage).toBe('initial config'); }); diff --git a/src/cli/commands/config-bundle/command.tsx b/src/cli/commands/config-bundle/command.tsx index 1fd118985..ca0a5997c 100644 --- a/src/cli/commands/config-bundle/command.tsx +++ b/src/cli/commands/config-bundle/command.tsx @@ -8,7 +8,6 @@ import type { ListConfigurationBundleVersionsFilter, } from '../../aws/agentcore-config-bundles'; import { getErrorMessage } from '../../errors'; -import { isGatedFeaturesEnabled } from '../../feature-flags'; import { deepDiff } from '../../operations/config-bundle/diff-versions'; import { resolveBundleByName } from '../../operations/config-bundle/resolve-bundle'; import { requireProject } from '../../tui/guards'; @@ -259,8 +258,7 @@ export const registerConfigBundle = (program: Command) => { } }); - // --- create-branch: gated until upstream CFN read-back bug is fixed for non-default branches --- - if (!isGatedFeaturesEnabled()) return cmd; + // --- create-branch --- cmd .command('create-branch') .description('Create a new branch on an existing configuration bundle') diff --git a/src/cli/primitives/ConfigBundlePrimitive.ts b/src/cli/primitives/ConfigBundlePrimitive.ts index 64e889447..2e41a3432 100644 --- a/src/cli/primitives/ConfigBundlePrimitive.ts +++ b/src/cli/primitives/ConfigBundlePrimitive.ts @@ -3,11 +3,9 @@ import type { Result } from '../../lib/result'; import type { ConfigBundle } from '../../schema'; import { ConfigBundleSchema } from '../../schema'; import { getErrorMessage } from '../errors'; -import { isGatedFeaturesEnabled } from '../feature-flags'; import type { RemovalPreview, SchemaChange } from '../operations/remove/types'; import { BasePrimitive } from './BasePrimitive'; import type { AddResult, AddScreenComponent, RemovableResource } from './types'; -import { Option } from '@commander-js/extra-typings'; import type { Command } from '@commander-js/extra-typings'; import { readFileSync } from 'fs'; @@ -116,12 +114,7 @@ export class ConfigBundlePrimitive extends BasePrimitive}}, {{gateway:}}. Placeholders resolve to real ARNs at deploy time.' ) .option('--components-file ', 'Path to components JSON file (same format as --components)') - // Gated: custom branches blocked by upstream CFN read-back bug. Remove gate when service fixes GetConfigurationBundle. - .addOption( - isGatedFeaturesEnabled() - ? new Option('--branch ', 'Branch name for versioning') - : new Option('--branch ', 'Branch name for versioning').hideHelp() - ) + .option('--branch ', 'Branch name for versioning') .option('--commit-message ', 'Commit message for this version') .option('--json', 'Output as JSON') .action( @@ -173,7 +166,7 @@ export class ConfigBundlePrimitive extends BasePrimitive ref.current!.wizard.doneAddingComponents()); - // When ENABLE_GATED_FEATURES is off, branchName is skipped (defaults to mainline) - const expectedStep = process.env.ENABLE_GATED_FEATURES === '1' ? 'branchName' : 'commitMessage'; - expect(ref.current!.wizard.step).toBe(expectedStep); + expect(ref.current!.wizard.step).toBe('branchName'); // Back from the current step follows the linear order, not the loop guard. act(() => ref.current!.wizard.goBack()); - const expectedBackStep = process.env.ENABLE_GATED_FEATURES === '1' ? 'addAnother' : 'branchName'; - expect(ref.current!.wizard.step).toBe(expectedBackStep); + expect(ref.current!.wizard.step).toBe('addAnother'); }); it('first-pass back-navigation is unaffected (componentType → description)', () => { diff --git a/src/cli/tui/screens/config-bundle/useAddConfigBundleWizard.ts b/src/cli/tui/screens/config-bundle/useAddConfigBundleWizard.ts index 96411db2f..ecc8eb7f0 100644 --- a/src/cli/tui/screens/config-bundle/useAddConfigBundleWizard.ts +++ b/src/cli/tui/screens/config-bundle/useAddConfigBundleWizard.ts @@ -1,5 +1,4 @@ import type { ComponentConfigurationMap } from '../../../../schema'; -import { isGatedFeaturesEnabled } from '../../../feature-flags'; import type { AddConfigBundleConfig, AddConfigBundleStep, ComponentType } from './types'; import { useCallback, useState } from 'react'; @@ -103,11 +102,7 @@ export function useAddConfigBundleWizard() { const doneAddingComponents = useCallback(() => { setInAddAnotherLoop(false); - if (isGatedFeaturesEnabled()) { - setStep('branchName'); - } else { - setStep('commitMessage'); - } + setStep('branchName'); }, []); const setBranchName = useCallback((branchName: string) => {