Skip to content

ATOM-TLI-001: Define tenant-local identity architecture and contracts - #137

Open
arvindh123 wants to merge 1 commit into
feature/tenant-local-identitiesfrom
codex/tenant-local-identity-contracts
Open

arvindh123 wants to merge 1 commit into
feature/tenant-local-identitiesfrom
codex/tenant-local-identity-contracts

Conversation

@arvindh123

Copy link
Copy Markdown
Contributor

Issue #99 requires independent app-user identities, while current signup, email uniqueness and recovery still use the global identity model. This first staged PR proposes the architecture and compatibility contract for implementing that isolation.

Refs #99; ATOM-TLI-001. This PR deliberately leaves the parent issue open. It targets feature/tenant-local-identities, created from main at 775a326.

Changes

  • Add a PRD with 11 functional and 4 non-functional requirements, acceptance evidence and traceability.
  • Add an RFC proposing answers to all six architecture decisions in Feature: tenant-local human identities for app-per-tenant isolation #99: explicit scope, database-owned tenant mode, additive explicit platform login, fresh tenant-specific password setup at migration, policy-controlled platform machine access, and protected application configuration references.
  • Define namespace-aware lookup, sessions/JWT/refresh, recovery/email change, invitations, OAuth, credential/broker/certificate boundaries, authorization, lifecycle, staged index relaxation and rollback.
  • Preserve legacy tenant-owned machine behavior until explicit migration. Clarify why independently enrolled accounts may have equal password text while credentials and sessions remain isolated.
  • Map the 13 capability stages and dependencies. Broad stages must be split into focused implementation leaves as needed; no child issues are created by this PR.
  • Add the integration branch to the existing Rust, API and frontend pull-request workflow filters.

Compatibility and migration

No runtime, database, generated API or frozen v1 contract changes. The documents are proposals for architecture review, not claims that tenant-local authentication is available. Implementation and final stabilization remain subsequent PRs. Applied baseline migrations remain untouched.

Validation

Passed locally:

  • cargo fmt --check
  • git diff --cached --check
  • Parsed all three changed workflow files and verified the integration PR branch filters.
  • Verified all nine local document links, 15 requirement rows and 13 delivery stages.

Environment limitations:

  • cargo clippy --locked -- -D warnings was attempted but could not finish: the Windows aws-lc-sys build requires NASM, which is unavailable (the MSVC feature probe also failed).
  • python scripts/test-v1-contracts.py could not validate on this Windows checkout: the initial shell was inaccessible; retry with Git Bash reached the existing CRLF shell script and failed at set -euo pipefail.
  • No runtime code changed, and the database/adversarial suites were not run locally. Existing Linux CI is enabled for the integration target by this PR.

Review focus

Accept or amend the RFC namespace, compatibility, admission and cutover decisions before ATOM-TLI-002. Merging this PR does not enable the feature or close #99.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

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 ✅ Completed 2026-10-12T19:31:42.125248Z 66d264b 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.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
atom-docs 66d264b Commit Preview URL

Branch Preview URL
Oct 12 2026, 07:29 PM

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

Copy link
Copy Markdown

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: 66d264bb80

ℹ️ 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 on lines +212 to +214
2. Ship all namespace-aware readers/writers, guards, tokens, caches and lifecycle
behavior. Deploy compatible binaries only, then apply activation migration/gate.
Record a minimum compatible version; startup must reject unsafe downgrades after

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Split compatibility rollout from the activation migration

In a rolling PostgreSQL deployment, the first binary containing the activation migration applies it automatically at startup, while older replicas may still serve requests; those readers can then encounter the duplicate cross-tenant identifiers that lines 122–126 explicitly call ambiguous. A minimum-version check in the new binary cannot stop already-running old replicas, so this needs a separate pre-activation release deployed across the fleet before a later release embeds the index-relaxation migration (or an equivalent database-enforced fence).

AGENTS.md reference: AGENTS.md:L150-L150

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