Skip to content

🦫 feat: Enforce Scheduled MCP Read-Only Authority - #16681

Merged
danny-avila merged 20 commits into
devfrom
lia/scheduled-mcp-ceiling
Oct 4, 2026
Merged

danny-avila merged 20 commits into
devfrom
lia/scheduled-mcp-ceiling

Conversation

@lia-by-librechat

@lia-by-librechat lia-by-librechat Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A2 (#16652) persists schedule consent but does not install execution authority. This PR enforces delegated read-only MCP policy at readiness and immediately before tools/call. Current consent, owner/tenant/root binding, reachable selections, RBAC, resource routing and pinned tool definitions must match. Denied calls never dispatch.

Unenrolled schedules retain legacy behavior only while enrollment remains absent. Revocation, expiry, missing policy and unsupported stored versions never permit a legacy fallback.

Related to #16157. Consumes #16645 and #16652.

How it works

consent + trusted service policy
  readiness: graph selections and actual tool definitions
  trigger/resume: host-owned execution identity
  SDK: mandatory tool policy + independent denial receipt
  MCP: current authority + catalog + atomic consent fence
    tools/call
  • interface.schedules.mcpConsent.readOnlyPolicy declares exact upstream operations with effect: read_only and definitionSha256. Names, annotations, scope previews, remembered conversation approvals and model choices confer no authority. Consent offers reject missing, invalid or principal-overridden policy. Mixed read/write query tools need a separate service policy.
  • Enrolled runs allow foreground delegation only. Completion tasks capture the originating generation’s host-owned schedule identity at registration and recheck live consent before admission. Ordinary tasks carry no schedule identity, even in conversations with historical scheduled runs. Legacy scheduled continuations retain their original enrollment monitor. Completion lineage is durably retained before tool construction and restored for authenticated approval resumes without claiming another scheduled occurrence.
  • Enrolled MCP failures never enter automatic OBO or stored-OAuth invocation replay. Readiness, final invocation and restored approval use current authorization.
  • Safe denials survive handled tool errors, pause/resume, receipt outages and settlement races. Authorization dependency failures use the same sanitized denial and receipt path; typed policy denials and owner cancellation remain distinct. Preparation and completion-lineage persistence failures are sanitized before tool initialization and scheduled error settlement. Generation stores retain the strongest denial atomically within their epoch fence. Mongo terminal writes merge retained outcomes before bookkeeping; permanent failures suspend after one occurrence.
  • Manual Run Now remains available while paused without bypassing consent. Ordinary chat startup performs no schedule reads.

Testing

Focused SDK, MCP/HTTP, continuation, consent, schedule and storage regressions. Real Mongo settlement and owner/tenant checks. Real Redis UPDATE/CAS severity and epoch checks. Changed-workspace typechecks, declaration builds and touched-file static checks.

Exact results and CI are recorded in the head-specific verification comment.

Risk / compatibility

Enrollment is default-off. Activation requires the maintainer-approved upgrade-first sequence:

  1. Keep interface.schedules.mcpConsent.enabled: false throughout the upgrade. Do not create enrollments on a mixed fleet.
  2. Upgrade every scheduler, delivery worker and chat-execution replica to A3. Drain or cancel pre-A3 runs, including approval-paused work, detached tasks and pending continuations.
  3. Verify the fleet and outstanding work, then enable enrollment in a separate authorized activation.

Active enrollment during a mixed-version upgrade is unsupported. A rollback to pre-A3 code requires disabling enrollment and draining affected work first. This PR does not certify fleet readiness or authorize a merge, deployment, activation or live-provider certification.

Checklist

  • Self-review and focused regression coverage
  • A1/A2 dependencies merged
  • Current-head local verification and independent review complete
  • Remaining GitHub CI complete
  • Upgrade-first activation prerequisite agreed; operational execution remains separate
  • No evolving planning documentation committed

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head 21627883e2f4fd05ef0fccc9183fa6723bcc7a73 installs consent-backed readiness and final MCP dispatch enforcement, a run-wide direct-tool ceiling, resume binding and safe policy denials. Legacy unenrolled schedules remain unchanged. Current-head local checks and independent review are running. No provider activation or deployment.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head b0e369751da1c11fc98915b5cf779b337b6d1f98 preserves ordinary-chat startup timing and denies consent that expires during the final database fence. Focused correction checks: 292 API/real-HTTP tests, 205 Express/MCP tests, 17 Mongo consent tests and 11 wire-schema tests passed. Current-head type/static checks and independent review are running. Local Lighthouse reached app startup but is blocked by missing Chromium. No activation or deployment.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head 1e18bee981341603db666e19ee0c0f1fa9ec7ce7 also rejects malformed stored consent instead of treating it as legacy. Local verification: 296 focused API/real-HTTP tests, 205 Express/MCP tests, 17 Mongo consent tests, 11 wire-schema tests, workspace typechecks and 41-file static checks passed. Final-head CI and independent review are running. Local Lighthouse is blocked by missing Chromium. No deployment, provider activation or resource certification.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Verification for 1e18bee981341603db666e19ee0c0f1fa9ec7ce7:

Check Result
Focused API, SDK and real HTTP MCP regressions 901 passed
Express initializer and MCP wrappers 205 passed
Mongo consent transitions 17 passed
Shared schedule/consent schemas 11 passed
TypeScript: API, data-provider, data-schemas Passed
API declaration build Passed
Touched-file static checks 41 files passed

Current-head CI Static checks and Lighthouse passed. Remaining CI is still running. Local Lighthouse is blocked by missing Chromium. Live-provider and DocumentDB certification were not run.

Independent review of this head is unavailable: the reviewer failed to start with The child run could not be completed. No clean review is claimed.

Parent audit: two P1 findings (expiry during admission; malformed-consent legacy fallback) and one P2 finding (ordinary startup timing) are fixed. No finding was rejected. No merge, deployment or provider activation.

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review the latest head, final review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-03T03:06:35.825126Z 35ea38c Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1e18bee981

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/data-schemas/src/methods/schedule.ts
Comment thread packages/api/src/schedules/authorization/execution.ts Outdated
Comment thread packages/api/src/mcp/MCPManager.ts Outdated
@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head 6c193b0fe613762aeec7c63977df8b0577faab64 addresses all three Codex findings from 1e18bee981. Before push: 547 focused API/transport tests, 35 Mongo receipt tests and 12 wire-schema tests passed; changed-workspace typechecks and API build passed. Final-head CI, full touched-file checks and independent review are running. No activation or deployment.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Verification for 6c193b0fe613762aeec7c63977df8b0577faab64: 908 focused API/SDK/HTTP tests, 205 Express/MCP tests, 35 Mongo receipt tests and 12 wire-schema tests passed. All changed-workspace typechecks, API declaration build and 43-file static checks passed. All three Codex threads are resolved. Exact-head independent review is running; CI is still completing. Local Lighthouse remains blocked by missing Chromium. No deployment, activation or live-provider/DocumentDB certification.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head d68b6a4d3df7b48965b741654e793e4b8f4b9229 fixes two supported P2 findings from the independent review of 6c193b0fe: admitted SDK handoff controls and paused enrolled manual Run Now. Exact controls derive from admitted edges, not transfer-name prefixes. Manual authority comes only from trusted fire/resume provenance; all other fences remain. Before push: 479 focused regressions, changed-workspace typechecks, declaration build and scoped static checks passed. New-head CI and independent review are running. The previous independent review was incomplete, not clean.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Verification for d68b6a4d3df7b48965b741654e793e4b8f4b9229: 974 focused API/SDK/HTTP tests, 205 Express/MCP tests and 39 selected Mongo receipt/consent cases passed. Changed-workspace typechecks, API declaration build and 46-file static checks passed. The two supported P2 findings from the prior incomplete review are fixed. Fresh exact-head independent review and CI remain in progress. Local Lighthouse was blocked by missing Chromium. No activation, deployment or live certification.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head a4bbde2b64ead3ea28c02041763f237e6d3014ce fixes the supported P2 mandatory-hook receipt finding from the incomplete review of d68b6a4d3. Installed SDK4.0.1/real Mongo coverage confirms blocked root/child actions never execute and normally completed responses retain the receipt and suspend the schedule. Job identity/epoch mismatches cannot stamp receipts; callback failures/timeouts cannot erase deny. Before push: 330 focused regressions, 282 AgentClient regressions, API types/build and scoped static checks passed. New-head verification, CI and independent review are running.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Verification for a4bbde2b64ead3ea28c02041763f237e6d3014ce: 985 focused API/SDK/HTTP/Mongo tests and 487 AgentClient/Express/MCP tests passed. All changed-workspace typechecks, API declaration build and 47-file static checks passed. The mandatory-hook receipt defect is fixed and reproduced through installed SDK4.0.1 and real Mongo settlement. Fresh exact-head independent review and CI remain in progress. Local Lighthouse was blocked by missing Chromium; no live-provider or DocumentDB certification. No merge, deployment or activation.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head 4454668a9240a2a0771b9dd9a639dc139d28a31c fixes the supported late-enrollment P1 and failed-receipt P2 from the incomplete review of a4bbde2b6. Scheduled legacy tools recheck enrollment at SDK/MCP boundaries and cannot adopt a later grant. Safe denial evidence survives a failed Mongo receipt through the generation store, approval resume and crash recovery; known undurable evidence defers successful settlement. Before push: 641 focused SDK/Mongo/HTTP/Redis-contract tests, workspace types, API build and scoped static checks passed. Final-head CI, broader focused checks and independent review are running.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Verification for 4454668a9240a2a0771b9dd9a639dc139d28a31c: 1,100 focused API/SDK/Mongo/HTTP/metadata regressions and 659 AgentClient/Express/MCP tests passed. All changed-workspace typechecks, API declaration build and 56-file static checks passed. Fresh exact-head independent review has its own installed dependencies and is running. CI is still completing. Local Lighthouse was blocked by missing Chromium; no live-provider/DocumentDB certification or activation.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head 7f65fa49a72f04b42afd377032b6e6e05a8be004 fixes both P2 findings from the completed review of 4454668a9: transport receipts now carry immutable execution identity before fallible job reads, and enrolled calls propagate the first operation failure before either OBO or stored-OAuth replay branch. Reproductions verified both old branches dispatched twice; enrolled and legacy compatibility tests now pass. Before push: 381 focused API/Mongo regressions, 132 MCP wrapper tests, changed-workspace typechecks, API build and scoped static checks passed. New-head independent review and CI are running. No deployment or activation.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Verification for 7f65fa49a72f04b42afd377032b6e6e05a8be004: 1,105 focused API/SDK/Mongo/HTTP/metadata tests and 660 AgentClient/Express/MCP tests passed. Changed-workspace typechecks, API declaration build and 57-file static checks passed. Both supported P2 findings from the completed prior review are fixed. New-head independent review has its own installed dependencies and is running; CI is still completing. Local Lighthouse was blocked by missing Chromium. No live-provider/DocumentDB certification or activation.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head c04a688c99f3b089a71a837c05a7e2b3dced861b fixes the supported P2 mixed-receipt settlement finding from the completed review of 7f65fa49a. Existing Mongo receipts and incoming job-retained outcomes merge atomically with classic operators in the terminal transition. Bookkeeping uses the committed post-image union. Before push: 210 real-Mongo schedule-method tests and 156 shipped receipt/service/engine tests passed; all workspace typechecks, storage declaration build and scoped static checks passed. New-head CI, focused verification and independent review are running. No deployment or activation.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Verification for c04a688c99f3b089a71a837c05a7e2b3dced861b: 1,108 focused API/SDK/Mongo/HTTP/metadata tests, 227 Mongo schedule/consent tests and 660 AgentClient/Express/MCP tests passed. Workspace typechecks, storage declaration build and 57-file static checks passed. The mixed-source settlement finding is fixed with an atomic receipt union and post-image bookkeeping. Fresh exact-head independent review and CI remain in progress. Local Lighthouse was blocked by missing Chromium; no live-provider, production Redis or DocumentDB certification. No merge, deployment or activation.

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Lighthouse CI failed. The last 80 log lines contain the measured budgets and assertion failures.


[WebServer] 2026-10-03 02:22:00 info: [StreamServices] Created in-memory stream services

[WebServer] 2026-10-03 02:22:00 info: [GenerationJobManager] Configured with in-memory stores

[WebServer] 2026-10-03 02:22:00 info: HTTP server timeout configuration

[WebServer] 2026-10-03 02:22:00 info: Server listening at http://localhost:3080

[WebServer] 2026-10-03 02:22:00 info: [MCPServersRegistry] Creating new instance

[WebServer] 2026-10-03 02:22:00 info: OAuth reconnect manager initialized successfully.

[WebServer] 2026-10-03 02:22:01 info: Created collection: projects

🤖: global setup has been started
🤖: using baseURL http://localhost:3080
🤖: using E2E user: testuser@example.com
🤖: 🗝  authenticating user: testuser@example.com
🤖: ✔️  localStorage: set Nav as Visible /home/runner/work/LibreChat/LibreChat/e2e/storageState.json
[WebServer] 2026-10-03 02:22:03 info: [agent-triggers] durable delivery engine started

[WebServer] 2026-10-03 02:22:04 info: [schedules] engine started

[WebServer] 2026-10-03 02:22:04 info: Server readiness checks passing.

🤖: ✔️  user successfully registered
[WebServer] 2026-10-03 02:22:08 info: [Login] [Login successful] [Username: testuser@example.com] [Request-IP: ::1] {"requestId":"52d28bd8-a8d7-4093-92cb-63271e998138","request_id":"52d28bd8-a8d7-4093-92cb-63271e998138","request_method":"POST","request_path":"/api/auth"}

🤖: ✔️  user successfully authenticated
🤖: ✔️  authentication state successfully saved in /home/runner/work/LibreChat/LibreChat/e2e/storageState.json
🤖: global setup has been finished

Running 1 test using 1 worker

[1/1] [chrome] › e2e/lighthouse/load.spec.ts:10:5 › serial database latency stays within web-vitals budgets
[chrome] › e2e/lighthouse/load.spec.ts:10:5 › serial database latency stays within web-vitals budgets
Lighthouse run 1/3 wrote /home/runner/work/LibreChat/LibreChat/.lighthouse/lhr-1.report.json

Lighthouse run 2/3 attempt 1 did not complete, retrying: Command failed: /opt/hostedtoolcache/node/24.16.0/x64/bin/node /home/runner/work/LibreChat/LibreChat/node_modules/lighthouse/cli/index.js http://localhost:3080/c/16390000-0000-4000-8000-000000000001 --quiet --preset=desktop --throttling-method=provided --only-categories=performance --chrome-flags=--headless=new --extra-headers={"Cookie":"token_provider=librechat; refreshToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhYzA2NmNkMzQ0NjdiNThkNDIzMDFlZCIsInNlc3Npb25JZCI6IjZhYzA2NmQzMzQ0NjdiNThkNDIzMDIwZiIsImlzc3VlZEF0TXMiOjE3OTA5OTQxMzE1NzgsImlhdCI6MTc5MDk5NDEzMSwiZXhwIjoxNzkwOTk3NzMwfQ.duVoqqkfboY-06B4mSkC6LHR8ZFof8vLm8HKxMpQAo8"} --output=json --output=html --output-path=/home/runner/work/LibreChat/LibreChat/.lighthouse/lhr-2

  1) [chrome] › e2e/lighthouse/load.spec.ts:10:5 › serial database latency stays within web-vitals budgets 

    Error: Command failed: /opt/hostedtoolcache/node/24.16.0/x64/bin/node /home/runner/work/LibreChat/LibreChat/node_modules/lighthouse/cli/index.js http://localhost:3080/c/16390000-0000-4000-8000-000000000001 --quiet --preset=desktop --throttling-method=provided --only-categories=performance --chrome-flags=--headless=new --extra-headers={"Cookie":"token_provider=librechat; refreshToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhYzA2NmNkMzQ0NjdiNThkNDIzMDFlZCIsInNlc3Npb25JZCI6IjZhYzA2NmQzMzQ0NjdiNThkNDIzMDIwZiIsImlzc3VlZEF0TXMiOjE3OTA5OTQxMzE1NzgsImlhdCI6MTc5MDk5NDEzMSwiZXhwIjoxNzkwOTk3NzMwfQ.duVoqqkfboY-06B4mSkC6LHR8ZFof8vLm8HKxMpQAo8"} --output=json --output=html --output-path=/home/runner/work/LibreChat/LibreChat/.lighthouse/lhr-2
    Runtime error encountered: Something went wrong with recording the trace over your page load. Please run Lighthouse again. (NO_NAVSTART)


    attachment #1: screenshot (image/png) ──────────────────────────────────────────────────────────
    e2e/lighthouse/.test-results/load-serial-database-latency-stays-within-web-vitals-budgets-chrome/test-failed-1.png
    ────────────────────────────────────────────────────────────────────────────────────────────────

    Error Context: e2e/lighthouse/.test-results/load-serial-database-latency-stays-within-web-vitals-budgets-chrome/error-context.md

    attachment #3: trace (application/zip) ─────────────────────────────────────────────────────────
    e2e/lighthouse/.test-results/load-serial-database-latency-stays-within-web-vitals-budgets-chrome/trace.zip
    Usage:

        npx playwright show-trace e2e/lighthouse/.test-results/load-serial-database-latency-stays-within-web-vitals-budgets-chrome/trace.zip

    ────────────────────────────────────────────────────────────────────────────────────────────────


🤖: global teardown has been started
2026-10-03 02:23:44 �[32minfo�[39m: �[32mMongo Connection options�[39m
2026-10-03 02:23:44 �[32minfo�[39m: �[32m{�[39m
�[32m  "bufferCommands": false�[39m
�[32m}�[39m
🤖:  ✅  Connected to Database
🤖:  ✅  Found user in Database
🤖:  ✅  Deleted 1 convos & 2 messages
🤖:  ✅  Deleted user from Database
🤖: global teardown has been started
2026-10-03 02:23:44 �[32minfo�[39m: �[32mMongo Connection options�[39m
2026-10-03 02:23:44 �[32minfo�[39m: �[32m{�[39m
�[32m  "bufferCommands": false�[39m
�[32m}�[39m
🤖:  ✅  Connected to Database
🤖:  ⚠️  User not found in Database
  1 failed
    [chrome] › e2e/lighthouse/load.spec.ts:10:5 › serial database latency stays within web-vitals budgets 

Open the full run

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Verification for 2d80eea5ba7f87a247e9851e0b429578cb6f80c9: 1,608 API/SDK/HTTP/metadata/recovery tests and 132 production MCP-wrapper tests passed. API tsc --noEmit, declaration build and 73-file PR static checks passed. Real Mongo tests retain sanitized authorization-failure receipts and handled-success settles as error; real HTTP tests send no provider calls. Typed denials and owner cancellation are preserved. The supported P2 is fixed; independent review remains pending on this exact head. No earlier review clears it. Local Lighthouse remains blocked by missing Chromium; prior Redis assertions passed but the runner retained open handles. Upgrade-first activation remains a prerequisite, not fleet-readiness certification. No feature merge, deployment or activation.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head 35ea38c4db42f1e04f1ff68a6f8319fcbe89fd88 fixes the supported P2 from the completed review of 2d80eea5b: authorization preparation and completion-lineage persistence failures are sanitized before initialization and scheduled error settlement. Typed denials and owner cancellation remain distinct; provider initialization stays outside this boundary, and ordinary chat retains its direct startup path. Six regression cases failed before the fix. Afterward, 265 SDK/Mongo/HTTP/authority tests, 250 initializer/request-controller tests, API typecheck/declaration build and scoped static checks passed. Fresh exact-head independent review and broader checks are starting. Upgrade-first activation remains required. No feature merge, deployment or activation.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Verification for 35ea38c4db42f1e04f1ff68a6f8319fcbe89fd88: 1,615 API/SDK/HTTP/metadata/recovery tests and 549 initializer/approval/request/MCP-wrapper tests passed. API tsc --noEmit, declaration build and 74-file PR static checks passed. The preparation-outage regressions verify safe error-stream and persisted-outcome text, unchanged typed denials and owner cancellation, provider-failure isolation, and ordinary startup isolation. Fresh independent review is running on this exact head; no earlier-head review clears it. Local Lighthouse remains blocked by missing Chromium; earlier Redis assertions passed but their runner retained open handles. Upgrade-first activation is a prerequisite, not verified fleet readiness. No feature merge, deployment, activation or production certification.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Independent review completed for 35ea38c4db42f1e04f1ff68a6f8319fcbe89fd88: no findings. Full source review, 23 injected-dependency probes and changed-JS syntax checks passed. Reviewer observed CI integrations/types/Lighthouse but did not independently run those locally. Local verification: 1,615 API tests, 549 initializer/approval/request/MCP tests, API typecheck/declaration build and 74-file static checks passed. CI snapshot: 35 passed, 2 skipped, 7 pending, none failed; Lighthouse passed. Remaining CI is not yet cleared. Upgrade-first activation remains required. No feature merge, deployment, activation or fleet-readiness certification.

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review the latest head, final review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 35ea38c4db

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/data-schemas/src/methods/schedule.ts Outdated
@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Review target: 94d6b5d67f9529507af2edc91e8b1246fce57bd0. This fixes Codex’s supported P1 historical-conversation authority leak. Completion lineage is captured from the parent generation at task registration, never inferred from any prior schedule sharing the conversation. Ordinary tasks remain ordinary; genuine scheduled tasks retain their live consent checks and approval monitor. Before push: 777 focused SDK/Mongo/authority tests, two executor capture tests, 243 initializer/approval tests, 227 Mongo storage tests, API/schema typechecks and builds, and scoped static checks passed. Fresh exact-head independent review and broader checks are starting. The earlier no-findings review covers only 35ea38c4d. Upgrade-first activation remains required. No feature merge, deployment or activation.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Verification at 94d6b5d67f9529507af2edc91e8b1246fce57bd0: 1,725 API/SDK/HTTP/Mongo/task-store tests, 421 initializer/approval/request/trigger tests and 227 real Mongo storage tests passed. API/schema typechecks and declaration builds passed. The 77-file PR static check passed separately after a wrapper timeout. Six reused-conversation cases cover legacy, enrolled and deleted schedules; genuine captured origins still fence later enrollment and revocation. Task request fields and runnable metadata cannot forge or erase host origin. Codex P1 reply and resolution confirmed. Fresh exact-head independent review remains pending. Upgrade-first activation remains required; no feature merge, deployment, activation or production certification.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

CI update for 94d6b5d67f9529507af2edc91e8b1246fce57bd0: Lighthouse passed. MCP Apps failed at mcp-apps.spec.ts:695, waiting for the legacy iframe action’s generation HTTP response. The real SDK fixture passed. The browser timeout is not yet diagnosed, so full CI is not cleared. No assertions, budgets, auth policy or source outside the origin fix were changed. Fresh independent review continues. The earlier rerun-permission denial remains respected.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

MCP Apps trace at 94d6b5d67f9529507af2edc91e8b1246fce57bd0: the legacy iframe click completed after the preceding SSE FINAL, but no subsequent chat POST appears in the captured network. The fixture and client action code are unchanged from 35ea38c4d. This narrows the failure to the browser action path, not an observed authorization rejection, but does not establish its root cause or prove it unrelated. The CI failure remains open. Independent review was incomplete due to workspace queue failures and is being continued on this exact head; no clearance claimed.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Exact-head independent review completed for 94d6b5d67f9529507af2edc91e8b1246fce57bd0: no findings. Full source/ledger review and 37 bounded dependency-stand-in probes passed; the reviewer did not independently run SDK/database integrations or workspace typechecks. Local 1,725 API tests, 421 wiring tests, 227 Mongo storage tests, types/builds and PR static checks passed. MCP Apps browser CI remains failed and undiagnosed; review clearance does not clear that job. Upgrade-first activation remains required. No feature merge, deployment or activation.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Browser investigation at reviewed head 94d6b5d67f9529507af2edc91e8b1246fce57bd0: a task-local full-Chrome reproduction passed the original enabled MCP Apps sequence through every legacy-action assertion, using the CI chat/sandbox origins. This includes the awaited chat POST, expanded iframe and completed tool result. An isolated ordinary-chat reproduction and real legacy-SDK rerender probes also passed. The committed test and source were unchanged. The later share/reload portions and remaining policy phases were not rerun locally. The CI browser failure was not reproduced; its cause remains unproven, not dismissed as unrelated. Current CI has 41 passed, 2 skipped and 2 failed checks: MCP Apps plus its dependent e2e gate. Independent review is complete with no findings. CI still requires a permitted rerun; the previous Actions permission denial remains respected. No feature merge, deployment or activation.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Updated head: be3882d20dcc915430cc1c8e3ec8394e442e5b94.

Merged current dev (76fcf0a6eb849df0d6d3aa4ee023682b9b36252a) without rewriting history. A3 authority checks and the agreed upgrade-first activation prerequisite remain unchanged. The attached incident export is not evidence for bypassing authentication, omitting selected tools or changing token lifetimes.

Focused verification, fresh GitHub CI and independent exact-head review are running. The prior head's MCP Apps failure remains unresolved until this head's CI establishes its result.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Updated head: 1304c67c9d0141f74e1723e0ebd77dbde74436d2.

Merged dev at fb1dd57a9b98c7020a99a5de243269d82e18990f, including #16557. Resolved the createRun conflict by retaining both scheduled execution/receipt inputs and remembered conversation approvals. Added real SDK coverage that a remembered approval cannot bypass a scheduled denial or suppress its receipt.

Seven focused boundary cases and package builds passed. Full focused verification, fresh CI and independent review are running for this head. The predecessor's clean review and CI results do not clear this head. Upgrade-first activation remains separate.

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Lighthouse CI failed. The last 80 log lines contain the measured budgets and assertion failures.


[WebServer] 2026-10-03 10:00:46 info: [StreamServices] Created in-memory stream services

[WebServer] 2026-10-03 10:00:46 info: [GenerationJobManager] Configured with in-memory stores

[WebServer] 2026-10-03 10:00:46 info: HTTP server timeout configuration

[WebServer] 2026-10-03 10:00:46 info: Server listening at http://localhost:3080

[WebServer] 2026-10-03 10:00:46 info: [MCPServersRegistry] Creating new instance

[WebServer] 2026-10-03 10:00:46 info: OAuth reconnect manager initialized successfully.

[WebServer] 2026-10-03 10:00:46 info: Created collection: projects

🤖: global setup has been started
🤖: using baseURL http://localhost:3080
🤖: using E2E user: testuser@example.com
[WebServer] 2026-10-03 10:00:49 info: [agent-triggers] durable delivery engine started

[WebServer] 2026-10-03 10:00:50 info: [schedules] engine started

[WebServer] 2026-10-03 10:00:50 info: Server readiness checks passing.

🤖: 🗝  authenticating user: testuser@example.com
🤖: ✔️  localStorage: set Nav as Visible /home/runner/work/LibreChat/LibreChat/e2e/storageState.json
🤖: ✔️  user successfully registered
[WebServer] 2026-10-03 10:00:59 info: [Login] [Login successful] [Username: testuser@example.com] [Request-IP: ::1] {"requestId":"43ab627f-e176-469c-9c3e-439d083c09ae","request_id":"43ab627f-e176-469c-9c3e-439d083c09ae","request_method":"POST","request_path":"/api/auth"}

🤖: ✔️  user successfully authenticated
🤖: ✔️  authentication state successfully saved in /home/runner/work/LibreChat/LibreChat/e2e/storageState.json
🤖: global setup has been finished

Running 1 test using 1 worker

[1/1] [chrome] › e2e/lighthouse/load.spec.ts:10:5 › serial database latency stays within web-vitals budgets
[chrome] › e2e/lighthouse/load.spec.ts:10:5 › serial database latency stays within web-vitals budgets
Lighthouse run 1/3 wrote /home/runner/work/LibreChat/LibreChat/.lighthouse/lhr-1.report.json

Lighthouse run 2/3 attempt 1 did not complete, retrying: Command failed: /opt/hostedtoolcache/node/24.16.0/x64/bin/node /home/runner/work/LibreChat/LibreChat/node_modules/lighthouse/cli/index.js http://localhost:3080/c/16390000-0000-4000-8000-000000000001 --quiet --preset=desktop --throttling-method=provided --only-categories=performance --chrome-flags=--headless=new --extra-headers={"Cookie":"token_provider=librechat; refreshToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhYzBkMjU3OTBkYmMwYTkwOTkyZjA0YiIsInNlc3Npb25JZCI6IjZhYzBkMjVlOTBkYmMwYTkwOTkyZjA2YiIsImlzc3VlZEF0TXMiOjE3OTEwMjE2NjI4NTMsImlhdCI6MTc5MTAyMTY2MiwiZXhwIjoxNzkxMDI1MjYyfQ.7jT7rsXf99Zp8Qh05LG7uKYYj_pOXpcuK4cZ545kazo"} --output=json --output=html --output-path=/home/runner/work/LibreChat/LibreChat/.lighthouse/lhr-2

  1) [chrome] › e2e/lighthouse/load.spec.ts:10:5 › serial database latency stays within web-vitals budgets 

    Error: Command failed: /opt/hostedtoolcache/node/24.16.0/x64/bin/node /home/runner/work/LibreChat/LibreChat/node_modules/lighthouse/cli/index.js http://localhost:3080/c/16390000-0000-4000-8000-000000000001 --quiet --preset=desktop --throttling-method=provided --only-categories=performance --chrome-flags=--headless=new --extra-headers={"Cookie":"token_provider=librechat; refreshToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhYzBkMjU3OTBkYmMwYTkwOTkyZjA0YiIsInNlc3Npb25JZCI6IjZhYzBkMjVlOTBkYmMwYTkwOTkyZjA2YiIsImlzc3VlZEF0TXMiOjE3OTEwMjE2NjI4NTMsImlhdCI6MTc5MTAyMTY2MiwiZXhwIjoxNzkxMDI1MjYyfQ.7jT7rsXf99Zp8Qh05LG7uKYYj_pOXpcuK4cZ545kazo"} --output=json --output=html --output-path=/home/runner/work/LibreChat/LibreChat/.lighthouse/lhr-2
    Runtime error encountered: Something went wrong with recording the trace over your page load. Please run Lighthouse again. (NO_NAVSTART)


    attachment #1: screenshot (image/png) ──────────────────────────────────────────────────────────
    e2e/lighthouse/.test-results/load-serial-database-latency-stays-within-web-vitals-budgets-chrome/test-failed-1.png
    ────────────────────────────────────────────────────────────────────────────────────────────────

    Error Context: e2e/lighthouse/.test-results/load-serial-database-latency-stays-within-web-vitals-budgets-chrome/error-context.md

    attachment #3: trace (application/zip) ─────────────────────────────────────────────────────────
    e2e/lighthouse/.test-results/load-serial-database-latency-stays-within-web-vitals-budgets-chrome/trace.zip
    Usage:

        npx playwright show-trace e2e/lighthouse/.test-results/load-serial-database-latency-stays-within-web-vitals-budgets-chrome/trace.zip

    ────────────────────────────────────────────────────────────────────────────────────────────────


🤖: global teardown has been started
2026-10-03 10:02:47 �[32minfo�[39m: �[32mMongo Connection options�[39m
2026-10-03 10:02:47 �[32minfo�[39m: �[32m{�[39m
�[32m  "bufferCommands": false�[39m
�[32m}�[39m
🤖:  ✅  Connected to Database
🤖:  ✅  Found user in Database
🤖:  ✅  Deleted 1 convos & 2 messages
🤖:  ✅  Deleted user from Database
🤖: global teardown has been started
2026-10-03 10:02:48 �[32minfo�[39m: �[32mMongo Connection options�[39m
2026-10-03 10:02:48 �[32minfo�[39m: �[32m{�[39m
�[32m  "bufferCommands": false�[39m
�[32m}�[39m
🤖:  ✅  Connected to Database
🤖:  ⚠️  User not found in Database
  1 failed
    [chrome] › e2e/lighthouse/load.spec.ts:10:5 › serial database latency stays within web-vitals budgets 

Open the full run

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Verification for 1304c67c9d0141f74e1723e0ebd77dbde74436d2 against dev at fb1dd57a9b98c7020a99a5de243269d82e18990f:

Check Result
API / SDK / HITL / MCP authority regressions 2,170 tests, 36 suites passed
Initializer / approval resume / request / trigger / tool wiring 572 tests, 5 suites passed
Real Mongo schedule / consent / conversation storage 523 tests, 3 suites passed
Approval UI 13 tests passed
API, data-provider, data-schemas, client TypeScript Passed
Provider / schema / API builds; 77-file static checks Passed
Independent exact-head review Complete, no new findings

The reviewer read the full 77-file diff and approval integration, checked JavaScript syntax and diff whitespace, but did not independently run behavioral tests or typechecks. The existing ledger remains 9 P1 + 13 P2 fixed and one accepted upgrade-first operational prerequisite, not fleet certification. All six existing review threads are resolved.

CI snapshot: {"success":35,"skipped":2,"in_progress":6,"failure":1}. MCP Apps passed. Lighthouse failed while recording its third audit with NO_NAVSTART, before the median-budget assertions; this is not a measured budget breach. CI remains uncleared and the PR is not merge-ready. No assertions, budgets or authentication were weakened.

Local Lighthouse was attempted at the predecessor and could not start Chrome. It was not rerun at this head; real Redis, live-provider, DocumentDB and fleet/upgrade/drain/activation certification were not run locally. No feature merge, deployment or activation occurred. Review checkout removal completed, but Git's busy review metadata could not be pruned.

@codegraph-librechat codegraph-librechat Bot added the 🗺️ Agent Execution codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) label Oct 3, 2026
@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Updated head: 055b068adfe61fd2993305c49093a01ba2137848.

Merged dev at 565976be52d72deab020276415aa489e6c0d8b1b without conflicts or rewriting history. Focused checks and independent exact-head review are running alongside fresh CI. No Lighthouse runner, budget, assertion or authority-policy change.

The predecessor's Lighthouse artifact shows NO_NAVSTART during the second audit, including its retry, before median assertions. The first audit completed: LCP 4,132.872 ms, CLS 0.0179, TBT 337.086 ms. These are single-audit values, not a passing median. The underlying capture failure remains unproven. This corrects the prior comment's “third audit” description. The incident export does not establish this failure's cause.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Verification for 055b068adfe61fd2993305c49093a01ba2137848 against dev at 565976be52d72deab020276415aa489e6c0d8b1b:

Check Result
API / SDK / authority / continuation / provenance 2,382 tests, 39 suites passed
Initializer / approval resume / request / trigger / tools 573 tests, 5 suites passed
Real Mongo schedule / consent / conversation storage 527 tests, 3 suites passed
Five workspace typechecks; four package builds; 77-file static checks Passed
Independent exact-head review Complete, no new findings
Lighthouse CI Passed: LCP 3,868.372 ms; CLS 0.017904; TBT 238.928 ms

All three Lighthouse audits completed without retry. Runner, budgets and assertions are unchanged. The predecessor's second audit failed with NO_NAVSTART before median assertions; its capture failure's underlying cause remains unproven.

Independent review read the full diff, passed syntax/whitespace checks and 34 source-module probes with dependency stand-ins, not SDK/database integrations. Six existing review threads are resolved. Ledger: 9 P1 + 13 P2 fixed; one P1 remains an accepted upgrade-first operational prerequisite, not fleet certification.

CI snapshot: {"success":35,"in_progress":7,"skipped":2}. No failed checks. Remaining runtime smoke and memory e2e jobs are running; CI clearance is not yet claimed. MCP Apps passed.

Local Lighthouse setup remains blocked by absent Chrome. Real Redis, live-provider, DocumentDB and fleet/upgrade/drain/activation certification were not run locally. No feature merge, deployment or activation. Review checkout removed; Git metadata remains busy after a permitted prune.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Updated head: 9474e14abb2a1980bd3d669bf31154d679ce9339.

Merged dev at 1f195dcf9d98e6a6d501946d262e36407120238f, including #16647's URL-prompt lifecycle fix. No rewritten history, A3 policy changes or weakened assertions.

The predecessor failed the queued-message “Start in a new chat” scenario in all three attempts. Its trace shows navigation to /c/new?prompt=…&submit=true without the subsequent chat request. Lighthouse and all other independent CI lanes passed; the overall e2e gate failed because of that scenario.

Focused URL-prompt and A3 verification, the unchanged browser scenario, fresh CI and independent exact-head review are running. Upgrade-first activation remains separate.

@lia-by-librechat

lia-by-librechat Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Verification for 9474e14abb2a1980bd3d669bf31154d679ce9339 (base/merge-base 1f195dcf9d98e6a6d501946d262e36407120238f):

  • The unchanged “Start in a new chat” browser scenario passed locally, exit 0, 47.2 s. Real application and Mongo; fake model providers.
  • 3,872 focused tests across 56 suites passed, including URL prompt lifecycle, A3 SDK/MCP authority, approval resumes and real Mongo storage.
  • Five workspace typechecks, package/frontend builds and all 77-file static checks passed.
  • Independent review: complete, no new findings. Full diff/source review and JavaScript syntax/whitespace checks; no reviewer-local behavioral execution. All six existing review threads resolved.
  • Final exact-head CI: 43 successful checks, 2 skipped, no failures or running checks. All six memory e2e shards and the overall e2e gate passed. Lighthouse and MCP Apps passed.

The predecessor’s failure was the URL-prompt handoff, reproduced in all three CI attempts. This head incorporates #16647; no assertion, timeout, performance budget or authority safeguard changed.

Existing ledger: 9 P1 + 13 P2 fixed; A3-18 remains an accepted upgrade-first prerequisite, not fleet certification. No feature merge, deployment, activation or live-provider/DocumentDB/fleet validation. Full local Lighthouse and local real Redis integration were not rerun; CI covers those lanes. Review checkout removed; busy Git metadata could not be pruned.

@danny-avila
danny-avila merged commit 38a9dab into dev Oct 4, 2026
45 checks passed
@danny-avila
danny-avila deleted the lia/scheduled-mcp-ceiling branch October 4, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗺️ Agent Execution codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🛡️ security review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants