Skip to content

fix(catalog): distinguish cache synchronization no-ops from failures - #582

Open
luvs01 wants to merge 3 commits into
devfrom
codex/fix-cache-no-op-synchronization-failure-reporting
Open

luvs01 wants to merge 3 commits into
devfrom
codex/fix-cache-no-op-synchronization-failure-reporting

Conversation

@luvs01

@luvs01 luvs01 commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Motivation

  • A boolean return from the models-cache invalidation conflated a byte-identical no-op with genuine write failures, which caused valid remote catalog updates to be rolled back and made ocx sync-cache report failure for idempotent runs.
  • The change makes the cache-sync outcome explicit so callers can distinguish a real write from a benign unchanged result or policy/no-catalog skips.

Description

  • Introduce a typed CodexModelsCacheSyncResult and syncCodexModelsCacheWithPermit that return {status: "written" | "unchanged" | "skipped" | "failed"} instead of a bare boolean, while keeping a boolean compatibility wrapper invalidateCodexModelsCacheWithPermit.
  • Update transactional remote install logic in pullRemoteCatalog to accept unchanged as a benign cache-sync result and only rollback on real failures.
  • Update the sync-cache CLI path to interpret unchanged/skipped as successful (exit 0) and to report `skippedReason:

Codex Task


Devin Review

devin-ai-integration Bot and others added 2 commits September 20, 2026 13:22
…forwarded role (lidge-jun#5334 follow-up)

lidge-jun#5334 made the developer wire role tri-state: an undeclared destination folds
it to system. Two suites asserting role:"developer" on the Chat wire were
missed because they are about tool-result repair ordering and document parts,
not role selection — declare the destination, per the convention the change
established.

Verified: both files fail on dev@600075d2 with system-for-developer wire roles
and pass with the declaration.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: luvs01/opencodex/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 57464431-bd62-4341-ac74-e37f6f9ec6b2


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.

@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Sep 21, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-21T00:35:14.033170Z b71dcda PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

The sync-cache command now calls syncCodexModelsCacheWithPermit and gates
restart handling on the typed outcome's written status; update the two
source-reading assertions that still required the old name and the bare
completed-value gate.

Co-Authored-By: Epinephrine <luvs01@hanmail.net>
@devin-ai-integration

Copy link
Copy Markdown

Fixed in cf0c55fcodex-retained-root-serialization.test.ts now expects syncCodexModelsCacheWithPermit in the CLI sync-cache source slice (the startup slice still correctly expects invalidateCodexModelsCacheWithPermit), and codex-app-server-processes.test.ts now asserts the renamed call and the status === "written" gate. Both source-oracle tests pass.

@devin-ai-integration

Copy link
Copy Markdown

Fixed in cf0c55f — updated the stale source-oracle assertions: codex-retained-root-serialization.test.ts expects syncCodexModelsCacheWithPermit and codex-app-server-processes.test.ts expects the renamed call plus invalidated.value.status === "written" as the gate. Both tests verified passing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark bug Something isn't working codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant