Skip to content

fix(scripts): consolidate org-agnosticism token sets - #3250

Merged
kyle-sexton merged 2 commits into
mainfrom
cursor/3136-org-agnostic-tokens-cfcf
Aug 23, 2026
Merged

fix(scripts): consolidate org-agnosticism token sets#3250
kyle-sexton merged 2 commits into
mainfrom
cursor/3136-org-agnostic-tokens-cfcf

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

Closes #3136

Summary

Org-agnosticism was enforced by two independent token sets in the same plugin-gate job, plus a stricter autonomy sweep, none of which shared data. The doctrine also named classes the gates did not check.

Fix

scripts/org-agnosticism-tokens.txt is the single token file. validate-plugin-contracts.mjs reads fleet-id, fleet-key, setup, and autonomy from it. plugins/github/github.test.sh stays the documented github extension (melodic/medley/pulumi plus github-iac); the validator fails if that regex drifts. Enforcement is deliberately those classes — agent content, schema files, and a fleet-wide bare organization name stay ungated. docs/PLUGIN-PHILOSOPHY.md now states that scope. The staged portability-lint publisher class is pointed at this file so it cannot become a third set.

Verification

  • node scripts/validate-plugin-contracts.mjs — 51 setup skills and 2912 plugin files checked
  • bash plugins/github/github.test.sh — PASS=36 FAIL=0
  • scripts/check-changelog-parity.sh --check-bump origin/main — pass

Related

Refs #3127, #3139, #3115, #3182

Hold fleet, setup, autonomy, and github token classes in one data file.
Every enforcement site reads that file or is a documented extension of it.
Enforcement scope is deliberately those classes, not agent content or a
fleet-wide bare organization name.

Closes #3136

Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
@kyle-sexton
kyle-sexton enabled auto-merge (squash) August 23, 2026 22:55
@claude

claude Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 53s —— View job


Security review (/review:security-review)

  • Gather context (PR diff, changed files)
  • Run /review:security-review skill
  • Post findings

Skip gate triggered — no security-relevant surface.

This PR consolidates org-agnosticism enforcement into a single data file (scripts/org-agnosticism-tokens.txt) consumed by scripts/validate-plugin-contracts.mjs, and updates docs/PLUGIN-PHILOSOPHY.md to document the change plus adds a pointer comment in scripts/skill-portability-tokens.txt. All four changed files were read in full against the diff:

  • No .github/workflows/** files are touched — no pull_request_target/workflow_run trigger risk, no permissions: widening, no script-injection-via-github-context surface.
  • scripts/validate-plugin-contracts.mjs's new loadOrgAgnosticismClass() builds RegExp patterns from scripts/org-agnosticism-tokens.txt (a repo-tracked, maintainer-controlled file, not user/PR-controlled input) and only uses them for read-only string matching — no eval, exec, or shell interpolation. This is a build-time/CI validation script; it has no runtime data-handling, auth, or trust-boundary surface.
  • The new github.test.sh regex-drift check reads a script file and does a string comparison — no execution of extracted content.
  • No secrets, tokens, or credentials are introduced or handled.

No CRITICAL / IMPORTANT / SUGGESTION findings to report.

@github-actions

Copy link
Copy Markdown

Last security-reviewed head: 8e7e9a25ddae0c5a6e5bbc8624d257516ada1d6f. On the next push, the relevance gate compares only the commits since this SHA; delete this comment to force a full re-review.

@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: 8e7e9a25dd

ℹ️ 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 scripts/validate-plugin-contracts.mjs Outdated
Comment thread scripts/validate-plugin-contracts.mjs Outdated
…hub.test.sh

A typo class name no longer silently drops tokens. The github plugin's
agnostic-conformance test is required when the plugin exists.

Closes #3136

Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
@kyle-sexton
kyle-sexton merged commit dead611 into main Aug 23, 2026
53 checks passed
@kyle-sexton
kyle-sexton deleted the cursor/3136-org-agnostic-tokens-cfcf branch August 23, 2026 23:25
@claude

claude Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Claude finished @cursor[bot]'s task in 35s —— View job


Code review (/review:code-review)

  • Gather context (PR metadata, diff)
  • Apply skip gate
  • Post result

Skip gate triggered — PR is closed (state: MERGED).

Per the /review:code-review skill's skip gate, review stops early when the PR is closed or not open, and nothing further is posted. This PR (#3250) merged prior to this run, so there is no open review surface to comment on.

No findings posted.

@github-actions

Copy link
Copy Markdown

Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count.

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.

fix(scripts): consolidate org-agnosticism enforcement behind its stated rule

1 participant