Skip to content

feat(auth): prepare opaque credential acceptance and growth-safe CLI guidance - #86

Open
purpshell wants to merge 6 commits into
mainfrom
codex/mr-c-opaque-credentials
Open

purpshell wants to merge 6 commits into
mainfrom
codex/mr-c-opaque-credentials

Conversation

@purpshell

@purpshell purpshell commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Prepares opaque machine-credential acceptance and growth-safe CLI authentication guidance. The canonical API credential fixture remains byte-identical to the accepted producer.

Head 9e72acf also merges current main (b7ad48a) and adds separate account-device CLI profiles and seven account commands: login, list, use, status, logout, teams and projects. The account session lives in a separate keyring namespace and never reaches a machine SDK client. Login accepts only the configured Console /device approval URL, and the browser build refuses all seven commands. The consumer is bound to the API producer in polymorfa/polymorfa#880. Design and check record: docs/internal/2026-11-05-cli-account-device-source.md.

The one merge conflict, in docs/command-research/calls.md, keeps main's simultaneous-call guidance together with the team-key terminology.

Checks on the merged source (Node 24, public SDK 0.1.0-dev.20261004024706)

  • 73 account-device tests passed, with none failed, skipped or todo.
  • Typecheck, ESLint, formatting and the native build passed.
  • The command reference is unchanged at 388 public commands.
  • The browser verifier passed for 389 command IDs and 461 emitted files.
  • The package dry-run passed, and the production audit found zero vulnerabilities.
  • Not run: the complete protected credential-fixture runtime suite, any real OS keyring, and any real account.

Six-part assessment

Part Disposition
API Unaffected here. The account-device consumer targets polymorfa/polymorfa#880, which owns registration, sessions, grants, RLS and revocation. That producer's hosted availability is not yet established.
SDKs Unaffected. The declared public package is unchanged. Account transport is separate from the machine SDK clients.
CLI Updated. Adds opaque-credential acceptance guidance, separate account metadata and keyring storage, the seven account commands and machine-factory refusal.
Docs Updated. README and the generated command reference. No public changelog entry or availability claim until the producer ships.
Feature release Unaffected. No flag, entitlement, enrollment, package tag or deployment changes. Server registration and live grants remain authoritative.
Admin Unaffected. No new staff state or action. polymorfa/polymorfa#880 keeps session and grant authority and the existing revocation controls.

Merge gates

Blocked on an SDK release. The pinned public SDK 0.1.0-dev.20261004024706 predates the opaque-credential validators merged in polymorfa/sdks#355, so it rejects opaque pmfa_ keys and hosted CI fails 522 tests. No SDK has been published since 2026-10-17: the scheduled publisher fails because SDK_COVERAGE_CLIENT_ID and SDK_COVERAGE_APP_PRIVATE_KEY are not set. Once a dev SDK containing #355 is published, this PR re-pins to that exact version.

Current-head hosted CI, CodeRabbit, a correctness and security review and the ready producer (polymorfa/polymorfa#880) are required before merge. Publication and deployed availability are separate steps.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

The included review limit has been reached and this organization has disabled usage-based review continuation. Wait for reviews to reset or ask a billing admin to change After included review limits.

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 20 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 62 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Team
  • Run ID: fa463a99-8f16-48e0-bcea-b587568c9968
Commits

Reviewing files that changed from the base of the PR and between b7ad48a and 9e72acf.

Files selected for processing: 129

  • .prettierignore
  • README.md
  • contracts/cli-reference.json
  • docs/command-research/call-consent.md
  • docs/command-research/calls.md
  • docs/command-research/customers.md
  • docs/command-research/platform-management.md
  • docs/command-research/quicklinks.md
  • docs/command-research/voice.md
  • docs/development/bansafe-sdk-integration.md
  • docs/internal/2026-11-05-cli-account-device-source.md
  • docs/opaque-credentials-cutover.md
  • docs/superpowers/specs/2026-08-19-polymorfa-cli-design.md
  • package.json
  • scripts/verify-browser.mjs
  • skills/polymorfa/SKILL.md
  • src/account-device/command.ts
  • src/account-device/factory.ts
  • src/account-device/service.ts
  • src/account-device/storage.ts
  • src/account-device/transport.ts
  • src/base-command.ts
  • src/browser/command-support.ts
  • src/browser/registry.gen.ts
  • src/commands/account/list.ts
  • src/commands/account/login.ts
  • src/commands/account/logout.ts
  • src/commands/account/projects.ts
  • src/commands/account/status.ts
  • src/commands/account/teams.ts
  • src/commands/account/use.ts
  • src/commands/auth/login.ts
  • src/commands/billing/limits/list.ts
  • src/commands/billing/limits/set.ts
  • src/commands/billing/priority/list.ts
  • src/commands/billing/priority/reorder.ts
  • src/commands/billing/priority/set.ts
  • src/commands/calls/export.ts
  • src/commands/calls/opt-outs/add.ts
  • src/commands/calls/opt-outs/import.ts
  • src/commands/calls/opt-outs/list.ts
  • src/commands/calls/opt-outs/remove.ts
  • src/commands/calls/policy/get.ts
  • src/commands/calls/policy/set.ts
  • src/commands/calls/stats.ts
  • src/commands/key/revoke.ts
  • src/commands/listen.ts
  • src/commands/session/list.ts
  • src/commands/session/status.ts
  • src/commands/session/view.ts
  • src/context/environment.ts
  • src/mcp/server.ts
  • src/mcp/session-discovery.ts
  • src/sdk/client.ts
  • src/services/campaigns.ts
  • src/services/projects.ts
  • test/account-device/commands.test.ts
  • test/account-device/machine-refusal.test.ts
  • test/account-device/service-fixture.ts
  • test/account-device/service.test.ts
  • test/account-device/storage.test.ts
  • test/account-device/transport.test.ts
  • test/commands/analytics.test.ts
  • test/commands/api-gh.test.ts
  • test/commands/api.test.ts
  • test/commands/audiences-optouts.test.ts
  • test/commands/auth.test.ts
  • test/commands/bansafe.test.ts
  • test/commands/billing-controls.test.ts
  • test/commands/business.test.ts
  • test/commands/call-analytics.test.ts
  • test/commands/call-consent.test.ts
  • test/commands/call-links.test.ts
  • test/commands/call-records.test.ts
  • test/commands/calls-and-identities.test.ts
  • test/commands/calls.test.ts
  • test/commands/campaign-conversions.test.ts
  • test/commands/campaign-follow-ups.test.ts
  • test/commands/campaign-recipients.test.ts
  • test/commands/campaigns.test.ts
  • test/commands/channels.test.ts
  • test/commands/cloud-group.test.ts
  • test/commands/cloud.test.ts
  • test/commands/contacts.test.ts
  • test/commands/customers.test.ts
  • test/commands/developer-webhooks.test.ts
  • test/commands/doctor.test.ts
  • test/commands/event-stream.test.ts
  • test/commands/events.test.ts
  • test/commands/flow-endpoints.test.ts
  • test/commands/flows.test.ts
  • test/commands/functions.test.ts
  • test/commands/group-mutations.test.ts
  • test/commands/groups.test.ts
  • test/commands/history.test.ts
  • test/commands/hybrid-credentials.test.ts
  • test/commands/hybrid-link.test.ts
  • test/commands/labels.test.ts
  • test/commands/listen.test.ts
  • test/commands/media.test.ts
  • test/commands/message-sends.test.ts
  • test/commands/messages.test.ts
  • test/commands/number-tiers.test.ts
  • test/commands/operations.test.ts
  • test/commands/platform-management.test.ts
  • test/commands/presence.test.ts
  • test/commands/privacy.test.ts
  • test/commands/profile.test.ts
  • test/commands/project-context.test.ts
  • test/commands/quick-replies.test.ts
  • test/commands/quicklinks.test.ts
  • test/commands/request-logs.test.ts
  • test/commands/sip-trunks.test.ts
  • test/commands/trigger.test.ts
  • test/commands/usage.test.ts
  • test/commands/voice-wait-timeout.test.ts
  • test/commands/voice.test.ts
  • test/config/credential-vectors.test.ts
  • test/context/environment.test.ts
  • test/developer/client.test.ts
  • test/fixtures/machine-credentials-v1.json
  • test/input/stdin.test.ts
  • test/mcp/session-discovery.test.ts
  • test/sdk/client.test.ts
  • test/services/auth.test.ts
  • test/services/doctor.test.ts
  • test/services/groups.test.ts
  • test/services/projects.test.ts
  • test/services/voice.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@purpshell
purpshell force-pushed the codex/mr-c-opaque-credentials branch from 5cfb098 to e4708d4 Compare October 28, 2026 04:54
@purpshell
purpshell force-pushed the codex/mr-c-opaque-credentials branch from e4708d4 to 233ec3b Compare October 30, 2026 01:42
@purpshell
purpshell marked this pull request as ready for review October 31, 2026 04:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 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-31T04:48:26.662129Z 233ec3b Draft marked ready
🔒 Security Review ✅ Completed 2026-10-31T04:48:31.538140Z 233ec3b Draft marked ready
ℹ️ 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.

@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: 233ec3b204

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

fixture.kind === 'key'
? validateOrganizationApiKey
: validateProjectToken
expect(validate(fixture.token)).toBe(fixture.token)

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 Pin a compatible SDK before switching credential fixtures

With the committed dependency graph, @polymorfa/sdk remains pinned to 0.1.0-dev.20261004024706, which rejects these opaque credentials, as documented in docs/opaque-credentials-cutover.md. Consequently, this acceptance assertion and the many existing tests switched to the same credentials fail during validation before reaching storage or transport. Update both the SDK dependency and lockfile to an accepted compatible artifact before enabling these fixtures; documenting the external gate does not make the committed tests compatible with a clean install.

Useful? React with 👍 / 👎.

Comment on lines 9 to +10
static override description =
'Store an organization key or project token in the operating-system keyring.'
'Store an opaque team key or project token in the operating-system keyring. Never parse credentials or assume a fixed length.'

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 Regenerate the CLI reference after changing command descriptions

The changed command descriptions are not reflected in contracts/cli-reference.json; for example, its auth login summary and description still contain the previous organization-key wording. scripts/cli-reference.mjs derives both fields from the compiled command and its --check mode throws on any difference, so the reference-check stage of npm run verify will fail even after the SDK compatibility issue is resolved. Regenerate and commit the reference with npm run docs:reference for all modified command metadata.

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