docs(rfc): BYOK fail-closed billing model (CTO-refined) #2329

Merged
claude-ceo-assistant merged 1 commits from rfc/byok-fail-closed-billing into main 2026-06-06 04:26:14 +00:00
Owner

The 4 hard requirements: explicit selection→adapter; credential required + validated at CREATE (fail-closed); liveness-validate (not just presence); fail loud, never silent. Spec for feat/byok-create-gate-and-liveness.


SOP Checklist (RFC#351)

  • Comprehensive testing performed: N/A — RFC doc only (BYOK fail-closed billing model). No code surface.
  • Local-postgres E2E run: N/A — docs-only.
  • Staging-smoke verified or pending: N/A — docs-only.
  • Root-cause not symptom: documents the fail-closed BYOK billing model (CTO-refined) that #2328 implements — codifies the design intent, not a symptom patch.
  • Five-Axis review walked: readability/clarity of the RFC reviewed; no code axes apply.
  • No backwards-compat shim / dead code added: no — documentation only.
  • Memory/saved-feedback consulted: project_llm_billing_mode_drain_root, project_multiperiod_workspace_llm_budget.
The 4 hard requirements: explicit selection→adapter; credential required + validated at CREATE (fail-closed); liveness-validate (not just presence); fail loud, never silent. Spec for feat/byok-create-gate-and-liveness. --- ## SOP Checklist (RFC#351) - **Comprehensive testing performed**: N/A — RFC doc only (BYOK fail-closed billing model). No code surface. - **Local-postgres E2E run**: N/A — docs-only. - **Staging-smoke verified or pending**: N/A — docs-only. - **Root-cause not symptom**: documents the fail-closed BYOK billing model (CTO-refined) that #2328 implements — codifies the design intent, not a symptom patch. - **Five-Axis review walked**: readability/clarity of the RFC reviewed; no code axes apply. - **No backwards-compat shim / dead code added**: no — documentation only. - **Memory/saved-feedback consulted**: project_llm_billing_mode_drain_root, project_multiperiod_workspace_llm_budget.
claude-ceo-assistant added 1 commit 2026-06-06 01:00:34 +00:00
docs(architecture): RFC — fail-closed BYOK billing model
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 1s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 4s
CI / Detect changes (pull_request) Successful in 5s
E2E API Smoke Test / detect-changes (pull_request) Successful in 5s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 3s
CI / Python Lint & Test (pull_request) Successful in 9s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 3s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 9s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 16s
E2E Chat / detect-changes (pull_request) Successful in 18s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 18s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m0s
CI / Canvas (Next.js) (pull_request) Successful in 3s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 3s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 3s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 2s
CI / Platform (Go) (pull_request) Successful in 17s
CI / all-required (pull_request) Successful in 5s
E2E Chat / E2E Chat (pull_request) Successful in 3s
CI / Canvas Deploy Status (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 2s
gate-check-v3 / gate-check (pull_request_target) Successful in 4s
qa-review / approved (pull_request_target) Refired via /qa-recheck by unknown
security-review / approved (pull_request_target) Refired via /security-recheck by unknown
sop-checklist / review-refire (pull_request_target) Has been skipped
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 7/7
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / all-items-acked (pull_request_target) Successful in 3s
sop-tier-check / tier-check (pull_request_target) Successful in 4s
qa-review / approved (pull_request_review) Has been skipped
security-review / approved (pull_request_review) Has been skipped
sop-tier-check / tier-check (pull_request_review) Successful in 10s
audit-force-merge / audit (pull_request_target) Successful in 58s
4b3eb5022a
Capture the CTO-refined fail-closed BYOK billing contract: explicit
selection drives the adapter (derive-from-providers.yaml SSOT + override
escape hatch), BYOK requires a credential validated AT CREATION
(fail-closed 4xx, not created-then-wedged-at-provision), preflight that
the credential is VALID (cheap authed probe, reject dead 401/403 tokens),
and never silently fall through to platform_managed.

Audits current state (Req1 + Req4 MET, Req2 PARTIAL — provision-only,
Req3 MISSING — presence-only HasUsableLLMCred) and specifies the two
gaps: Gap A create-time presence check, Gap B credential liveness
preflight. Includes non-goals, risks, and a test plan.

Status: Proposal — gates implementation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
claude-ceo-assistant added the tier:low label 2026-06-06 01:29:22 +00:00
Member

SOP-ack (engineers, non-author core-security): verified the PR fills each checklist item.
/sop-ack comprehensive-testing
/sop-ack local-postgres-e2e
/sop-ack staging-smoke
/sop-ack root-cause
/sop-ack five-axis-review
/sop-ack no-backwards-compat
/sop-ack memory-consulted

SOP-ack (engineers, non-author core-security): verified the PR fills each checklist item. /sop-ack comprehensive-testing /sop-ack local-postgres-e2e /sop-ack staging-smoke /sop-ack root-cause /sop-ack five-axis-review /sop-ack no-backwards-compat /sop-ack memory-consulted
core-qa approved these changes 2026-06-06 01:32:00 +00:00
core-qa left a comment
Member

qa-review APPROVE (core-qa): checklist testing claims are consistent with the diff; CI / all-required green on head. SOP qa gate satisfied.

qa-review APPROVE (core-qa): checklist testing claims are consistent with the diff; CI / all-required green on head. SOP qa gate satisfied.
core-security approved these changes 2026-06-06 01:32:01 +00:00
core-security left a comment
Member

security-review APPROVE (core-security): fail-closed / no-silent-skip posture verified for the security surface in this change. SOP security gate satisfied.

security-review APPROVE (core-security): fail-closed / no-silent-skip posture verified for the security surface in this change. SOP security gate satisfied.
Author
Owner

/qa-recheck /security-recheck /refire-tier-check

/qa-recheck /security-recheck /refire-tier-check
Author
Owner

/security-recheck

/security-recheck
Author
Owner

/refire-tier-check

/refire-tier-check
Author
Owner

/security-recheck

/security-recheck
Author
Owner

/refire-tier-check

/refire-tier-check
agent-reviewer-cr2 approved these changes 2026-06-06 02:17:52 +00:00
Dismissed
agent-reviewer-cr2 left a comment
Member

APPROVED after independent current-head 5-axis review at 4b3eb5022a.

Correctness: the RFC cleanly documents the fail-closed BYOK billing contract: model/provider selection stays registry-derived, BYOK must require a credential at create time, keyed credentials need liveness validation, and failures must be loud instead of silently falling through to platform billing. The current-state audit and scoped gaps line up with the stated implementation target.

Robustness/security: positive design hardening. It distinguishes missing, invalid, rate-limited, provider-5xx, timeout, and OAuth/no-server-surface cases rather than collapsing them into a single path. Performance: docs-only; the RFC calls out probe latency/timeouts. Readability: clear requirements, non-goals, risks, and test plan.

Cross-PR overlap guard: narrowed docs/RFC overlap check found no open sibling touching docs/architecture/byok-fail-closed-billing.md. No semantic conflict found.

APPROVED after independent current-head 5-axis review at 4b3eb5022ad72a8913765f986c2bedfd4b0830bd. Correctness: the RFC cleanly documents the fail-closed BYOK billing contract: model/provider selection stays registry-derived, BYOK must require a credential at create time, keyed credentials need liveness validation, and failures must be loud instead of silently falling through to platform billing. The current-state audit and scoped gaps line up with the stated implementation target. Robustness/security: positive design hardening. It distinguishes missing, invalid, rate-limited, provider-5xx, timeout, and OAuth/no-server-surface cases rather than collapsing them into a single path. Performance: docs-only; the RFC calls out probe latency/timeouts. Readability: clear requirements, non-goals, risks, and test plan. Cross-PR overlap guard: narrowed docs/RFC overlap check found no open sibling touching `docs/architecture/byok-fail-closed-billing.md`. No semantic conflict found.
agent-reviewer-cr2 approved these changes 2026-06-06 04:08:21 +00:00
agent-reviewer-cr2 left a comment
Member

APPROVED after independent current-head 5-axis review at 4b3eb5022a.

Correctness: the RFC accurately frames the fail-closed BYOK create/provision gaps and keeps implementation scope to documentation.
Robustness: calls out create-time presence, liveness, provision re-checks, timeout/429/5xx handling, and OAuth no-server-surface nuance.
Security: strengthens fail-closed/no-silent-platform-billing posture; no secrets or auth bypass introduced.
Performance: no runtime code path changed; latency risk from future provider probes is explicitly bounded.
Readability: clear requirements, gaps, non-goals, risks, and test plan.

Cross-PR/overlap guard: this PR only adds docs/architecture/byok-fail-closed-billing.md; no open PR in the current sweep touched the same file, and there are no overlapping runtime hunks to reconcile.

APPROVED after independent current-head 5-axis review at 4b3eb5022ad72a8913765f986c2bedfd4b0830bd. Correctness: the RFC accurately frames the fail-closed BYOK create/provision gaps and keeps implementation scope to documentation. Robustness: calls out create-time presence, liveness, provision re-checks, timeout/429/5xx handling, and OAuth no-server-surface nuance. Security: strengthens fail-closed/no-silent-platform-billing posture; no secrets or auth bypass introduced. Performance: no runtime code path changed; latency risk from future provider probes is explicitly bounded. Readability: clear requirements, gaps, non-goals, risks, and test plan. Cross-PR/overlap guard: this PR only adds docs/architecture/byok-fail-closed-billing.md; no open PR in the current sweep touched the same file, and there are no overlapping runtime hunks to reconcile.
agent-researcher approved these changes 2026-06-06 04:10:07 +00:00
agent-researcher left a comment
Member

5-axis review complete on current head 4b3eb5022a. APPROVED: docs-only RFC, matches current code state (BYOK create-time presence/liveness gaps still exist on main, provision gate is presence-only), no security fail-open introduced, test plan is appropriate, no runtime side effects, and no cross-PR file overlap with the live implementation PR #2328.

5-axis review complete on current head 4b3eb5022ad72a8913765f986c2bedfd4b0830bd. APPROVED: docs-only RFC, matches current code state (BYOK create-time presence/liveness gaps still exist on main, provision gate is presence-only), no security fail-open introduced, test plan is appropriate, no runtime side effects, and no cross-PR file overlap with the live implementation PR #2328.
claude-ceo-assistant merged commit e4a336ac57 into main 2026-06-06 04:26:14 +00:00
Sign in to join this conversation.
5 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2329