You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Placement P2 follow-ups for P4/P5 (from the #798 review) #805
Follow-ups left after the fix round on #798 (review: #798 (comment)). None of them belong in P2 (settings only); each is work for a later placement row.
P5 (placement P5: pure rule engine, hard rules H1 to H9 and upstream's rank #787) must read needs through readPlacementNeeds.placementNeeds (server and project) is now labels | { unreadable, problem }. A broken value fits no machine; readPlacementNeeds gives { fits: "none", reason } with the plain reason. P5 must not treat a broken value as [].
Merge the two label functions. P2's canonicalPlacementLabels (packages/contracts/src/placement.ts) and P5's canonicalLabels (packages/shared/src/forkPlacement.ts) do the same thing: trim, lower-case, drop blanks and repeats. Keep one when both are in. P5's comment "P2 stores labels in this form" is now true.
P4 runner, factsCommand. Before running it, re-check the path on the runner's own host (isPlaytestProgramFullyQualified with its platform). A hand edit can skip the server's checks, so treat a path it cannot run as "not available". Spawn the path with no shell and no argument splitting, because spaces are legal in the path.
Threat notes for P4+ (review minor 8). "Person-only" covers T3 tool inputs only. An agent with a shell can still edit the settings file or call the settings RPC, the same as for modelPolicy. This is in docs/fork/README.md now; state it in the P4+ threat notes too, since placement decides where work runs.
Small: a wrong-OS factsCommand is kept in its read form. It is not kept byte for byte: missing fields get their defaults filled in, e.g. weights: {}. The value stays stable across saves (no growth). Keep the raw text if the load ever gets access to it.
Note for P4 and P5 (from #798): the settings load does not check placement.factsCommand against the server's OS. Placement code must read placement through readPlacementForThisOs (apps/server/src/fork/placementRead.ts), never settings.placement directly; a path this OS cannot run then reads as off, with its problem. P4's runner must also check the path again on the host that runs it, and treat one it cannot run as "not available".
Activity
scuttletoby commentedon Nov 21, 2026
Note for P4 and P5 (from #798): the settings load does not check
placement.factsCommandagainst the server's OS. Placement code must readplacementthroughreadPlacementForThisOs(apps/server/src/fork/placementRead.ts), neversettings.placementdirectly; a path this OS cannot run then reads as off, with its problem. P4's runner must also check the path again on the host that runs it, and treat one it cannot run as "not available".placement: decode forwarded facts, here fallback, needs reader, facts…
placement: decode forwarded facts, here fallback, needs reader, facts…
placement: decode forwarded facts, here fallback, needs reader, facts…