fix: close PI-140 cutover gaps

Back up unknown legacy Agents, reconnect settled Conversation observation, remove remaining active repository residue, and restore the bundled Python verifier import.
This commit is contained in:
2026-08-24 12:47:16 +08:00
parent 5a275b93a7
commit 7a15b1b49c
12 changed files with 286 additions and 247 deletions

View File

@@ -1,10 +1,12 @@
import {
copyFile,
mkdir,
readdir,
readFile,
rm,
unlink,
} from 'node:fs/promises';
import type { Dirent } from 'node:fs';
import path from 'node:path';
import type { ProductModelRef } from '../coding-runtime/contracts';
import {
@@ -93,12 +95,22 @@ async function snapshotLegacyAgentFiles(
path.basename(entry.relativePath),
entry.content,
]));
let entries: Dirent[];
try {
entries = await readdir(agentDirectory, { withFileTypes: true });
} catch (error) {
if (isMissing(error)) return [];
throw error;
}
const snapshots: AgentFileSnapshot[] = [];
for (const [fileName, expectedContent] of expected) {
for (const entry of entries
.filter((candidate) => candidate.isFile())
.sort((left, right) => left.name.localeCompare(right.name))) {
const fileName = entry.name;
const filePath = path.join(agentDirectory, fileName);
const content = await readOptionalText(filePath);
if (content === null) continue;
const generated = expectedContent === content;
const generated = expected.get(fileName) === content;
if (generated) {
snapshots.push({ fileName, filePath, content, generated });
continue;