Repository navigation
feat: source validated org from license JWT; drop client-side org-scoping - #84
Merged
minarc merged 1 commit intoJul 8, 2026
Conversation
…scoping
The license activator already validates and issues a license for a specific
GitHub org (minted into the JWT `org` claim). The client should not re-derive
or narrow orgs — it should trust and display the org the activator validated.
- jwt.getLicenseOrgs(token): read the validated org(s) from the JWT `org.login`
(forward-compat with a plural `orgs` array), normalized lowercase. No expiry
gate (identity/routing info).
- credstore.getAllowedGitHubOrgs() now derives from the JWT; commitSignin({jwt})
no longer takes/stores an org list; drop the normalizeOrgList dependency.
- repo-scope: gate on the JWT-derived org (case-insensitive); remove the
getRepoScopeOrgFilter + resolveOrgScope narrowing.
- signin.js: remove the --org/--orgs flag, parseOrgArgs, scopeAndCommit, the
re-scope-in-place branch, all cliOrgs plumbing, and the GitHub org fetch.
- license-activation: trySilentGhActivate just stores the JWT (no org fetch/narrow).
- Delete lib/org-scope.js and lib/github-api.js; drop the now-unused GitHub API
URL constants from config.js (keep the read:org OAuth scope for the activator).
- Docs: remove the "narrowing scope" / --org / SKILLMETER_REPO_SCOPE_ORGS /
skillmeter.repoScopeOrgs guidance from README + signin SKILL.md.
- Bump plugin version to 0.19.0.
Behavior change: telemetry now captures only in the single licensed org's repos
(the JWT org), not across every GitHub org the user belongs to. A JWT without an
org claim yields no capture (safe fail). Verified: telemetry-gate golden diff
byte-identical (org now sourced from the JWT), harness tests 20/20, plugin
validate passes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (3)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
TheStarkor
approved these changes
Jul 8, 2026
minarc
merged commit Jul 8, 2026
3249012
into
feat/plugin-data-dir-and-marketplace-desc
1 check passed
minarc
added a commit
that referenced
this pull request
Jul 8, 2026
…scoping (#84) The license activator already validates and issues a license for a specific GitHub org (minted into the JWT `org` claim). The client should not re-derive or narrow orgs — it should trust and display the org the activator validated. - jwt.getLicenseOrgs(token): read the validated org(s) from the JWT `org.login` (forward-compat with a plural `orgs` array), normalized lowercase. No expiry gate (identity/routing info). - credstore.getAllowedGitHubOrgs() now derives from the JWT; commitSignin({jwt}) no longer takes/stores an org list; drop the normalizeOrgList dependency. - repo-scope: gate on the JWT-derived org (case-insensitive); remove the getRepoScopeOrgFilter + resolveOrgScope narrowing. - signin.js: remove the --org/--orgs flag, parseOrgArgs, scopeAndCommit, the re-scope-in-place branch, all cliOrgs plumbing, and the GitHub org fetch. - license-activation: trySilentGhActivate just stores the JWT (no org fetch/narrow). - Delete lib/org-scope.js and lib/github-api.js; drop the now-unused GitHub API URL constants from config.js (keep the read:org OAuth scope for the activator). - Docs: remove the "narrowing scope" / --org / SKILLMETER_REPO_SCOPE_ORGS / skillmeter.repoScopeOrgs guidance from README + signin SKILL.md. - Bump plugin version to 0.19.0. Behavior change: telemetry now captures only in the single licensed org's repos (the JWT org), not across every GitHub org the user belongs to. A JWT without an org claim yields no capture (safe fail). Verified: telemetry-gate golden diff byte-identical (org now sourced from the JWT), harness tests 20/20, plugin validate passes. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
minarc
added a commit
that referenced
this pull request
Jul 8, 2026
* feat: persist telemetry queue in ${CLAUDE_PLUGIN_DATA}; fill marketplace description
- paths.js: root LOG_DIR (queue + lock files) at ${CLAUDE_PLUGIN_DATA} when
available, falling back to PLUGIN_ROOT/logs when unset (byte-identical to
before). Fixes data loss: PLUGIN_ROOT is the install cache dir, wiped ~7 days
after a plugin update, which stranded any un-drained queue.
- transfer.js: migrateLegacyQueue() copies sealed event logs (and seals the
legacy active log) + pending transcripts forward from PLUGIN_ROOT/logs on
first run; best-effort, copy + skip-existing, skips *.sent. Wired into
session_start's prepareSession.
- marketplace.json: fill the empty skillmeter entry description + add a root
marketplace description (clears `claude plugin validate` warning / blank card).
- Bump plugin version to 0.18.0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat: source the validated org from the license JWT; drop client org-scoping (#84)
The license activator already validates and issues a license for a specific
GitHub org (minted into the JWT `org` claim). The client should not re-derive
or narrow orgs — it should trust and display the org the activator validated.
- jwt.getLicenseOrgs(token): read the validated org(s) from the JWT `org.login`
(forward-compat with a plural `orgs` array), normalized lowercase. No expiry
gate (identity/routing info).
- credstore.getAllowedGitHubOrgs() now derives from the JWT; commitSignin({jwt})
no longer takes/stores an org list; drop the normalizeOrgList dependency.
- repo-scope: gate on the JWT-derived org (case-insensitive); remove the
getRepoScopeOrgFilter + resolveOrgScope narrowing.
- signin.js: remove the --org/--orgs flag, parseOrgArgs, scopeAndCommit, the
re-scope-in-place branch, all cliOrgs plumbing, and the GitHub org fetch.
- license-activation: trySilentGhActivate just stores the JWT (no org fetch/narrow).
- Delete lib/org-scope.js and lib/github-api.js; drop the now-unused GitHub API
URL constants from config.js (keep the read:org OAuth scope for the activator).
- Docs: remove the "narrowing scope" / --org / SKILLMETER_REPO_SCOPE_ORGS /
skillmeter.repoScopeOrgs guidance from README + signin SKILL.md.
- Bump plugin version to 0.19.0.
Behavior change: telemetry now captures only in the single licensed org's repos
(the JWT org), not across every GitHub org the user belongs to. A JWT without an
org claim yields no capture (safe fail). Verified: telemetry-gate golden diff
byte-identical (org now sourced from the JWT), harness tests 20/20, plugin
validate passes.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Org-scope is now the license activator's decision, not the client's. The client trusts and displays the org the activator validated (the JWT
orgclaim); it no longer fetches GitHub org membership or lets the user narrow it.Why
The license activator already issues a license for a specific GitHub org, minted into the JWT (
org.login = "SkillBench-AI",org.id). Re-deriving/narrowing orgs on the client was the wrong layer and redundant.Changes
jwt.getLicenseOrgs(token)— reads the validated org(s) from the JWTorg.login(forward-compat with a pluralorgsarray), normalized lowercase, no expiry gate.credstore—getAllowedGitHubOrgs()derives from the JWT;commitSignin({ jwt })no longer takes/stores an org list; dropped thenormalizeOrgListdependency.repo-scope— gate on the JWT-derived org (case-insensitive); removedgetRepoScopeOrgFilter+ theresolveOrgScopenarrowing.signin.js— removed the--org/--orgsflag,parseOrgArgs,scopeAndCommit, the re-scope-in-place branch, allcliOrgsplumbing, and the GitHub org fetch.license-activation—trySilentGhActivatejust stores the JWT (no fetch/narrow).lib/org-scope.jsandlib/github-api.js; dropped the unused GitHub API URL constants fromconfig.js(kept theread:orgOAuth scope — the activator resolves the org server-side).--org/SKILLMETER_REPO_SCOPE_ORGS/skillmeter.repoScopeOrgsguidance from README + signinSKILL.md.Behavior change
Telemetry now captures only in the single licensed org's repos (the JWT org), not across every GitHub org the user belongs to. A JWT without an
orgclaim → no capture (safe fail, never over-captures).Verification
jwt.getLicenseOrgs:org.login "SkillBench-AI"→["skillbench-ai"]; no org →[]; pluralorgs→ normalized; null →[].getRepoScopeDecision: matching repo →allowed/github_org_match/remoteOrg; other org →github_org_mismatch; no license →not_activated.node --test skillmeter/test/harness.test.js→ 20/20;claude plugin validate skillmeter→ ✔.🤖 Generated with Claude Code