# Conflicts:
#	electron/coding-runtime/pi/extensions/makelore-runtime.ts
This commit is contained in:
2026-08-31 15:06:37 +08:00
128 changed files with 8282 additions and 3026 deletions

View File

@@ -31,6 +31,7 @@ function copyPublishRuntime(context) {
const PERSISTED_USER_DATA_FILES = new Set([
'gateway-prelaunch-maintenance-cache.json',
'makelore-projects.json',
'niancode-device-identity.json',
'niancode-providers.json',
// Legacy installed-user store filename; it must never enter an artifact.

View File

@@ -678,8 +678,9 @@ export async function verifyPiProductArtifact({ projectRoot, executable }) {
if (!await pathExists(appExecutable)) throw new Error(`Product executable is missing: ${appExecutable}`);
const resourcesDirectory = packagedResourcesDirectory(appExecutable);
const runtimeRoot = join(resourcesDirectory, 'pi-runtime');
const agentServerPath = join(resourcesDirectory, 'resources', 'pi-agent-server.mjs');
const appAsar = join(resourcesDirectory, 'app.asar');
for (const required of [runtimeRoot, appAsar]) {
for (const required of [runtimeRoot, agentServerPath, appAsar]) {
if (!await pathExists(required)) throw new Error(`Product artifact resource is missing: ${required}`);
}
@@ -761,6 +762,7 @@ export async function verifyPiProductArtifact({ projectRoot, executable }) {
appAsar,
runtimeRoot,
cliPath: join(runtimeRoot, ...PI_RUNTIME_CLI_ENTRY.split('/')),
agentServerPath,
},
platform: {
platform: runtimePlatform.platform,

View File

@@ -237,7 +237,7 @@ export async function runPiReleasePerformance(options) {
{ id: 6, name: 'same-project mutation lease serialization and cancellation', evidence: ['pi-write-lease.test.ts', 'pi-worker-pool.test.ts'], result: 'pass' },
{
id: 7,
name: '4 parent + 4 child final-product pressure, interactive UI, and cleanup',
name: '4 parent threads in 1 Agent Server + 4 child process pressure, interactive UI, and cleanup',
evidence: {
samples: productProofs.length,
packagedMain: productProofs.every(({ packagedMain }) => packagedMain.appPathUsesAsar),

View File

@@ -62,12 +62,12 @@ function assertActivePressure(pressure) {
const expected = {
parentWorkers: 4,
childWorkers: 4,
parentProcesses: 4,
parentProcesses: 1,
childProcesses: 4,
liveProcesses: 8,
liveProcesses: 5,
parentProviderRequests: 4,
childProviderRequests: 4,
processBudget: 8,
processBudget: 4,
childPermits: 4,
dispatches: 4,
writeLeases: 4,
@@ -86,7 +86,7 @@ function assertActivePressure(pressure) {
writeLeases: pressure?.writeLeases?.active,
};
if (JSON.stringify(actual) !== JSON.stringify(expected)) {
throw new Error(`PI pressure did not reach 4 parent + 4 child state: ${JSON.stringify(actual)}`);
throw new Error(`PI pressure did not reach 4 parent threads + 4 child process state: ${JSON.stringify(actual)}`);
}
}
@@ -356,7 +356,7 @@ export async function runPackagedProductProof(options) {
if (extension.extension?.subagentStatus !== 'complete'
|| extension.extension?.childToolNames?.join(',') !== 'find,grep,ls,read'
|| !extension.extension?.parentToolNames?.includes('subagent')
|| extension.extension?.parentProcessIds?.length < 2
|| extension.extension?.parentProcessIds?.length !== 1
|| extension.extension?.childProcessIds?.length !== 1
|| extension.extension?.providerRequests?.child !== 1
|| extension.extension?.managedTurns?.length !== 2) {
@@ -808,7 +808,7 @@ export async function runPackagedProductProof(options) {
if (protocolFailure.resilience.terminalizationMs > 2_000) {
throw new Error(`Packaged protocol convergence exceeded 2s: ${protocolFailure.resilience.terminalizationMs}`);
}
await page.getByText('The local Agent protocol failed').waitFor({ state: 'visible', timeout: 10_000 });
await page.getByText('本地 Agent 通信异常,当前对话已停止。').waitFor({ state: 'visible', timeout: 10_000 });
const recoveredAfterProtocol = await recoverSelectedConversation(page, electronApplication);
if (JSON.stringify(recoveredAfterProtocol.resilience.providerRequests)
!== JSON.stringify(protocolFailure.resilience.status.providerRequests)) {