Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
330f0c2
[Feat] Add persisted environment verification state
roomote Jul 15, 2026
2437b64
[Fix] Prevent concurrency races in environment verification registrat…
roomote Jul 15, 2026
1d074af
[Fix] Use pg_advisory_xact_lock for verification retry lock
roomote Jul 15, 2026
7f62452
Fix onboarding completion before setup finishes
brunobergher Jul 15, 2026
e5126bd
[Fix] Block retry verification while initial onboarding verification …
roomote Jul 15, 2026
b31e143
Handle env var follow-up reconnect failures
brunobergher Jul 15, 2026
7d1c359
[Fix] Claim verification attempt before run becomes eligible; persist…
roomote Jul 15, 2026
02f4599
Merge remote-tracking branch 'origin/develop' into feat/environment-v…
roomote Jul 15, 2026
a832748
[Fix] Commit verification attempt claim atomically with run creation
roomote Jul 15, 2026
eb3f067
fallback
brunobergher Jul 15, 2026
255f8ef
Clarify task session load failures
brunobergher Jul 15, 2026
da874c6
Handle paused environment setup sessions
brunobergher Jul 15, 2026
9f90fd6
Remove environment setup task panel
brunobergher Jul 15, 2026
411ab36
Keep paused setup tasks interactive
brunobergher Jul 15, 2026
8ab1e9a
Fix preview proxy dev logger crash
brunobergher Jul 15, 2026
040bbe7
Improvements to environment display in settings
brunobergher Jul 15, 2026
754badc
final fixes
brunobergher Jul 15, 2026
f3209af
fix: remove unused error fallback import
brunobergher Jul 15, 2026
46e013c
test: update connection banner icon mock
brunobergher Jul 15, 2026
69633e3
test: mock environment verification icons
brunobergher Jul 15, 2026
6efe153
fix: address environment verification review feedback
brunobergher Jul 15, 2026
7526259
Merge remote-tracking branch 'origin/develop' into feat/environment-v…
brunobergher Jul 15, 2026
5f666c9
fix: complete verification feedback follow-ups
brunobergher Jul 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/environment-verification-state.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@roomote/web": minor
---

Environments now track a persisted verification state that is separate from "a definition exists". A new environment is Configured until a follow-up verification task confirms it works, then it becomes Verified; runtime-affecting edits reset it to Configured while name/description-only edits keep it verified. Onboarding can finish while verification runs, the Environments settings page shows the verification status with a Retry verification action and a link to the related task, and agents record the outcome through the new `manage_environments` `record_verification` action.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions apps/api/src/handlers/environments/createEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,32 @@ export async function attachEnvironmentIdToTaskRun(
.where(eq(taskRuns.id, taskRun.id));
}

/**
* Resolve the calling task run's Roomote task id, if the write is driven by a
* run-token task. Used to atomically register that task as the current
* verification attempt for the environment it just created or applied a
* runtime-affecting update to. The environment-setup skill runs verification
* from this same setup task and records the outcome through
* `record_verification`; registering the caller's taskId means that recording
* matches server-side without the agent having to hand-pass any task id.
*/
export async function resolveCallingVerificationTaskId(
auth: McpAuth,
): Promise<string | undefined> {
const runId = extractRunId(auth);

if (!runId) {
return undefined;
}

const taskRun = await db.query.taskRuns.findFirst({
where: eq(taskRuns.id, runId),
columns: { taskId: true },
});

return taskRun?.taskId ?? undefined;
}

/**
* POST /api/mcp/environments
*
Expand Down Expand Up @@ -266,6 +292,8 @@ export async function createEnvironment(
return c.json({ error: missingRepositoryError }, 400);
}

const verificationTaskId = await resolveCallingVerificationTaskId(auth);

const created = await db.transaction(async (tx) => {
const inserted = await tx
.insert(environments)
Expand All @@ -275,6 +303,13 @@ export async function createEnvironment(
name: config.name,
description: config.description,
config,
// New environments start configured but not yet verified. A
// follow-up verification task confirms the runtime works. Registering
// the calling task here means its record_verification matches
// server-side without the agent hand-passing a task id.
isVerified: false,
verificationTaskId: verificationTaskId ?? null,
verificationError: null,
})
.returning({ id: environments.id });

Expand Down
2 changes: 2 additions & 0 deletions apps/api/src/handlers/environments/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import { createEnvironment } from './createEnvironment';
import { getEnvironment } from './getEnvironment';
import { updateEnvironment } from './updateEnvironment';
import { listEnvironments } from './listEnvironments';
import { recordVerification } from './recordVerification';

export const environmentsRouter = new Hono<{ Variables: Variables }>();

environmentsRouter.post('/', createEnvironment);
environmentsRouter.patch('/:id', updateEnvironment);
environmentsRouter.post('/:id/verification', recordVerification);
environmentsRouter.get('/:id', getEnvironment);
environmentsRouter.get('/', listEnvironments);
Loading
Loading