test: strengthen deployment verification

This commit is contained in:
Yahya Alhinai
2026-06-28 02:54:16 +00:00
parent 702026fbd4
commit 7497318cde
10 changed files with 288 additions and 32 deletions
+7 -1
View File
@@ -4,7 +4,12 @@ import { DATA_TOPIC } from '@podman/shared';
import { analyzeFrame } from '../vision/gemini.js';
import { detectCollisions } from '../collision/detector.js';
import { getGithubState } from '../github/client.js';
import { recordObservation, recordCollision, recordIntervention } from '../memory/store.js';
import {
recordObservation,
recordCollision,
recordIntervention,
updateInterventionStatus,
} from '../memory/store.js';
import { getGitStates } from '../memory/db.js';
import { recallSimilar } from '../memory/vectors.js';
import { shouldIntervene, preferredAction } from '../memory/policy.js';
@@ -30,6 +35,7 @@ export class PodMan {
if (c)
c.hasUnpushedChanges = msg.report.unpushedCount > 0 || msg.report.dirtyFiles.length > 0;
}
if (msg.type === 'ACK') void updateInterventionStatus(msg.interventionId, msg.status);
} catch {
/* ignore malformed */
}
+16 -1
View File
@@ -1,4 +1,10 @@
import type { EngineerContext, Collision, Intervention, InterventionOutcome } from '@podman/shared';
import type {
EngineerContext,
Collision,
Intervention,
InterventionOutcome,
InterventionStatus,
} from '@podman/shared';
import { collections } from './db.js';
import { enrichCollisionMemory } from './vectors.js';
@@ -33,6 +39,15 @@ export async function recordIntervention(intervention: Intervention): Promise<vo
);
}
export async function updateInterventionStatus(
interventionId: string,
status: InterventionStatus,
): Promise<void> {
await persist('intervention ack', async () =>
(await collections()).interventions.updateOne({ id: interventionId }, { $set: { status } }),
);
}
export async function recordOutcome(outcome: InterventionOutcome): Promise<void> {
await persist('outcome', async () => {
const c = await collections();