feat(goose): add local v1.49 canary routing, smoke gates, and migration docs
Wire Portal and TKMind proxy to loopback Goose v1.49 via canary env blocks, with verification scripts, Phase 2/3 evidence baselines, and rollback runbooks so local upgrade stays isolated from stable 1.41 and production. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Phase 2: Memory fail-open drill for v1.49 canary profile (legacy owner).
|
||||
* Verifies resolve failures degrade without throwing when MEMORY_FAIL_OPEN=1.
|
||||
*/
|
||||
import { createMemoryV2 } from '../memory-v2.mjs';
|
||||
|
||||
const silentLogger = () => ({
|
||||
warn() {},
|
||||
info() {},
|
||||
log() {},
|
||||
});
|
||||
|
||||
async function main() {
|
||||
const memory = createMemoryV2({
|
||||
logger: silentLogger(),
|
||||
legacyMemoryService: {
|
||||
listMemories: async () => {
|
||||
throw new Error('simulated legacy resolve timeout');
|
||||
},
|
||||
},
|
||||
env: {
|
||||
MEMORY_ENABLED: '1',
|
||||
MEMORY_FAIL_OPEN: '1',
|
||||
MEMORY_BACKEND: 'legacy',
|
||||
MEMORY_VECTOR_ENABLED: '0',
|
||||
MEMORY_AGENT_INJECTION_MODE: 'off',
|
||||
},
|
||||
});
|
||||
|
||||
const status = memory.getStatus();
|
||||
if (status.backend !== 'legacy') {
|
||||
throw new Error(`expected legacy backend for v1.49 profile, got ${status.backend}`);
|
||||
}
|
||||
|
||||
const resolved = await memory.resolve({ userId: 'u-failopen', query: 'marker' });
|
||||
if (!resolved.degraded) {
|
||||
throw new Error(`expected degraded resolve, got ${JSON.stringify(resolved)}`);
|
||||
}
|
||||
if (!Array.isArray(resolved.memories) || resolved.memories.length !== 0) {
|
||||
throw new Error(`fail-open should return empty memories, got ${JSON.stringify(resolved.memories)}`);
|
||||
}
|
||||
|
||||
console.log('GOOSE_V149_MEMORY_FAILOPEN_OK: legacy resolve failure degraded without throwing');
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
console.error(`GOOSE_V149_MEMORY_FAILOPEN_FAIL: ${error.message}`);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user