Skip to content

Goal: Harden the Cubid SDK for the production Identity issuer #35

Description

@KazanderDad

Parent: https://github.com/Cubid-Me/cubid-monorepo/issues/49
Brainstorm Task: Capture production SIWC hosted-test evidence and narrowing
Sequence: Goal 2 of 3

Objective

Make the canonical public SDK fail closed against an unavailable or inconsistent production issuer and provide release-grade acceptance evidence for https://id.cubid.me.

Execution Tasks

  • Add production discovery/JWKS/issuer readiness gates.
  • Harden environment-specific docs, examples, and mismatch coverage across the auth packages.

Sequence Context

  • Previously blocked by: the monorepo production protocol boundary Goal. This blocker is satisfied by Cubid monorepo #51 and #54 reaching On dev.
  • Enables: the starter deployment and full relying-party smoke Goal.
  • Run independently by: a fresh Codex thread in Cubid-Me/cubid-sdk now that the production issuer handoff is reachable.

Non-Goals

  • Runtime/Identity implementation.
  • Silent fallback from production to staging.
  • Publishing a release without separate release-promotion approval.

Guardrails

  • Keep strict ID-token issuer and audience validation.
  • Keep secrets and client credentials out of browser packages and examples.
  • Use dedicated @cubid/auth and @cubid/auth-react ownership.
  • Evaluate any protocol-shape change against the private monorepo first.

Expected Codebase Surfaces

  • packages/auth/**, packages/auth-react/**, and packages/acceptance/**.
  • Root/package READMEs and CI workflows.
  • Repo branch session log and cross-repo issue links.

Acceptance Criteria

  • Production readiness checks detect DNS, discovery, JWKS, endpoint, and issuer mismatches.
  • Staging remains explicit and cannot be selected as an implicit production fallback.
  • Documentation and examples present consistent production/staging configuration.
  • Relevant package tests and acceptance suites pass.

Validation Plan

Run focused auth tests, acceptance tests, repo lint/typecheck/build, and live production metadata probes without exchanging user credentials.

Child Tasks

Risks And Mitigations

  • Hosted issuer may regress after validation: automate recurring smoke and fail release promotion.
  • Strict checks may surface existing consumer misconfiguration: document remediation rather than weakening validation.

Stop Condition

Stop when SDK changes are committed and independently validated against the live production issuer, with no package publication performed unless separately approved.

Vetting Addendum — 2026-07-16

Implementation Worktree

Before creating this worktree, fetch origin/dev; the existing /Users/botmaster/src/cubid/cubid-sdk checkout is a stale shallow legacy checkout and is not the implementation surface. Use the canonical monorepo package structure from origin/dev. Update code, technical docs, tests, CI, and the branch-scoped session log as required.

Integrated validation and smoke

Run the canonical origin/dev lint, typecheck, test, build, and acceptance commands discovered from that branch. Then run the metadata-only readiness command against production and explicit staging fixtures, proving exact issuer equality, discovery/JWKS reachability, supported PKCE/code flow, mismatch failures, and no implicit fallback. No UI visual evidence is required for this SDK-only Goal.

Issue Validator

After both Tasks, local/live validation, session-log updates, and commits, run $issue-validator before moving this Goal to In Review. Provide the Goal/Sprint URLs, commits, worktree, changed files, commands/results, metadata smoke results, non-goals, and Visual evidence: N/A. The validator checks strict issuer/audience behavior, failure fixtures, release-gate wiring, docs/examples consistency, no legacy-checkout contamination, and boundary compliance; reports pass, pass-with-notes, or fail to sprint-orchestrator; and comments here. A fail returns the relevant Task to implementation.

Stop at In Review; do not publish packages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions