Skip to content

fix: publish public releases from target package#28

Merged
byapparov merged 34 commits into
mainfrom
fix/public-release-routing
Jul 15, 2026
Merged

fix: publish public releases from target package#28
byapparov merged 34 commits into
mainfrom
fix/public-release-routing

Conversation

@byapparov

@byapparov byapparov commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

No linked issue in this repository; supports aictrl-dev/aictrl#3865, aictrl-dev/aictrl#3866, and aictrl-dev/aictrl#3882.

Merge and release prerequisites

The runtime and package-source prerequisites are complete. Keep the connected
reviewer rehearsal and publication-owner steps as release stop conditions:

  1. Complete: aictrl-dev/skills v1.0.1 is published at immutable commit
    01cf2fa9b9bcf3b3b48cb00f3e48764c292ecf18; public-skills.lock.json
    pins that commit and checksum, and all three vendor packages are assembled.
  2. Complete: aictrl-dev/aictrl#3905 and #3909 are merged and deployed. The
    authenticated production scan at https://aictrl.dev/mcp verifies exactly
    the six lifecycle tools, their schemas, safety annotations, descriptions,
    and absence of custom-UI metadata.
  3. Complete: aictrl-dev/aictrl#3897 is merged and deployed. Once the portal
    provides its domain token, the release owner can apply the temporary Cloud
    Run override and verify the well-known challenge without committing or
    persisting the value.
  4. Pending before release: independently approve and merge the fixture
    workflow, provision the fixture-only AICtrl connection and no-MFA reviewer
    account, and complete the connected exact-revision rehearsal.
  5. Pending owner publication: bootstrap @aictrl/opencode from the merged
    release commit, configure its trusted publisher, and complete the OpenAI
    submission, approval, explicit publication, and clean-directory smoke.

Summary

The public-v0.1.0-beta.1 release ran the root npm publish, so it attempted to republish @aictrl/plugin@2.2.1 and never created @aictrl/opencode.

This change:

  • routes public-v* releases to ./opencode with the beta dist-tag
  • keeps v* releases routed to the root package with latest
  • rejects stale or mismatched release tags before publication
  • makes the first manual npm bootstrap compatible with the matching GitHub release by verifying exact published-package integrity before skipping a duplicate publish
  • aligns the Claude, Codex, and OpenCode public packages at 0.1.0-beta.2 and fails CI on version drift
  • pins the public skills release tag, immutable commit, and checksum manifest
  • configures every vendor package with one server identity, aictrl, at https://aictrl.dev/mcp
  • adds the packaged license, public support/legal links, and clickable canonical skill-source provenance
  • refreshes the test toolchain lock to patched Vitest, Vite, and esbuild releases
  • adds real Codex, Claude Code, and OpenCode install/lifecycle gates
  • blocks npm publication unless the canonical production resource reaches the OAuth-required boundary
  • constrains CI GITHUB_TOKEN permissions to contents: read
  • documents the OpenAI portal challenge as a temporary Cloud Run override rather than a persistent secret

First-publish prerequisite

npm trusted publishers are package-specific and @aictrl/opencode does not yet exist. After this PR merges, an authenticated @aictrl npm owner must bootstrap 0.1.0-beta.2 directly from the merged ./opencode package using public access and the beta dist-tag. Then configure aictrl-dev/aictrl-plugin / publish.yml / environment release as the package trusted publisher and publish the matching public-v0.1.0-beta.2 GitHub release from that same commit. The workflow skips the duplicate npm publish only when registry integrity matches the local package exactly; a mismatch fails closed. Later public-v* releases use OIDC with automatic provenance.

Test plan

  • 147 unit/package, release-publication, reviewer-fixture, and production-catalog lifecycle tests
  • OpenCode package upgrade preserves unrelated MCP configuration and skills
  • Codex CLI public marketplace install, repeat install, upgrade, and removal
  • Claude Code public marketplace lifecycle in CI
  • OpenCode packed-package lifecycle against https://aictrl.dev/mcp
  • legacy installer against production
  • TypeScript build and pinned public-package validation
  • CodeQL and GitHub Advanced Security review; both historical findings fixed and resolved
  • actionlint .github/workflows/publish.yml and git diff --check
  • npm audit and npm audit --omit=dev report zero vulnerabilities
  • npm pack ./opencode --dry-run --json contains the expected package payload
  • aictrl-dev/skills v1.0.1 checksum verified and all three vendor packages reassembled
  • deterministic, dependency-free Codex reviewer repository seed and issue specification
  • OpenCode upstream issue and one-row Ecosystem PR packet matches the current dev contribution templates
  • dedicated public reviewer repository and bounded fixture issue are provisioned with protected main
  • repository-owned fixture workflow is schema-valid and under protected review in feat: add repository-owned implementation workflow aictrl-plugin-reviewer-fixture#2
  • all nine GitHub checks pass on production-evidence commit d0d972c
  • aictrl-dev/aictrl#3905/#3909 are deployed and authenticated CI returns exactly the six lifecycle tools at /mcp
  • feat: add repository-owned implementation workflow aictrl-plugin-reviewer-fixture#2 receives independent approval and is merged
  • provision the fixture-only AICtrl repository connection and no-MFA portal demo account
  • complete OAuth → start → exact-revision approval → merge-ready PR rehearsal against fixture issue Add @aictrl/setup npx installer for Claude Code, OpenCode, and Cursor #1

Local validation on e586e57 passes all 147 tests, the TypeScript build, public-package assembly, submission-listing alignment, and diff checks. The release runbook enforces production exact-six-tool verification before plugin merge. Acquisition remains in the existing web/PostHog path; MCP behavior events use generic lifecycle names and source: mcp rather than encoding package attribution into the server URL.

Supports aictrl-dev/aictrl#3865, aictrl-dev/aictrl#3866, aictrl-dev/aictrl#3882, and milestone aictrl-dev/aictrl#63.

Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml Fixed
@byapparov

Copy link
Copy Markdown
Contributor Author

Review response — PR #28

Verified and fixed the GitHub Advanced Security finding that the CI workflow did not constrain GITHUB_TOKEN permissions.

Issues addressed (pushed to this PR)

  • Workflow token permissions were implicit.github/workflows/ci.yml: added a workflow-level permissions: contents: read policy, so every CI job receives only the repository-read scope it needs (commit b4008b4).

Review claims verified false (no change needed)

  • None.

Not addressed here

  • None.

@byapparov

Copy link
Copy Markdown
Contributor Author

CI dependency note for commit 6488d60:

  • 7/8 checks pass, including Unit Tests, CodeQL, Codex, Claude, and the legacy production installer.
  • The only failure is the intentionally strict OpenCode sandbox gate: job 87153078666 receives 404 from /mcp/workflows/opencode-ecosystem/0.1.0-beta.2/implement-code-change/1.0.0.
  • aictrl-dev/aictrl#3904 commit 4da8e61b6 supplies and contract-tests that exact attributed resource. Merge/deploy order is aictrl-dev/aictrl#3899, then #3904, then rerun this job.
  • Do not change the smoke back to /mcp/workflows; that would make CI green by discarding the vendor/package/skill attribution required by aictrl-dev/aictrl#3861.

@byapparov

Copy link
Copy Markdown
Contributor Author

Codex submission audit update:

Current official submission guidance requires every positive case to include reproducible test-account or fixture data. The prior reviewer pack referenced nonexistent aictrl-dev/reviewer-fixture and PR 42, so it was not portal-ready.

Commit 9b3aa1f now:

  • uses real public PR 17 and its immutable head for the local review case
  • requires an explicit Fixture/account line for all five positive cases
  • marks connected cases P3–P5 pending until a dedicated public fixture repository, safe issue, and no-MFA demo account exist
  • removes screenshots as a mandatory gate; current guidance requires a production logo but treats manifest screenshots as optional
  • adds the portal CSP review gate for the no-custom-UI MCP package

No fixture repository was created. That external org-level action needs an owner decision before portal submission.

@byapparov

Copy link
Copy Markdown
Contributor Author

Follow-up: the OpenCode public-package E2E rerun is now green after the versioned sandbox resource became available. All eight PR checks pass, and both GitHub Advanced Security threads remain fixed and resolved. The later CORS/image-size review output was generated from the unrelated aictrl repository (merged PR #35 / issue #28), so it does not apply to this plugin PR and no plugin code change is required.

@byapparov

Copy link
Copy Markdown
Contributor Author

Canonical MCP update (4140707): every vendor now configures the single aictrl server at https://aictrl.dev/mcp. This supersedes the earlier versioned-resource dependency note. Marketplace/listing/version attribution is no longer encoded in the MCP audience; acquisition stays in web UTM/PostHog data, while connected behavior uses generic oauth_completed and workflow lifecycle events with source: mcp. Backend PR aictrl-dev/aictrl#3905 moves the exact six-tool public catalog to the root resource.

@byapparov

Copy link
Copy Markdown
Contributor Author

Skills release dependency is complete:

  • published aictrl-dev/skills v1.0.1 at immutable commit 01cf2fa9b9bcf3b3b48cb00f3e48764c292ecf18
  • verified remote CHECKSUMS.sha256 digest a09b2075fbe54f2615aa8b8a2786162c1cdd1676e5944a000116786feda451b4
  • pinned the release in public-skills.lock.json and reassembled Claude, Codex, and OpenCode packages
  • verified 139 tests, package validation/build/audit, Codex/OpenCode local lifecycle smokes, and all eight GitHub checks

The remaining merge prerequisite is aictrl-dev/aictrl#3905 deployment plus the exact six-tool production scan at https://aictrl.dev/mcp.

@byapparov

Copy link
Copy Markdown
Contributor Author

Codex fixture dependency update:

  • created public aictrl-dev/aictrl-plugin-reviewer-fixture from the validated dependency-free seed at 09b5d36ae163a39fe6b3f56ce347a8cb026afd2c
  • created bounded Task issue aictrl-dev/aictrl-plugin-reviewer-fixture#1
  • protected main with one approval, stale-review dismissal, last-push approval, conversation resolution, and admin enforcement; force pushes, deletion, merge commits, and automatic merge are disabled
  • kept connected reviewer prompts blocked until the fixture-only AICtrl connection and no-MFA portal account are provisioned and rehearsed

Commit 87823b8 records the public evidence without adding credentials or pretending connected cases are ready.

@byapparov

Copy link
Copy Markdown
Contributor Author

Production MCP merge prerequisite is now proven at commit dadbcd8:

  • production Cloud Run rollout for aictrl main 8f01dbb225db5cc05e3177f7face7f4b64b1dae9 completed successfully
  • the new protected-key production catalog smoke authenticated to https://aictrl.dev/mcp
  • it verified exactly list_workflows, get_workflow, start_workflow, get_workflow_run, approve_workflow_step, and cancel_workflow_run
  • it also matched the approved input schemas and safety annotations and required non-empty tool descriptions
  • all nine PR checks are green; the post-push review scan found no new findings

The remaining release-runbook stop condition is the connected reviewer-fixture rehearsal and publication-owner steps; this evidence does not mark those as complete.

@byapparov

Copy link
Copy Markdown
Contributor Author

Submission-readiness evidence is now current at d0d972c:

  • recorded the authenticated exact-six production MCP tool scan in submission/codex/readiness.md
  • recorded production schema, safety-annotation, and non-empty-description validation
  • all nine checks pass on the refreshed head, including the protected-key production catalog smoke and all three client E2Es
  • required post-push review scan found 0 findings and 0 unparseable comments

The connected reviewer-fixture rehearsal and publication-owner steps remain explicit stop conditions; this commit does not mark them complete.

@byapparov

byapparov commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Submission hardening is green at e586e57:

  • added a manifest-locked portal listing sheet with the canonical brand asset and empty no-custom-UI CSP decision
  • production MCP smoke now rejects both _meta.ui.resourceUri and _meta["openai/outputTemplate"], preventing future UI/CSP drift
  • authenticated live scan passed at https://aictrl.dev/mcp
  • all nine checks pass, including the three client E2Es, legacy production installer, and CodeQL
  • post-push review scan found 0 findings and 0 unparseable comments

Follow-up source and ancestry checks confirm strict OAuth registered-client, redirect, resource, token-family, and replay protections are already deployed in production main 8f01dbb. The remaining release gates are the clean-client connected rehearsal, independent fixture approval, and owner publication steps.

@byapparov

Copy link
Copy Markdown
Contributor Author

Latest head 45c581d5a218ce6e22491c1f552f36fd9f2e4ae3 is technically ready for the connected release rehearsal:

  • all 9 required checks pass, including Claude/Codex/OpenCode E2E, production MCP smoke, legacy installer, unit tests, and CodeQL
  • PR is MERGEABLE with merge state CLEAN
  • required post-push review sweep completed after the five-minute quiet window: 0 findings, 0 unparseable comments
  • OpenAI publisher identity and Apps Management write access are confirmed in the owning organization

Release stop conditions remain intentionally open: independent approval and merge of the reviewer fixture rehearsal, clean connected-client OAuth evidence, and the authenticated npm/OpenAI publication steps. This PR should not be merged past those gates yet.

@byapparov

Copy link
Copy Markdown
Contributor Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@byapparov
byapparov merged commit 390fa6e into main Jul 15, 2026
9 checks passed
@byapparov byapparov self-assigned this Jul 15, 2026
@byapparov byapparov added the enhancement New feature or request label Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants