Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions PR_BODY_REVENUE_ENTITLEMENT_DELIVERY_20.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/claim #20

## Summary

Adds `revenue-entitlement-delivery-guard/`, a focused Revenue Infrastructure guard for contract-to-entitlement delivery evidence.

This is distinct from existing #20 slices for broad billing modules, subscriptions, renewal notices, dunning holds, tax/FX, quota rollover, metering, payment disputes, grant budgets, privacy-safe licensing, analytics-seat rosters, data-product freshness, and revenue-recognition close controls. It focuses only on whether signed customer contract lines have been provisioned as seats, quotas, data feeds, support tiers, and delivery evidence before billing, renewal, expansion, or revenue-recognition workflows proceed.

## What is included

- Dependency-free Node evaluator.
- Synthetic contract and entitlement-delivery packets.
- Deterministic `RELEASE_REVENUE`, `REVIEW_REVENUE`, and `HOLD_REVENUE` decisions.
- Checks for contract term dates, delivery evidence hash, customer acceptance, account-owner acknowledgement, under-delivered seats/quotas/feeds/support, over-provisioned entitlements, unpurchased data feeds, and missing revenue holds.
- Reviewer artifacts:
- `reports/summary.json`
- `reports/reviewer-packet.md`
- `reports/summary.svg`
- `reports/demo.mp4`

## Validation

Locally verified:

```text
npm.cmd test
npm.cmd run demo
npm.cmd run check
npm.cmd run video
git diff --check
confirmed reports/demo.mp4 was generated as a non-empty local artifact
```

The MP4 demo is an FFmpeg-generated synthetic slate only. It is not a screen recording and contains no desktop capture, credentials, private files, or personal information.

AI-assisted with OpenAI Codex; I reviewed and locally verified the implementation before submitting.
42 changes: 42 additions & 0 deletions revenue-entitlement-delivery-guard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Revenue Entitlement Delivery Guard

This contribution adds a focused guard for SCIBASE's Revenue Infrastructure layer. It checks whether a signed subscription, compute, API, or data-licensing contract has actually been provisioned before billing, renewal, expansion, or revenue-recognition workflows treat the account as delivered.

The slice is intentionally narrow. It does not replace pricing, checkout, metering, tax, FX, dunning, subscription-renewal notices, quota rollover, dispute evidence, grant budgets, privacy-safe licensing, or revenue-recognition close controls. It covers the delivery-evidence boundary between commercial contract lines and platform entitlements.

## What It Checks

- Contract term dates align with active billing.
- Delivery evidence hash and customer acceptance are present.
- Purchased seat counts match provisioned user entitlements.
- Purchased API, compute, and storage quotas match provisioned limits.
- Purchased analytics or data feeds are enabled, and unpurchased feeds are not accidentally exposed.
- Support tier, SLA, and account-owner acknowledgement match the contract.
- Revenue recognition is held when delivery findings are unresolved.
- Deterministic reviewer packets explain `RELEASE_REVENUE`, `REVIEW_REVENUE`, or `HOLD_REVENUE` decisions.

## Running Locally

```bash
npm test
npm run demo
npm run check
npm run video
```

The demo uses only synthetic contract packets in `data/sample_entitlement_delivery_packets.json`.

Generated files:

- `reports/summary.json`
- `reports/reviewer-packet.md`
- `reports/summary.svg`
- `reports/demo.mp4`

The MP4 is generated from an FFmpeg color source and drawtext slate. It is not a screen recording and contains no desktop capture or private information.

## Why This Matters

Revenue infrastructure is not only about collecting money. Institutional customers need the access, quotas, support, and licensed feeds they bought, while SCIBASE needs a clean record that delivery happened before finance systems recognize the account as complete.

This guard gives finance and platform reviewers a deterministic packet to catch under-delivery, accidental over-entitlement, missing evidence, and unsafe revenue-recognition states before invoices, renewals, and reporting workflows move forward.
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
[
{
"id": "revenue-release-001",
"title": "Institutional license delivered cleanly",
"contract": {
"accountId": "inst-north-001",
"termStart": "2026-08-01",
"termEnd": "2027-07-31",
"billingActive": true,
"revenueRecognitionReady": true,
"revenueHold": false,
"currency": "USD",
"lines": [
{
"sku": "institutional-license",
"amount": 48000,
"entitlements": {
"seats": 40,
"apiCalls": 100000,
"computeHours": 400,
"storageGb": 2000,
"dataFeeds": ["analytics-digest"],
"supportTier": "enterprise"
}
}
]
},
"delivery": {
"deliveryDate": "2026-08-05",
"evidenceHash": "sha256:ae541f458d2f6ca52b7dd8ce2a894020358d8a91f1d3b71d0fbd5f62b715db77",
"acceptedByCustomer": true,
"ownerAcknowledged": true,
"entitlements": {
"seats": 40,
"apiCalls": 100000,
"computeHours": 400,
"storageGb": 2000,
"dataFeeds": ["analytics-digest"],
"supportTier": "enterprise"
}
}
},
{
"id": "revenue-hold-002",
"title": "Active billing before customer access is delivered",
"contract": {
"accountId": "lab-east-002",
"termStart": "2026-08-01",
"termEnd": "2027-07-31",
"billingActive": true,
"revenueRecognitionReady": true,
"revenueHold": false,
"currency": "USD",
"lines": [
{
"sku": "lab-pro",
"amount": 12000,
"entitlements": {
"seats": 25,
"apiCalls": 50000,
"computeHours": 250,
"storageGb": 1000,
"dataFeeds": ["usage-metadata"],
"supportTier": "professional"
}
}
]
},
"delivery": {
"deliveryDate": "2026-08-07",
"evidenceHash": "",
"acceptedByCustomer": false,
"ownerAcknowledged": false,
"entitlements": {
"seats": 12,
"apiCalls": 0,
"computeHours": 100,
"storageGb": 1000,
"dataFeeds": [],
"supportTier": "standard"
}
}
},
{
"id": "revenue-review-003",
"title": "Expansion account over-provisioned before true-up",
"contract": {
"accountId": "r-and-d-west-003",
"termStart": "2026-07-15",
"termEnd": "2027-07-14",
"billingActive": true,
"revenueRecognitionReady": false,
"revenueHold": true,
"currency": "USD",
"lines": [
{
"sku": "analytics-api",
"amount": 18000,
"entitlements": {
"seats": 10,
"apiCalls": 250000,
"computeHours": 0,
"storageGb": 200,
"dataFeeds": ["analytics-digest"],
"supportTier": "professional"
}
}
]
},
"delivery": {
"deliveryDate": "2026-08-01",
"evidenceHash": "sha256:b467e61f098e041c5a67663a8efef30d11016e7fb4a9de264aa9fce7e4ba0f14",
"acceptedByCustomer": true,
"ownerAcknowledged": true,
"entitlements": {
"seats": 15,
"apiCalls": 300000,
"computeHours": 0,
"storageGb": 200,
"dataFeeds": ["analytics-digest", "licensed-benchmark-feed"],
"supportTier": "professional"
}
}
},
{
"id": "revenue-hold-004",
"title": "Expired data license still marked revenue-ready",
"contract": {
"accountId": "consortium-south-004",
"termStart": "2025-06-01",
"termEnd": "2026-05-31",
"billingActive": true,
"revenueRecognitionReady": true,
"revenueHold": false,
"currency": "USD",
"lines": [
{
"sku": "data-license",
"amount": 36000,
"entitlements": {
"seats": 5,
"apiCalls": 10000,
"computeHours": 0,
"storageGb": 100,
"dataFeeds": ["licensed-benchmark-feed"],
"supportTier": "standard"
}
}
]
},
"delivery": {
"deliveryDate": "2026-08-15",
"evidenceHash": "sha256:c1375f1fb07f24f37a637f080e24c2d30500fc40edfc989850224123ca2ed33f",
"acceptedByCustomer": true,
"ownerAcknowledged": true,
"entitlements": {
"seats": 5,
"apiCalls": 10000,
"computeHours": 0,
"storageGb": 100,
"dataFeeds": ["licensed-benchmark-feed"],
"supportTier": "standard"
}
}
}
]
13 changes: 13 additions & 0 deletions revenue-entitlement-delivery-guard/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "revenue-entitlement-delivery-guard",
"version": "1.0.0",
"description": "Dependency-free guard for revenue contract-to-entitlement delivery evidence.",
"main": "src/index.js",
"scripts": {
"test": "node --test",
"demo": "node scripts/demo.js",
"video": "node scripts/render-demo-video.js",
"check": "node --check src/index.js && node --check scripts/demo.js && node --check scripts/render-demo-video.js"
},
"license": "MIT"
}
Binary file not shown.
63 changes: 63 additions & 0 deletions revenue-entitlement-delivery-guard/reports/reviewer-packet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Revenue Entitlement Delivery Guard Report

Generated: 2026-08-16T15:02:48.939Z
Contract packets analyzed: 4
Decision counts: RELEASE_REVENUE 1, REVIEW_REVENUE 1, HOLD_REVENUE 2

## Findings

### revenue-release-001: Institutional license delivered cleanly

Decision: RELEASE_REVENUE
Account: inst-north-001

- No entitlement delivery risk detected.

Recommended actions:
- Allow billing, renewal, expansion, and revenue-recognition workflows to proceed with the attached delivery evidence.

### revenue-hold-002: Active billing before customer access is delivered

Decision: HOLD_REVENUE
Account: lab-east-002

- MAJOR DELIVERY_EVIDENCE_HASH_MISSING: The entitlement delivery packet lacks a stable evidence hash.
- MAJOR CUSTOMER_ACCEPTANCE_MISSING: The customer has not accepted or acknowledged entitlement delivery.
- MAJOR ACCOUNT_OWNER_ACK_MISSING: The internal account owner has not acknowledged the provisioned entitlements.
- CRITICAL ENTITLEMENT_UNDER_DELIVERED: One or more purchased entitlements are under-provisioned.
- CRITICAL LICENSED_FEED_NOT_ENABLED: A purchased analytics or data feed is not enabled for the customer.
- CRITICAL SUPPORT_TIER_UNDER_DELIVERED: The provisioned support tier is below the signed contract tier.
- CRITICAL REVENUE_RECOGNITION_NOT_HELD_FOR_DELIVERY_RISK: Revenue recognition remains ready while entitlement-delivery findings are unresolved.

Recommended actions:
- Place revenue recognition and renewal automation on hold.
- Attach entitlement findings to the revenue operations review packet.
- Reconcile contract lines against provisioned seats, quotas, feeds, and support tier.
- Regenerate delivery evidence after provisioning or commercial amendments are complete.

### revenue-review-003: Expansion account over-provisioned before true-up

Decision: REVIEW_REVENUE
Account: r-and-d-west-003

- MAJOR ENTITLEMENT_OVER_PROVISIONED: One or more entitlements exceed the signed contract and need true-up or correction.
- MAJOR UNPURCHASED_FEED_ENABLED: An analytics or data feed is enabled without a matching contract line.

Recommended actions:
- Attach entitlement findings to the revenue operations review packet.
- Reconcile contract lines against provisioned seats, quotas, feeds, and support tier.
- Regenerate delivery evidence after provisioning or commercial amendments are complete.

### revenue-hold-004: Expired data license still marked revenue-ready

Decision: HOLD_REVENUE
Account: consortium-south-004

- CRITICAL DELIVERY_DATE_OUTSIDE_CONTRACT_TERM: The delivery date is missing or outside the active contract term.
- CRITICAL REVENUE_RECOGNITION_NOT_HELD_FOR_DELIVERY_RISK: Revenue recognition remains ready while entitlement-delivery findings are unresolved.

Recommended actions:
- Place revenue recognition and renewal automation on hold.
- Attach entitlement findings to the revenue operations review packet.
- Reconcile contract lines against provisioned seats, quotas, feeds, and support tier.
- Regenerate delivery evidence after provisioning or commercial amendments are complete.
Loading