Skip to content

chore: rolling promotion dev -> main - #2555

Merged
namastex888 merged 8 commits into
mainfrom
dev
Jul 11, 2026
Merged

namastex888 merged 8 commits into
mainfrom
dev

Conversation

@namastex888

@namastex888 namastex888 commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

Rolling Promotion PR

Auto-maintained rolling promotion PR from dev to main.

Process:

  • This PR is automatically created and kept open
  • Human reviews and merges when ready
  • Label ready-to-merge added when all checks pass

IMPORTANT: Merge with "Create a merge commit" — NEVER squash.
Squash merging breaks history sync between dev and main,
causing the next rolling PR to show all commits again.

Human approval required for merge to production.

Summary by CodeRabbit

  • New Features
    • Improved Codex plugin setup to detect and repair stale marketplace sources and refresh mismatched installed plugin versions.
    • Added a post-refresh verification step to confirm the installed plugin matches the current release.
  • Bug Fixes
    • Fixed cases where Codex could remain tied to an outdated marketplace root or get stuck on an incorrect installed plugin version.
  • Tests
    • Added coverage for “repair convergence” when marketplace root or plugin version state is stale.
  • Documentation
    • Updated live validation records with new stable-channel results and verified fixes.
  • Chores
    • Bumped Genie plugin/package and plugin manifest versions to 5.260711.6.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 81f8ef60-3f87-4101-a80b-9c1950602651

📥 Commits

Reviewing files that changed from the base of the PR and between 777b813 and 5101fd3.

📒 Files selected for processing (5)
  • .claude-plugin/marketplace.json
  • package.json
  • plugins/genie/.claude-plugin/plugin.json
  • plugins/genie/.codex-plugin/plugin.json
  • plugins/genie/package.json

📝 Walkthrough

Walkthrough

Plugin versions are bumped to 5.260711.6. Codex integration now repairs stale marketplace roots and installed plugin versions, with tests covering convergence and persistent mismatch failures. Stable-leg evidence and metrics records are updated.

Changes

Codex repair convergence

Layer / File(s) Summary
Version metadata and stable evidence
.claude-plugin/marketplace.json, package.json, plugins/genie/*, .genie/wishes/agent-sync/qa/*
Plugin manifests are updated to 5.260711.6, and stable-leg results and residual findings are documented.
Codex marketplace and plugin repair
src/lib/runtime-integrations.ts
Codex setup repairs marketplace registrations pointing to a different source and reinstalls genie@automagik when its version differs from VERSION.
Repair convergence validation
src/lib/runtime-integrations.test.ts
Tests cover marketplace replacement, repeated plugin reinstall attempts, successful convergence, and non-converging failure details.
Metrics run records
.genie/agents/metrics-updater/*
The latest metrics run and persisted computed metrics state are recorded.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant installCodexIntegration
  participant addCodexMarketplace
  participant CodexCLI
  participant verifyCodexPluginCurrent
  installCodexIntegration->>addCodexMarketplace: register canonical marketplace root
  addCodexMarketplace->>CodexCLI: inspect and repair automagik marketplace
  installCodexIntegration->>verifyCodexPluginCurrent: verify genie@automagik version
  verifyCodexPluginCurrent->>CodexCLI: remove and reinstall stale plugin
  CodexCLI-->>installCodexIntegration: return converged or stuck state
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the rolling promotion change and accurately reflects syncing dev into main.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request bumps the project version to 5.260711.5 and implements logic to handle codex repair convergence, specifically addressing stale marketplace roots and stale installed plugins. It introduces functions to repoint the marketplace if it points to a different source and to reinstall the plugin if its version does not match the CLI version, along with corresponding unit tests. The reviewer identified a potential issue in verifyCodexPluginCurrent where a failed re-installation could leave the plugin uninstalled without throwing an error, and provided a code suggestion to explicitly assert that the plugin is installed.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +268 to +270
if (state.installed && state.version !== VERSION) {
throw new Error(`codex plugin stuck at v${state.version} (CLI v${VERSION}) — marketplace root may be stale`);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

If the re-installation of the plugin fails or does not register (i.e., state.installed becomes false after running plugin add), the current check state.installed && state.version !== VERSION will evaluate to false and silently succeed. This leaves the plugin completely uninstalled without throwing an error. We should explicitly assert that the plugin is installed after the re-installation attempt.

Suggested change
if (state.installed && state.version !== VERSION) {
throw new Error(`codex plugin stuck at v${state.version} (CLI v${VERSION}) — marketplace root may be stale`);
}
if (!state.installed) {
throw new Error('codex plugin genie@automagik is not installed after re-installation attempt');
}
if (state.version !== VERSION) {
throw new Error('codex plugin stuck at v' + state.version + ' (CLI v' + VERSION + ') — marketplace root may be stale');
}

@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: 044c1bcd6c

ℹ️ 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 on lines +265 to +266
runChecked(runner, 'codex', ['plugin', 'remove', 'genie@automagik', '--json'], true);
runChecked(runner, 'codex', ['plugin', 'add', 'genie@automagik', '--json']);

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 Preserve disabled state when Codex repair fails

When a user had an older genie@automagik install explicitly disabled, any failure after this remove/add repair (for example plugin add fails, or the re-verify throws because the marketplace still serves the stale version) is caught by installRuntimeIntegrations before line 282 restores enabled = false. The Codex CLI reference documents plugin remove as deleting the installed plugin from local config/cache and plugin add as installing it again, so a failed repair can leave a user-disabled plugin removed or re-enabled while reporting ok: false; preserve/restore the prior disabled setting in a finally or rollback path around the repair.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/lib/runtime-integrations.test.ts`:
- Around line 140-142: Track each directory created by makeCodexHome in a shared
collection, and add an afterEach cleanup for this test describe block that
removes all tracked temporary directories and resets the collection. Reuse the
existing afterEach import and preserve makeCodexHome’s return behavior.

In `@src/lib/runtime-integrations.ts`:
- Around line 267-270: Update the post-repair validation around state and the
installed/version check to throw when state.installed is false or when the
installed plugin version differs from VERSION. Preserve the existing
stale-version error context and ensure installCodexIntegration cannot report
success unless the plugin is present at the expected version.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: bc9c6dbb-a616-44e9-a929-58583a041dee

📥 Commits

Reviewing files that changed from the base of the PR and between f99f745 and 044c1bc.

📒 Files selected for processing (8)
  • .claude-plugin/marketplace.json
  • .genie/wishes/agent-sync/qa/live-ritual-20260710.md
  • package.json
  • plugins/genie/.claude-plugin/plugin.json
  • plugins/genie/.codex-plugin/plugin.json
  • plugins/genie/package.json
  • src/lib/runtime-integrations.test.ts
  • src/lib/runtime-integrations.ts

Comment on lines +140 to +142
function makeCodexHome(): string {
return mkdtempSync(join(tmpdir(), 'genie-codex-home-'));
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Temp dirs created by makeCodexHome are never cleaned up.

The coding guidelines for **/*.test.ts require "tmpdir fixtures with cleanup in afterEach." makeCodexHome() calls mkdtempSync but the paths aren't tracked or removed, leaking directories on every test run. afterEach is already imported but not used in this describe block.

As per coding guidelines, **/*.test.ts files should "Use tmpdir fixtures with cleanup in afterEach."

♻️ Proposed fix: track dirs and clean up in afterEach
 describe('codex repair convergence (stale marketplace root / stale installed plugin)', () => {
+  const codexHomes: string[] = [];
+
   const staleList = JSON.stringify({
     installed: [{ pluginId: 'genie@automagik', enabled: true, version: '5.260710.9' }],
   });
   const currentList = JSON.stringify({
     installed: [{ pluginId: 'genie@automagik', enabled: true, version: VERSION }],
   });
 
   function makeCodexHome(): string {
-    return mkdtempSync(join(tmpdir(), 'genie-codex-home-'));
+    const dir = mkdtempSync(join(tmpdir(), 'genie-codex-home-'));
+    codexHomes.push(dir);
+    return dir;
+  }
+
+  afterEach(() => {
+    for (const dir of codexHomes) {
+      rmSync(dir, { recursive: true, force: true });
+    }
+    codexHomes.length = 0;
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
function makeCodexHome(): string {
return mkdtempSync(join(tmpdir(), 'genie-codex-home-'));
}
const codexHomes: string[] = [];
function makeCodexHome(): string {
const dir = mkdtempSync(join(tmpdir(), 'genie-codex-home-'));
codexHomes.push(dir);
return dir;
}
afterEach(() => {
for (const dir of codexHomes) {
rmSync(dir, { recursive: true, force: true });
}
codexHomes.length = 0;
});
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lib/runtime-integrations.test.ts` around lines 140 - 142, Track each
directory created by makeCodexHome in a shared collection, and add an afterEach
cleanup for this test describe block that removes all tracked temporary
directories and resets the collection. Reuse the existing afterEach import and
preserve makeCodexHome’s return behavior.

Source: Coding guidelines

Comment on lines +267 to +270
state = codexPluginState(runChecked(runner, 'codex', ['plugin', 'list', '--json']).stdout);
if (state.installed && state.version !== VERSION) {
throw new Error(`codex plugin stuck at v${state.version} (CLI v${VERSION}) — marketplace root may be stale`);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Post-repair check misses !state.installed case.

After the remove+re-add repair, the condition state.installed && state.version !== VERSION returns silently if state.installed is false. If plugin add returned exit 0 but the plugin isn't listed (CLI bug, parsing mismatch, or stale marketplace), the function exits without throwing and installCodexIntegration reports ok: true — a silent failure where the user believes the plugin converged when it didn't.

🐛 Proposed fix: also throw when plugin is not installed after repair
-  if (state.installed && state.version !== VERSION) {
-    throw new Error(`codex plugin stuck at v${state.version} (CLI v${VERSION}) — marketplace root may be stale`);
+  if (!state.installed || state.version !== VERSION) {
+    throw new Error(
+      `codex plugin ${state.installed ? `stuck at v${state.version}` : 'not installed after repair'} (CLI v${VERSION}) — marketplace root may be stale`,
+    );
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
state = codexPluginState(runChecked(runner, 'codex', ['plugin', 'list', '--json']).stdout);
if (state.installed && state.version !== VERSION) {
throw new Error(`codex plugin stuck at v${state.version} (CLI v${VERSION}) — marketplace root may be stale`);
}
state = codexPluginState(runChecked(runner, 'codex', ['plugin', 'list', '--json']).stdout);
if (!state.installed || state.version !== VERSION) {
throw new Error(
`codex plugin ${state.installed ? `stuck at v${state.version}` : 'not installed after repair'} (CLI v${VERSION}) — marketplace root may be stale`,
);
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lib/runtime-integrations.ts` around lines 267 - 270, Update the
post-repair validation around state and the installed/version check to throw
when state.installed is false or when the installed plugin version differs from
VERSION. Preserve the existing stale-version error context and ensure
installCodexIntegration cannot report success unless the plugin is present at
the expected version.

@namastex888
namastex888 merged commit 6de8348 into main Jul 11, 2026
29 checks passed
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.

2 participants