Skip to content

feat(ui): vendor-neutral managed AI LLM messaging, memory benefits, and live quota visibility - #355

Open
Coding-Dev-Tools wants to merge 6 commits into
mainfrom
feat/managed-ai-branding-and-visibility
Open

Coding-Dev-Tools wants to merge 6 commits into
mainfrom
feat/managed-ai-branding-and-visibility

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

Summary

  • Removes all customer-facing OpenRouter wording from included Pro and Team managed AI LLM copy across the local Dashboard (index.html, ledger.js), entitlement_contract.json, README.md, docs/HOSTED_PLANS.md, docs/CONFIGURATION.md, docs/LLM_PROVIDERS.md (managed intro only), docs/MCP_TOOLS.md, skills/engraphis-memory/references/TOOLS.md, .env.example, and CHANGELOG.md while keeping explicit BYOK OpenRouter support intact.
  • Explains the 4 concrete ways the 100 free daily AI LLM calls and 250 free daily Jev calls improve an Engraphis agentic memory system.
  • Adds GET /api/v2/cloud/allowances (60s cache, zero-network offline fallback, vendor sanitization) and wires live daily AI LLM (100/day) and Jev (250/day) visibility into Manage -> Plans and Settings.

Verification

  • pytest -q tests/test_entitlement_contract.py tests/test_documentation_contracts.py tests/test_llm_dashboard.py tests/test_provider_docs.py tests/test_skill_package.py tests/test_packaging.py tests/test_embeddings.py: 118 passed.
  • pytest -q tests/test_release_infrastructure.py: 34 passed.
  • scripts/check_commercial_manifest.py, scripts/externalize_dashboard_assets.py,
    uff check, and
    ode --check all passed.

…nd live quota visibility

Remove vendor-specific OpenRouter references from included Pro/Team managed AI LLM copy across the dashboard, entitlement contract, README, and docs while keeping BYOK OpenRouter support intact. Add read-only GET /api/v2/cloud/allowances with a 60s cache, zero-network offline fallback, and vendor sanitization, and wire live daily AI LLM (100/day) and Jev (250/day) allowance visibility plus memory benefits into Manage Plans and Settings.
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-27T03:49:59.402806Z
We couldn’t complete this review. Comment @codex review to try again.
05cb6e0 PR opened
ℹ️ 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

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

… offline evidence

Scope cloud allowance caching by normalized origin, org, plan, access state, and non-secret session digest; clear cache on denial/refresh; enforce pre/post TOCTOU control-origin validation, per-endpoint deadline bounds, single-flight coalescing, 402 billing-denial propagation, non-caching of transient failures, strict JSON parsing, next_release_at fallback, Cache-Control: no-store, and inline refresh error notes; refresh immutable offline benchmark evidence and charts.
@Coding-Dev-Tools

Copy link
Copy Markdown
Owner Author

2-agent independent review loop completed at 6cbd871:

  • Fixed: per-person session-scoped allowance cache key & invalidation hooks, pre/post TOCTOU origin pinning around �ccess_for_workspace, no 60s caching of transient failures, HTTP 402 billing-denial propagation, per-endpoint deadline bounds & single-flight locking, Cache-Control: no-store, ledger.js refresh failure notice, and refreshed offline benchmark evidence.
  • Verification: 29/29 GitHub CI checks green; local pytest (94 passed, 0 failed),
    uff check (0 errors), media_gate.py OK.
  • Schema-v2 approval prepared (engraphis-355-6cbd871d.json, 0 Blockers, 0 Majors). Ready for merge gate pending operator merge authorization.

Three runtime defects in the allowances surface:

* `_propagate_cloud_billing_denial()` duplicated the authoritative
  denial path without calling `_mark_authoritative_denial()`. On
  read-only state dirs, direct-token deployments, and empty-cache
  sessions where the persisted writes are no-ops, the in-process
  guard was never set, so `_plan_entitlement()` kept reporting paid
  access. Drop the duplicate and call `_record_authoritative_denial()`.
* `get_cloud_allowances()` mapped revoked (401/403) sessions to
  "offline", telling a signed-out user the control plane was merely
  unreachable while `/api/license` still advertised paid access.
  Treat 401/402/403 as authoritative and return "unauthorized".
* `#cloud-allowances-refresh` stayed disabled forever when a refresh
  was superseded by tab or workspace navigation, because `finally`
  only re-enabled the button for the still-current request. Track
  in-flight refreshes with a counter so it always re-enables.

Also catch `RecursionError` from untrusted usage JSON, matching the
other untrusted-JSON boundaries, so deeply nested bodies return
"unavailable" instead of an unhandled HTTP 500.
`.git-commit-msg.tmp` was picked up by `git add -A` in the previous
commit. It is a local scratch file and does not belong in the tree.
`tests/test_benchmark_evidence.py` hashes every `.py` under `engraphis/`
and `eval/`, so the v2_api.py change invalidated the committed registry
artifact and failed the whole Python matrix. Export a new immutable
artifact and repoint the test constants, README prefix, BENCHMARKS.md
name/sha, and the fixture-suite digest.

The three offline fixture run results are byte-identical to the previous
artifact; only the `engraphis/routes/v2_api.py` entry in the suite
manifest changed, so no published number moves. The SVGs and PNGs were
regenerated from the new artifact so their embedded provenance matches.
… endings

The previous commit's byte-substitution was done through a text rewrite
that normalized CRLF to LF, so BENCHMARKS.md and README.md showed 758
changed lines for a 7-token edit. Redo the substitution on raw bytes so
the diff is only the artifact name, SHA, suite digest, and the two
reproduction commands that name the artifact.

This branch has not been deployed

No deployments
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.

1 participant