Skip to content

docs(claude): align CLAUDE.md with prod deploy posture#10

Open
chitcommit wants to merge 1 commit into
mainfrom
docs/claude-md-align-with-prod-deploy
Open

docs(claude): align CLAUDE.md with prod deploy posture#10
chitcommit wants to merge 1 commit into
mainfrom
docs/claude-md-align-with-prod-deploy

Conversation

@chitcommit
Copy link
Copy Markdown
Contributor

Summary

  • Resolves the standalone-vs-prod drift flagged in 7c91f46: CLAUDE.md claimed chittyauth-app was a standalone, ChittyOS-isolated, any-custom-domain service, but wrangler.toml deploys name="chittyauth" to auth.chitty.cc on the ChittyCorp account with chittytrack tail-consumer and a Neon OAuth facade. Per maintainer decision, this app is the production owner of auth.chitty.cc — so the docs are wrong, not the wrangler config.
  • Replaces fictional D1 table list (api_tokens/users/audit_logs/oauth_clients) with the real schema.sql tables.
  • Replaces the inverted "Comparison to chittyauth" table with a Provider Modes table (local vs neon).
  • Switches normative secrets to canonical CHITTYAUTH_ISSUED_* names; legacy names retained only as migration aliases.
  • Rewrites "Differences from chittyauth" → "Implementation Notes" reflecting D1-as-primary, KV-as-cache, fail-closed signing (security: fail closed on missing signing-key (closes #5) #9), hash-lookup validate path (SECURITY.md Known Limitation chore(governance): add governance gates #3), and schema.sql as source of truth.

No code or wrangler.toml changes.

Test plan

  • Re-read CLAUDE.md end-to-end against wrangler.toml, schema.sql, src/auth-provider.js, and src/token-manager.js — every concrete claim should match.
  • Verify no remaining references to fictional tables or the "standalone, no-deps" framing.

🤖 Generated with Claude Code

CLAUDE.md described chittyauth-app as a "standalone, no-deps, any custom
domain" service. The actual wrangler.toml deploys name="chittyauth" to
auth.chitty.cc on the ChittyCorp account, owns the production auth route,
tail-consumes chittytrack, and supports a Neon OAuth facade — none of
which is "isolated from ChittyOS".

Fixes:
- Project Overview: this IS the auth.chitty.cc owner; drop the "standalone
  / any custom domain / no ChittyOS deps" framing.
- D1 table list: replace fictional api_tokens/users/audit_logs/oauth_clients
  with the real schema.sql tables (tokens, service_credentials, auth_events,
  token_stats, service_health, registrations).
- Replace the inverted "Comparison to chittyauth" table with a Provider
  Modes table (local vs neon).
- Secrets: switch normative section to canonical CHITTYAUTH_ISSUED_*
  names; legacy TOKEN_SIGNING_KEY / CHITTYCONNECT_API_KEY noted as
  migration aliases. Update Security Best Practices + Deployment
  Checklist to match.
- Replace "Differences from chittyauth" (which contradicted the prod
  topology) with Implementation Notes covering D1-as-primary, KV-as-cache,
  fail-closed signing (#9), hash-lookup validate path (SECURITY.md #3),
  and schema.sql as source of truth.

No code or wrangler.toml changes — this is the docs-only resolution of
the standalone-vs-prod drift flagged in 7c91f46.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 23, 2026

Warning

Review limit reached

@chitcommit, we couldn't start this review because you've used your available PR reviews for now.

Your plan currently allows 1 review/hour. Refill in 39 minutes and 39 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: be8b0580-3483-46cc-a61b-66af80e5783a

📥 Commits

Reviewing files that changed from the base of the PR and between 514b372 and c6bbb28.

📒 Files selected for processing (1)
  • CLAUDE.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/claude-md-align-with-prod-deploy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c6bbb28d32

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CLAUDE.md
- `auth_events` - Audit trail (issuance, validation, revocation)
- `token_stats` - Per-token usage counters
- `service_health` - Health snapshots
- `registrations` - Public-registration intake
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove registrations from schema.sql table list

This line states that registrations is part of schema.sql, but in this repo it is created in schema-update.sql (not the base schema). Following this guidance when bootstrapping a fresh D1 database with only schema.sql will leave the registrations table missing and can break /v1/register flows at runtime, so the doc should either point to schema-update.sql or clearly call out the migration step.

Useful? React with 👍 / 👎.

Comment thread CLAUDE.md
1. **D1 is the primary store**; Neon is only reachable via the OAuth facade when `CHITTYAUTH_PROVIDER=neon`.
2. **KV is hot-path cache** for token validation (30s TTL) and revocation checks — never the source of truth.
3. **Canonical secrets** (`CHITTYAUTH_ISSUED_*`) are authoritative; legacy `TOKEN_SIGNING_KEY` / `CHITTYCONNECT_API_KEY` remain as migration aliases only.
4. **Signing-key fallback fails closed** in production (per #9). Dev still tolerates the dev fallback.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove claim that dev still has signing-key fallback

This now says development still has a hardcoded signing-key fallback, but TokenManager throws when neither CHITTYAUTH_ISSUED_MINT_API_KEY nor TOKEN_SIGNING_KEY is set (no fallback path remains). Keeping this statement will send operators to debug the wrong failure mode when local/dev startup fails due to missing secrets.

Useful? React with 👍 / 👎.

Comment thread CLAUDE.md
2. **KV is hot-path cache** for token validation (30s TTL) and revocation checks — never the source of truth.
3. **Canonical secrets** (`CHITTYAUTH_ISSUED_*`) are authoritative; legacy `TOKEN_SIGNING_KEY` / `CHITTYCONNECT_API_KEY` remain as migration aliases only.
4. **Signing-key fallback fails closed** in production (per #9). Dev still tolerates the dev fallback.
5. **Token validation is hash-lookup, not signature-verify** today — see SECURITY.md Known Limitation #3.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update validation note to include signature verification

This statement says validation is hash-lookup only, but validate() now performs verifySignature(...) for non-legacy tokens before accepting them. Documenting the old behavior is a security-maintenance risk because reviewers may treat signature checks as absent and make incorrect threat-model or incident-response decisions.

Useful? React with 👍 / 👎.

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