paired: disable latest owner final carry-forward by default

This commit is contained in:
ejclaw
2026-04-22 05:51:43 +09:00
parent 8fff703f84
commit 1122ace363
6 changed files with 27 additions and 8 deletions

View File

@@ -29,6 +29,7 @@ describe('config/env loading', () => {
delete process.env.DISCORD_CODEX_MAIN_BOT_TOKEN;
delete process.env.DISCORD_REVIEW_BOT_TOKEN;
delete process.env.DISCORD_CODEX_REVIEW_BOT_TOKEN;
delete process.env.PAIRED_CARRY_FORWARD_LATEST_OWNER_FINAL;
delete process.env.SESSION_COMMAND_USER_IDS;
vi.resetModules();
});
@@ -102,6 +103,16 @@ describe('config/env loading', () => {
expect(config.TIMEZONE).toBe('UTC');
});
it('defaults latest-owner-final carry-forward to disabled and honors explicit opt-in', async () => {
let config = await import('./config.js');
expect(config.PAIRED_CARRY_FORWARD_LATEST_OWNER_FINAL).toBe(false);
vi.resetModules();
process.env.PAIRED_CARRY_FORWARD_LATEST_OWNER_FINAL = 'true';
config = await import('./config.js');
expect(config.PAIRED_CARRY_FORWARD_LATEST_OWNER_FINAL).toBe(true);
});
it('fails fast when a legacy Discord token alias is configured', async () => {
process.env.DISCORD_BOT_TOKEN = 'legacy-owner-token';