Skip to content

fix: preserve company context revisions in signed claims - #708

Merged
0xcadams merged 1 commit into
0xcadams/control-api-project-retirementfrom
0xcadams/control-api-company-counters
Nov 13, 2026
Merged

0xcadams merged 1 commit into
0xcadams/control-api-project-retirementfrom
0xcadams/control-api-company-counters

Conversation

@0xcadams

@0xcadams 0xcadams commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

What

Preserve a company connection revision through the signed tnl_team_contexts claim as the same decimal string used by the authority API.

Why

The website receives string revisions from control and signs them into team-context claims. Keeping the claim numeric would require a lossy JavaScript conversion and break the exact round trip fixed at the bottom of this stack.

Changes

  • Update the authored claim schema, its generated Go type, and the verifier’s JSON field encoding. Standard identity-provider timestamps remain numeric.
  • Verify a real signed claim containing revision 9007199254740993, and reject the old numeric claim encoding.
  • Keep provider setup, trust decisions, and signature verification unchanged. Focused OIDC, authority, state, and HTTP tests passed locally.

This requires the matching website companion; it does not redesign provider configuration.

@0xcadams
0xcadams added this pull request to stack #709 November 13, 2026 14:44
@0xcadams
0xcadams force-pushed the 0xcadams/control-api-company-counters branch from cefc163 to f82f46f Compare November 13, 2026 14:51
@0xcadams

Copy link
Copy Markdown
Member Author

Matching website claim signing, company state, and capability changes: https://github.com/tnldotdev/tnl.dev/pull/297, pinned to this stack head. All 26 real-Go authority boundary tests and 48 website PostgreSQL tests pass, along with 638 account tests and type/lint/generation/build checks. Deploy together; the companion documents that old numeric claims and company-connection payloads are not converted.

@0xcadams
0xcadams force-pushed the 0xcadams/control-api-company-counters branch from f82f46f to f804522 Compare November 13, 2026 15:02
@0xcadams

Copy link
Copy Markdown
Member Author

Final stack head: f804522; website companion #297 in tnldotdev/tnl.dev pins that revision. CI-discovered fixture and intermediate-generation issues are fixed downstack. Full connector/SDK integration and per-layer generation checks pass locally; fresh CI is still running. Nothing has been merged or deployed.

@0xcadams
0xcadams force-pushed the 0xcadams/control-api-company-counters branch from f804522 to f7beb4f Compare November 13, 2026 17:10
@0xcadams
0xcadams marked this pull request as ready for review November 13, 2026 17:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T17:30:55.110432Z f7beb4f Draft marked ready
🔒 Security Review ❌ Failed 2026-11-13T17:30:04.989765Z
We couldn’t complete this review. Comment @codex security review to try again.
f7beb4f 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

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@0xcadams
0xcadams merged commit 33c1bbc into main Nov 13, 2026
47 checks passed
@0xcadams
0xcadams deleted the 0xcadams/control-api-company-counters branch November 13, 2026 17:44
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