Skip to content

OpenConceptLab/ocl_online#517 | Mapper settings checkpoint, output language by permission, exact group names - #111

Merged
snyaggarwal merged 2 commits into
mainfrom
ocl_online#517
Oct 22, 2026
Merged

snyaggarwal merged 2 commits into
mainfrom
ocl_online#517

Conversation

@snyaggarwal

@snyaggarwal snyaggarwal commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

OpenConceptLab/ocl_online#517

What changes

  • Request settings come from a checkpoint. getMapperSettings(user) is added to the @openconceptlab/oclmap-extensions stub (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.js no longer reads groups: it applies whatever the checkpoint returns, and a saved project runs within it.
  • The server's suggested concurrency is still only read and logged. Following X-OCL-Capacity-Suggested-Concurrency is left to OpenConceptLab/ocl_online#340, which calibrates the per-user numbers first and covers reranks too.
  • Output language is a permission. Staff, and users with users.mapper_ai_output_locale, choose the OCL AI Assistant's output language (aiVisibility.js). The group checks are gone.
  • Exact group names. hasAuthGroup matches a group's exact name, never a group whose name contains it. The unused canSwitchServer is removed, since it relied on the substring match.

Related PRs

Merge order

  1. OpenConceptLab/oclinfrastructure#20, then OpenConceptLab/ocl_online#517 | capacity tier per group from the groups config, output language permission oclapi2#948, so the permission exists and is granted before this ships.
  2. OpenConceptLab/ocl_online#548, then wait for the Publish oclmap-plugin branch run: the deploy image calls getMapperSettings, so the installed package must export it, or MapProject throws on load.
  3. This PR. Check that the build log shows the new plugin commit.

Testing

  • npm test: 558 pass. eslint: clean.
  • New tests cover the checkpoint's settings and the permission.
  • A production webpack build with the package installed succeeds and bundles the package's settings.
  • Not checked in a browser.

🤖 Generated with Claude Code

…ow the server's suggested concurrency, output language by permission, exact group names

@snyaggarwal snyaggarwal left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 paynejd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Leave following the suggested concurrency to OpenConceptLab/ocl_online#340, per the decision on OpenConceptLab/ocl_online#517.

    • Take out the scheduler cap (getLimit in matchBatch.js) and the gate's suggest and suggestedConcurrency (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 getMapperSettings allows 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.
  2. Build order for the private image.

    • If the Mapper image is built before the oclmap-plugin branch exports getMapperSettings, 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.

Checked

  • requestLimits.js and aiVisibility.js no 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.
  • hasAuthGroup matches 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.

Comment thread src/components/map-projects/matchBatch.js Outdated
@paynejd

paynejd commented Oct 21, 2026

Copy link
Copy Markdown
Member

Codex review, pass 1 (codex-cli 0.163.0, commit ce79acb)

Verdict: findings. 1 finding(s).

  • F1.1 (P1) src/components/map-projects/matchBatch.js:124: The new cap applies a heavy-request concurrency suggestion to subsequent lexical-only matching.
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"
    }
  ]
}

@snyaggarwal snyaggarwal changed the title OpenConceptLab/ocl_online#517 | Mapper settings checkpoint, runs follow the server's suggested concurrency, output language by permission, exact group names OpenConceptLab/ocl_online#517 | Mapper settings checkpoint, output language by permission, exact group names Oct 22, 2026
@snyaggarwal
snyaggarwal merged commit 0eb0066 into main Oct 22, 2026
2 checks passed
@snyaggarwal
snyaggarwal deleted the ocl_online#517 branch October 22, 2026 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants