Skip to content

feat(paid-plans): entitlement contract, sync key management, and denial recovery - #315

Open
Coding-Dev-Tools wants to merge 13 commits into
mainfrom
feat/paid-plans-f1-entitlement-contract
Open

Coding-Dev-Tools wants to merge 13 commits into
mainfrom
feat/paid-plans-f1-entitlement-contract

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

Summary

Completes the paid-plans entitlement and recovery work on top of the closed #312 branch:

  1. Checked-in plan-feature contract — one source of truth for plan features, with licensing docs and dashboard handling for an unrecognized hosted grant.
  2. In-product Cloud Sync E2EE key management — create or rotate the user-held key from Settings → Cloud Sync. The key is written once to an owner-only state file (0600), shown once, never re-readable through the API, and never overrides an operator-provisioned ENGRAPHIS_SYNC_E2EE_KEY. Rotation stays explicit because data synced under the old key is unreadable until every device switches.
  3. Actionable denial metadata — managed-cloud 401/402/403 denials now carry a fixed-vocabulary reason, the plan that sells the feature, and the real account portal; provider text never crosses the boundary. Local cloud_unconfigured and consent errors stay code-only.
  4. Offline evidence refresh — new immutable artifact offline-fixtures-paid-plans-20261104.json, with the suite digest, README, benchmark guide, tests, and SVG/PNG provenance repinned.

Verification

  • pytest tests/test_dashboard_v2.py tests/test_sync_key_management.py tests/test_managed_denial_metadata.py tests/test_v2_service_binding.py -q — 155 passed, 1 skipped.
  • pytest tests/test_sync_dashboard.py tests/test_cloud_features.py tests/test_managed_processing_policy.py -q — 88 passed.
  • pytest tests/test_benchmark_evidence.py -q — passed.
  • ruff check . — clean.
  • Merged current main (6c75758a) into the branch.

This supersedes closed PR #312. The offline test-isolation fix is intentionally left to PR #313.

Agent: commandcode

Coding-Dev-Tools and others added 7 commits November 3, 2026 23:41
The client kept three hand-maintained copies of the private hosted
entitlement table, and each copy was only ever compared to itself. Add a
single machine-readable mirror, load both runtime surfaces from it, and
make the release gate compare it with the private contract so a new
capability cannot silently disappear from a paying customer's dashboard.

Local workspace export stays free and is explicitly kept out of the paid
vocabulary. Unknown server grants are reported as unrecognized_features
instead of being dropped without explanation.
Record that entitlement_contract.json is presentation metadata only and
that the release gate compares it with the private hosted contract.
A server capability this client predates was dropped from the feature
list without explanation. Render license.unrecognized_features as an
update prompt so a paying customer never reads a lock as "not bought".
A paying customer can now create the key from the dashboard instead of
editing config.env. The key is written once to an owner-only state file,
shown once, never re-readable through the API, and never overrides an
operator-provisioned environment key. Rotation stays explicit because data
synced under the old key is unreadable until every device switches.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
Extract a fixed-vocabulary reason from a bounded error body, map it to the
plan that sells the feature and the real account portal, and never forward
provider text. The dashboard uses the reason to offer the right recovery:
billing, seats, reconnect, or administrator.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
A local cloud_unconfigured 401 is not a paid-feature denial. Keep the
structured code-only error so the dashboard does not offer a token refresh
or an upgrade that cannot fix the missing account connection.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
The entitlement, sync-key, and denial-metadata changes alter checked-in
producer files, so generate a new immutable artifact, recompute the suite
digest and artifact SHA, and repin the README, benchmark guide, tests, and
both rendered SVG/PNG provenance pairs.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
@chatgpt-codex-connector

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 ⚠️ Failed 2026-11-04T05:10:38.259227Z
We couldn’t complete this review. Comment @codex review to try again.
8b505c6 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.

Coding-Dev-Tools and others added 6 commits November 4, 2026 00:18
CVE-2026-115557 in the Python 3.11.17 runtime is fixed in 3.11.18.
Pin the new multi-arch digest so the release grype gate can pass.

Co-authored-by: coding-dev-tools <coding-dev-tools@users.noreply.github.com>
Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
The dashboard now directs an invalid saved key to generate a replacement
instead of editing config.env. Update the browser expectation to the new
recovery text.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
The expectation edit rewrote a mixed-ending block as CRLF and inflated the
diff. Restore the file's prior endings so the net change is only the recovery
copy assertion.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
- Publish Managed Jev as an included paid benefit (500 calls per person
  per day) in the entitlement contract, license payload, plan cards,
  comparison table, and plan status.
- Show the days remaining in a live trial instead of only the end date.
- Restrict denial reasons to the fixed vocabulary before logging or
  returning them.
- Cover the in-product sync-key flow, the trial runway, and the included
  benefit with Python and browser tests.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
Bring in the updated Python base image from #314; no source conflicts.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
… change

The included-services contract, entitlement validation, and dashboard copy
change four checked-in producer files. Re-record their hashes, recompute the
suite digest and artifact SHA, and repin the README, benchmark guide, tests,
and both SVG/PNG provenance pairs.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
@Coding-Dev-Tools
Coding-Dev-Tools force-pushed the main branch 2 times, most recently from 3d330e8 to 8ef46b6 Compare November 4, 2026 06:12

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