deploy(ai-discovery): add safe existing-service update path
This commit is contained in:
parent
7c3c8e9238
commit
2739104088
14 changed files with 427 additions and 26 deletions
|
|
@ -32,10 +32,10 @@ test("only an immutable deployment intent creates a resident-agent event", () =>
|
|||
const queue = fs.mkdtempSync(path.join(os.tmpdir(), "lake-lamp-deploy-events-"));
|
||||
const sha = "a".repeat(40), push = { repo: "bingshuo/guanghu-ice-heart", branch: "main", commit_sha: sha };
|
||||
try {
|
||||
const queued = enqueueDeploymentEvent({ schema: "guanghu.deployment-intent/v1", repo: push.repo, branch: "main", commit_sha: sha, resource: `GLS-0239-DEPLOY@${sha}`, manifest: "deployment/requests/GLS-0239.json", workorder_id: "order-1" }, push, queue);
|
||||
const queued = enqueueDeploymentEvent({ schema: "guanghu.deployment-intent/v1", repo: push.repo, branch: "main", commit_sha: sha, resource: `GLS-0239-DEPLOY@${sha}`, manifest: "deployment/requests/GLS-0239-DEPLOY.json", workorder_id: "order-1" }, push, queue);
|
||||
assert.equal(queued.state, "queued_for_resident_agent");
|
||||
assert.equal(fs.readdirSync(queue).length, 1);
|
||||
assert.equal(enqueueDeploymentEvent({ schema: "guanghu.deployment-intent/v1", repo: push.repo, branch: "main", commit_sha: sha, resource: `GLS-0239-DEPLOY@${"b".repeat(40)}`, manifest: "deployment/requests/GLS-0239.json" }, push, queue).diagnostic_code, "deployment_intent_resource_invalid");
|
||||
assert.equal(enqueueDeploymentEvent({ schema: "guanghu.deployment-intent/v1", repo: push.repo, branch: "main", commit_sha: sha, resource: `GLS-0239-DEPLOY@${"b".repeat(40)}`, manifest: "deployment/requests/GLS-0239-DEPLOY.json" }, push, queue).diagnostic_code, "deployment_intent_resource_invalid");
|
||||
} finally { fs.rmSync(queue, { recursive: true, force: true }); }
|
||||
});
|
||||
test("team personas cannot dispatch Ice Shuo personal source", () => {
|
||||
|
|
@ -48,7 +48,7 @@ test("team personas cannot dispatch Ice Shuo personal source", () => {
|
|||
branch: push.branch,
|
||||
commit_sha: sha,
|
||||
resource: `HLP-PERSONAL-DEPLOY@${sha}`,
|
||||
manifest: "deployment/requests/HLP-PERSONAL.json",
|
||||
manifest: "deployment/requests/HLP-PERSONAL-DEPLOY.json",
|
||||
deployment_source: personalSource,
|
||||
};
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue