合并 master:resume 入口与 ProjectDevelopmentView 各留双方新增
两处冲突都是双方各自新增、互不相干: - recovery_scan.rs:master 在 resume 入口加了 recover_direct_taonier_regeneration_workflow_at(硬 `?`),分支加了策划 GDD 审批投影恢复(分三路容错、不硬传播)。都留;master 那句放前面, 保持它原有语义不受分支块影响。 - WorkspaceLauncher.tsx:master 的 walletEntry 与分支的 planningStartMode 是同一个 JSX 元素上两个独立 prop,都留。 typecheck 干净,eslint rc=0,cargo check --all-targets 通过, appSurface 421/421,分支自有过滤器(plan_envelope_repair_tests 4、 native_agent_delegate 9、prompt::tests 32)全绿。clarification 仍是本机 既有的 1 条锁超时基线失败。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,83 @@
|
||||
import { spawn } from 'node:child_process';
|
||||
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import {
|
||||
parseProcedureOutput,
|
||||
parseSqlRows,
|
||||
sanitizeDiagnostic,
|
||||
stopStandalone,
|
||||
} from './spacetime-editor-idempotency-smoke.mjs';
|
||||
|
||||
describe('SpacetimeDB editor idempotency smoke parsers', () => {
|
||||
it('parses successful and failed procedure SATS results', () => {
|
||||
expect(
|
||||
parseProcedureOutput(
|
||||
'[true,[0,["project-a","owner-a"]],[1,[]]]',
|
||||
'create_editor_project_and_return',
|
||||
),
|
||||
).toEqual({
|
||||
ok: true,
|
||||
record: ['project-a', 'owner-a'],
|
||||
errorMessage: null,
|
||||
});
|
||||
expect(
|
||||
parseProcedureOutput(
|
||||
'[false,[1,[]],[0,"幂等创建冲突"]]',
|
||||
'create_editor_project_and_return',
|
||||
),
|
||||
).toEqual({
|
||||
ok: false,
|
||||
record: null,
|
||||
errorMessage: '幂等创建冲突',
|
||||
});
|
||||
expect(
|
||||
parseProcedureOutput(
|
||||
'[true,[1,[]],[0,["receipt-owner",[],[]]],[1,[]]]',
|
||||
'delete_editor_asset_folder_and_return',
|
||||
),
|
||||
).toEqual({
|
||||
ok: true,
|
||||
record: ['receipt-owner', [], []],
|
||||
errorMessage: null,
|
||||
});
|
||||
});
|
||||
|
||||
it('parses only the rows from one JSON SQL statement', () => {
|
||||
const stdout = JSON.stringify([
|
||||
{
|
||||
schema: { elements: [{ name: 'project_id' }] },
|
||||
rows: [['project-a'], ['project-b']],
|
||||
total_duration_micros: 12,
|
||||
},
|
||||
]);
|
||||
|
||||
expect(parseSqlRows(stdout, 'projects')).toEqual([
|
||||
['project-a'],
|
||||
['project-b'],
|
||||
]);
|
||||
expect(() => parseSqlRows('[]', 'projects')).toThrow(
|
||||
'invalid result shape',
|
||||
);
|
||||
});
|
||||
|
||||
it('redacts an isolated CLI token from diagnostics', () => {
|
||||
expect(sanitizeDiagnostic('failed token-private', ['token-private'])).toBe(
|
||||
'failed [redacted]',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('SpacetimeDB editor idempotency smoke cleanup', () => {
|
||||
it('terminates a live standalone-shaped child process', async () => {
|
||||
const child = spawn(
|
||||
process.execPath,
|
||||
['-e', 'setInterval(() => {}, 1000)'],
|
||||
{ stdio: 'ignore' },
|
||||
);
|
||||
|
||||
await stopStandalone(child);
|
||||
|
||||
expect(child.exitCode !== null || child.signalCode !== null).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user