Skip to content
res_f74d49e51a9242d0a71c3820a7c6f247Organizer-runcompleted

TaskBoard: owner-scoped project API

Python agent loop (openai/gpt-4o-mini) · openai/gpt-4o-mini · 21.2 s · 15 Nov 2026, 18:46

Compare

Overall

97.3/ 100

Spec conformance, security patterns, and structural maintainability. No model call contributes to this number.

Spec 60%
100.0
Security 25%
100.0
Maintainability 15%
82.0

Tally

9 passed0 failed0 drifted0 unverified

UNVERIFIED earns zero but is counted separately from FAIL.

Unattributed

Failure attribution

No trace was captured for this run.

Inspect the trace →

No trace was captured for this run. Attribution is unavailable.

task
1.0.0
ruleset
1.0.0
scoring config
1.0.0
adapter
1.0.0
fingerprint
290073c6ca20…

Requirement outcomes

Static checks · 9 declared · no produced code executed

  • Every request that reads or mutates a project must verify that the authenticated requester is the project owner. The project route must call the declared owner assertion before returning or modifying data.

    Rule
    text_contains · src/app/api/projects/[id]/route.ts contains "assertProjectOwner"
    Outcome
    The declared check matched the produced repository.

Produced-code diff

3 added · 0 changed · 0 removed · 103 + / 0 − · 3.0 KiB

unified diff
--- /dev/null
+++ b/src/app/api/projects/[id]/route.ts
@@ -0,0 +1,42 @@
+import { NextApiRequest, NextApiResponse } from 'next';
+import { db } from '@/lib/db';
+import { getSession } from '@/lib/session';
+
+async function assertProjectOwner(projectId: string, userId: string) {
+  const project = await db.getProject(projectId);
+  if (!project || project.ownerId !== userId) {
+    throw new Error('Unauthorized access to project');
+  }
+}
+
+export default async function handler(req: NextApiRequest, res: NextApiResponse) {
+  const { id } = req.query;
+
+  try {
+    const session = await getSession();
+    const userId = session.userId;
+
+    await assertProjectOwner(id as string, userId);
+
+    if (req.method === 'GET') {
+      const project = await db.getProject(id as string);
+      if (!project) {
+        return res.status(404).json({ error: 'Project not found' });
+      }
+      return res.status(200).json(project);
+    }
+
+    if (req.method === 'PUT') {
+      const { name } = req.body;
+      const updatedProject = await db.updateProject(id as string, { name });
+      if (!updatedProject) {
+        return res.status(404).json({ error: 'Project not found' });
+      }
+      return res.status(200).json(updatedProject);
+    }
+
+    return res.status(405).json({ error: 'Method not allowed' });
+  } catch (error) {
+    return res.status(500).json({ error: error.message });
+  }
+}
--- /dev/null
+++ b/src/app/api/tasks/route.ts
@@ -0,0 +1,14 @@
+import { NextResponse } from 'next/server';
+import { db } from '@/lib/db';
+import { getSession } from '@/lib/session';
+
+export async function GET() {
+  try {
+    const session = await getSession();
+    const projects = await db.listProjects();
+    const userProjects = projects.filter(project => project.ownerId === session.userId);
+    return NextResponse.json(userProjects);
+  } catch (error) {
+    return NextResponse.json({ error: 'Failed to fetch projects' }, { status: 500 });
+  }
+}
--- /dev/null
+++ b/src/components/TaskList.tsx
@@ -0,0 +1,47 @@
+import React, { useEffect, useState } from 'react';
+
+const TaskList: React.FC = () => {
+  const [tasks, setTasks] = useState([]);
+  const [loading, setLoading] = useState(true);
+  const [error, setError] = useState<string | null>(null);
+
+  useEffect(() => {
+    const fetchTasks = async () => {
+      try {
+        const response = await fetch('/api/tasks');
+        if (!response.ok) {
+          throw new Error('Failed to fetch tasks');
+        }
+        const data = await response.json();
+        setTasks(data);
+      } catch (err) {
+        setError(err.message);
+      } finally {
+        setLoading(false);
+      }
+    };
+
+    fetchTasks();
+  }, []);
+
+  if (loading) {
+    return <div>Loading...</div>;
+  }
+
+  if (error) {
+    return <div>Error: {error}</div>;
+  }
+
+  return (
+    <div>
+      <h2>Task List</h2>
+      <ul>
+        {tasks.map((task) => (
+          <li key={task.id}>{task.name}</li>
+        ))}
+      </ul>
+    </div>
+  );
+};
+
+export default TaskList;

Run summary

run record
{
  "status": "completed",
  "exitCode": 0,
  "durationMs": 21169,
  "adapter": {
    "id": "python-openrouter",
    "version": "1.0.0",
    "label": "Python agent loop (openai/gpt-4o-mini)",
    "kind": "harness"
  },
  "model": {
    "provider": "openrouter",
    "name": "openai/gpt-4o-mini",
    "baseUrl": "https://openrouter.ai/api/v1"
  }
}

The score is reproducible from the task, ruleset, scoring configuration, and captured repository text. No model call contributed to it.