Repository navigation
OpenConceptLab/ocl_online#517 | Mapper settings checkpoint, runs follow the server's suggested concurrency, output language by permission, exact group names - #111
Conversation
…ow the server's suggested concurrency, output language by permission, exact group names
snyaggarwal
left a comment
There was a problem hiding this comment.
Reviewed with the sibling changes for OpenConceptLab/ocl_online#517. No blocking findings. The public app now consumes neutral checkpoint/permission/server-capacity answers and keeps the open build whole; the scheduler respects the server suggestion without raising the configured concurrency. PR checks are green.
paynejd
left a comment
There was a problem hiding this comment.
Reviewed together with OpenConceptLab/oclapi2#948 and the private PRs for OpenConceptLab/ocl_online#517. Codex pass 1 is in a separate comment.
Please change before merge
-
Leave following the suggested concurrency to OpenConceptLab/ocl_online#340, per the decision on OpenConceptLab/ocl_online#517.
- Take out the scheduler cap (
getLimitinmatchBatch.js) and the gate'ssuggestandsuggestedConcurrency(services/capacity.js), with their tests. - Keep reading and logging the headers as before.
- Keep the checkpoint, the permission and the exact group match.
There are two reasons, with details inline:
- The limiter runs in shadow mode, but oclapi2 still sends the header, and its value never goes above the default per-user limit (1–4, by tier). So runs drop below what
getMapperSettingsallows before OpenConceptLab/ocl_online#340 has calibrated those numbers. The open build changes too: with no groups config, every non-staff user is in the lowest tier, so 1 request in flight. - The suggestion is kept per server and outlives the call that set it. Codex reproduced a lexical algorithm set to 5 running one request at a time after a semantic call suggested 1.
- Take out the scheduler cap (
-
Build order for the private image.
- If the Mapper image is built before the
oclmap-pluginbranch exportsgetMapperSettings, the import is undefined and MapProject throws on load. webpack only warns at build time. - Merging OpenConceptLab/ocl_online#548 first isn't enough: a separate workflow run publishes that branch. Wait for that run, or have the Dockerfile check that the installed package exports every name the open stub exports.
- If the Mapper image is built before the
Checked
requestLimits.jsandaiVisibility.jsno longer name a group. The checkpoint's rows per request and requests in flight are applied within the form's range, and the open stub gives the full range.hasAuthGroupmatches exact names, and every remaining caller passes an exact group name.- The new permission is granted to every group that had the output-language choice before.
- Merges cleanly onto
main(637fcea). CI is green.
| const active = new Set() | ||
| let heldMs = 0 | ||
| const isHeld = () => Boolean(gate?.isPaused() && gate.pausedForMs() <= maxHoldMs - heldMs) | ||
| const getLimit = () => Math.min(concurrency, gate?.suggestedConcurrency?.() || Infinity) |
There was a problem hiding this comment.
Per the decision on OpenConceptLab/ocl_online#517, please take this cap out and leave it to OpenConceptLab/ocl_online#340. That ticket calibrates the per-user numbers first, and it covers the rerank path too, which ignores the suggestion today.
As it stands:
- Shadow mode still caps runs. oclapi2 sends
X-OCL-Capacity-Suggested-Concurrencyin shadow mode too, and the value never goes above the per-user lane (core/capacity/config.pydefaults, 1–4). So this caps runs below the project's setting while nothing is enforced. - The suggestion goes stale. The gate is one per server and keeps the last suggestion. A
$matchwith neithersemanticnorrerankerisn't gated and carries no header, so it can't refresh the suggestion; in a multi-algorithm run that's every algorithm that isn't semantic. After a semantic call suggested 1, a lexical algorithm set to 5 runs one request at a time.
|
Codex review, pass 1 (codex-cli 0.163.0, commit ce79acb) Verdict: findings. 1 finding(s).
findings.json{
"reviewer": "codex-cli 0.163.0",
"perspective": "defects",
"mode": "full",
"commit": "ce79acb52c9c6099e1297c6f8e00ff7cfe2b1dc9",
"verdict": "findings",
"prior": [],
"findings": [
{
"id": "F1.1",
"severity": "P1",
"tag": null,
"file": "src/components/map-projects/matchBatch.js",
"line": 124,
"claim": "The new cap applies a heavy-request concurrency suggestion to subsequent lexical-only matching.",
"scenario": "A semantic or rerank response suggests concurrency 1, which is retained in the origin-wide gate. A subsequent multi-algorithm run sends lexical batches with semantic=false and reranker=false. oclapi2 deliberately excludes these requests from capacity limiting and sends no capacity headers, so they cannot replace the retained suggestion. The entire lexical phase runs serially despite configured concurrency 5. Reproduced with the actual scheduler: maximum concurrency was 1 with the retained suggestion and 5 with a fresh gate.",
"action": "Scope concurrency suggestions to requests covered by the corresponding capacity policy, while preserving shared 429 pauses. Add a regression covering a heavy response followed by lexical-only batches without capacity headers.",
"lines_delta": null,
"confidence": "high"
}
]
} |
OpenConceptLab/ocl_online#517
What changes
getMapperSettings(user)is added to the@openconceptlab/oclmap-extensionsstub (autoMatchCheck.js). It returns the most rows per request and requests in flight the form allows. The open stub returns the form's full range (1000 × 50), so the open build behaves as before.requestLimits.jsno longer reads groups: it applies whatever the checkpoint returns, and a saved project runs within it.services/capacity.js) keeps the latestX-OCL-Capacity-Suggested-Concurrency, and the Auto Match scheduler (matchBatch.js) runs no more requests than it. A suggestion only lowers a run, never raises it above the project's setting. A suggestion of 0 counts as 1, since that lane's 429s already pause the gate.users.mapper_ai_output_locale, choose the OCL AI Assistant's output language (aiVisibility.js). The group checks are gone.hasAuthGroupmatches a group's exact name, never a group whose name contains it. The unusedcanSwitchServeris removed, since it relied on the substring match.Related PRs
mapper_ai_output_localepermission, and the capacity tier from the groups configMerge order
getMapperSettings, so the installed package must export it.Testing
npm test: 563 pass.eslint src: clean.🤖 Generated with Claude Code