fix(evals): bind hosted controller admission to the first attempt (#17523)

Bind hosted controller admission to the repository, GitHub run, first attempt, workflow revision and selected execution before credential reads or provider launch. Keep offline evidence replay independent of the current worker environment. Preserve the single-project boundary editor and refresh project-access data with agent-detail updates.

Verified head: 1e588f75fe.
Validation: 74 synthetic source/portable controller tests, 98 focused UI tests and token gates passed before the ancestry-only final sync; four hosted/portable regressions pass again with unchanged eval and UI repair trees. Final exact-head full CI passed (40387856225), and Greptile reviewed this head at 5/5 with zero unresolved findings. The optional secondary Paperclip Review is paused and not counted as completed. No paid work or schedule changes.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip authored and GitHub committed 2026-10-26 14:43:58 -05:00
1 parent 9ae4c25e7e
commit 507dc70be2
10 files changed
+160 -9

No files matched your search

+18 -1
View File
@@ -11,7 +11,7 @@ import { TooltipProvider } from "@/components/ui/tooltip";
let root: Root | null = null;
let container: HTMLDivElement | null = null;
function renderSection(permissions: Partial<AgentPermissions>) {
function renderSection(permissions: Partial<AgentPermissions>, withProjectEditor = false) {
container = document.createElement("div");
document.body.appendChild(container);
const onChange = vi.fn();
@@ -21,6 +21,7 @@ function renderSection(permissions: Partial<AgentPermissions>) {
createdRoot.render(
<TooltipProvider>
<TrustPresetSection
projectAccessEditor={withProjectEditor ? <div>Allowed projects</div> : undefined}
permissions={permissions}
onChange={onChange}
companyId="company-1"
@@ -72,6 +73,22 @@ describe("TrustPresetSection", () => {
expect(view.text()).not.toContain("Managed by EE/API");
});
it("keeps the single-boundary controls when the allowed-project editor is present", () => {
const view = renderSection({ trustPreset: "low_trust_review", authorizationPolicy: {
trustPreset: "low_trust_review", trustBoundary: {
mode: "low_trust_review", companyId: "company-1", projectIds: ["project-1"],
},
} }, true);
expect(view.text()).toContain("Allowed projects");
expect(view.text()).toContain("Boundary type");
const clear = [...container!.querySelectorAll("button")].find(button => button.textContent === "Clear boundary");
expect(clear).toBeDefined();
flushSync(() => clear!.click());
const changed = view.onChange.mock.calls[0][0];
expect(changed.trustPreset).toBe("low_trust_review");
expect(changed.authorizationPolicy.trustBoundary.projectIds).toBeUndefined();
});
it("renders multi-boundary policies as read-only", () => {
const view = renderSection({
canCreateAgents: false,
+1 -1
View File
@@ -150,7 +150,7 @@ export function TrustPresetSection({
: "This agent is set to low-trust review, but no project, root issue, or issue scope is set in the core policy. Add a scope before this agent can run without denial."}
</p>
</div>
{projectAccessEditor && (boundary?.projectIds?.length ?? 0) > 0 ? null : boundaryEditable ? (
{projectAccessEditor && (boundary?.projectIds?.length ?? 0) > 1 ? null : boundaryEditable ? (
<div className="rounded-md border border-border/70 bg-background/70 p-3 text-foreground space-y-3">
<div className="grid gap-3 sm:grid-cols-(--gtc-12)">
<Field label="Boundary type">