Skip to content

Keep superseded plugin cache paths readable - #1

Open
lengmingz wants to merge 1 commit into
mainfrom
fix/plugin-cache-retain-superseded-skill-paths
Open

lengmingz wants to merge 1 commit into
mainfrom
fix/plugin-cache-retain-superseded-skill-paths

Conversation

@lengmingz

@lengmingz lengmingz commented May 30, 2026 •

Copy link
Copy Markdown
Owner

This is a maintained mirror PR in my fork. GitHub previously rejected creating the upstream PR against openai/codex from this account/session.

Upstream issue: openai#25285
Related root-cause thread: openai#24390
Upstream compare: openai/codex@main...lengmingz:codex:fix/plugin-cache-retain-superseded-skill-paths

Root cause

Plugin skill paths are materialized under versioned cache directories and can be persisted in long-running or resumed session context. A plugin refresh installs a new version and removes the old version directory, leaving those already-recorded absolute paths unreadable.

What changed

  • Retain superseded plugin cache version directories so previously recorded skill paths remain readable.
  • Add a per-plugin .active-version marker so the newly installed version is selected even when older local, semver, or hash directories remain.
  • Fall back to the existing directory-discovery behavior for legacy caches without a valid marker.
  • Reinstall only the matching version directory instead of replacing the whole plugin root, preserving retained sibling versions.
  • Update store and curated/non-curated refresh tests to cover retained paths and active-version selection.

The original branch also changed plugin/skill cache invalidation. Those changes are no longer included because current upstream main now routes marketplace refreshes through the effective-plugin change callback and maintains plugin skill snapshots.

Current base

  • openai/codex@3360f4a909a920d2e534a63c508d98e91fe6655a
  • Fix commit: 00ea209b3231988304e212fbee1e6e24887bbf6a

Verification (Windows)

  • just fmt
  • just test -p codex-core-plugins (391 passed)
  • just fix -p codex-core-plugins

@lengmingz
lengmingz force-pushed the fix/plugin-cache-retain-superseded-skill-paths branch from 028f915 to 00ea209 Compare August 14, 2026 16:56
lengmingz pushed a commit that referenced this pull request Aug 14, 2026
## Stack

1. [1 of 3] Support long raw TUI goal objectives - openai#27508
2. [2 of 3] Support long pasted text in TUI goals - openai#27509
3. **[3 of 3] Support images in TUI goals** - this PR

## Why

The first two PRs make goal definitions resilient to long text, but
`/goal` still dropped image inputs from the composer. That meant a user
could attach images while defining a goal and the resulting goal
continuation would not have any useful reference to those images.

Goal state still persists only objective text, so image inputs need to
become paths or URLs that the agent can read later.

## What Changed

- Extends TUI `GoalDraft` with local image attachments and remote image
URLs.
- Copies local goal images through the app-server filesystem layer into
the managed goal attachment directory, then rewrites active image
placeholders to file references.
- Appends unplaced local images and remote image URLs to the objective
as referenced image files or URLs.
- Preserves goal image metadata through live `/goal` submission and
queued `/goal` dispatch.

## Verification

- Added goal materialization coverage for local image files and remote
image URLs.
- Added/updated TUI slash-command coverage showing `/goal` drafts
include attached images instead of dropping them.

## Manual Testing

- Attached an image by bracketed-pasting its local path into a live
`/goal` composer. The `[Image #1]` placeholder became a server-host
`image-1.png` reference, copied bytes matched exactly, and no attachment
was written under the TUI's local home.
- Deleted an image placeholder before submitting a small goal and
verified no image was copied.
- Attached PNG and JPEG files to the same goal. Placeholder order was
preserved as `image-1.png` and `image-2.jpg`, and both remote copies
matched their source bytes.
- Tried extensionless, malformed-extension, and
extension/content-mismatched paths; the composer rejected them as image
attachments before goal dispatch rather than creating misleading managed
image files.
- Combined a local image, a large pasted block, and enough raw text to
exceed 4,000 characters. The remote attachment directory contained the
image, paste sidecar, and `goal-objective.md`; all embedded references
used server-host paths and both payloads matched their sources.
- Submitted an image replacement while a goal was active, verified no
image was copied before confirmation, then canceled and confirmed the
attachment count was unchanged.
@lengmingz lengmingz changed the title Keep old plugin cache versions readable Keep superseded plugin cache paths readable Aug 14, 2026
@lengmingz
lengmingz changed the base branch from main to maintenance/pr-base-refresh-20260814 August 14, 2026 16:59
@lengmingz
lengmingz changed the base branch from maintenance/pr-base-refresh-20260814 to main August 14, 2026 16:59
@lengmingz

Copy link
Copy Markdown
Owner Author

Maintenance update: reworked this branch onto current openai/codex@3360f4a909a920d2e534a63c508d98e91fe6655a and force-pushed with lease at 00ea209b3231988304e212fbee1e6e24887bbf6a.

The PR is now a clean 1-commit / 3-file change. It is limited to the remaining store-level compatibility gap:

  • retain superseded plugin version directories so recorded skill paths remain readable;
  • select the new install through a per-plugin .active-version marker, with legacy fallback;
  • replace only the matching version directory on same-version reinstall.

The older manager/cache invalidation changes were dropped because current upstream main now handles marketplace refresh invalidation and plugin skill snapshots.

Fresh Windows verification:

  • just fmt
  • just test -p codex-core-plugins (391 passed)
  • just fix -p codex-core-plugins

Fork Actions are also running. Jobs that require the private codex-runners group fail in the fork with Required runner group 'codex-runners' not found.

I retried creating the upstream PR, but GitHub still rejects this account/session with lengmingz does not have the correct permissions to execute CreatePullRequest.

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