fix(tracker-web): make New-Job form submissions routable to live factories

The form defaulted capabilities to "build" — a token no agent-queue factory
advertises (caps are os:* / engine:* / node:* / has:*), so every default UI
submission was unroutable and stranded in queued (queue_starvation). Default
capabilities to empty (any capable factory claims it), and replace the stale
hardcoded mac-1/mac-2 factory dropdown with the 4 live factories (lysnrai /
chronomind / mindlyst / nomgap, ids matching AQ_FACTORY_ID).

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
saravanakumardb1 2026-06-01 00:54:02 -07:00
parent b7df779e1d
commit 14e982d04f

View File

@ -68,11 +68,15 @@ const FLEET_REPOS = [
];
const FLEET_BASE_BRANCH = 'main';
// Factories set up on this machine. Selecting one routes the job to that factory's
// product (the factory polling that product claims it).
// Live factories on this host (one agent-queue daemon per product — see
// _start_fleet.sh). Selecting one routes the job to that factory's product (the
// factory polling that product claims it). The id matches the factory's
// AQ_FACTORY_ID so the labels line up with what the fleet dashboard shows.
const FLEET_FACTORIES = [
{ id: 'mac-1', label: 'mac-1 — LysnrAI (autoship + PR)', productId: 'lysnrai' },
{ id: 'mac-2', label: 'mac-2 — ChronoMind (human gate + PR)', productId: 'chronomind' },
{ id: 'mac-lysnrai', label: 'mac-lysnrai — LysnrAI', productId: 'lysnrai' },
{ id: 'mac-chronomind', label: 'mac-chronomind — ChronoMind', productId: 'chronomind' },
{ id: 'mac-mindlyst', label: 'mac-mindlyst — MindLyst', productId: 'mindlyst' },
{ id: 'mac-nomgap', label: 'mac-nomgap — NomGap', productId: 'nomgap' },
];
export default function FleetJobsPage() {
@ -88,7 +92,10 @@ export default function FleetJobsPage() {
const [factoryId, setFactoryId] = useState(FLEET_FACTORIES[0].id);
const [body, setBody] = useState('');
const [priority, setPriority] = useState<'critical' | 'high' | 'medium' | 'low'>('high');
const [caps, setCaps] = useState('build');
// Empty by default: no agent-queue factory advertises a `build` capability
// (caps are os:* / engine:* / node:* / has:*), so a non-empty default here makes
// the job unroutable. Leave blank ⇒ any capable factory for the product claims it.
const [caps, setCaps] = useState('');
const [repo, setRepo] = useState('');
const [verifyCmd, setVerifyCmd] = useState('');
const [autoMerge, setAutoMerge] = useState(false);
@ -273,6 +280,7 @@ export default function FleetJobsPage() {
id="job-caps"
value={caps}
onChange={e => setCaps(e.target.value)}
placeholder="optional — e.g. engine:devin, has:docker"
className="rounded border bg-background px-2 py-1 text-sm"
/>
</div>