Skip to content

fix(ce-setup): detect leftover Codex tool-map sentinels - #1570

Open
saurabhkagent-lab wants to merge 6 commits into
EveryInc:mainfrom
saurabhkagent-lab:fix/ce-setup-detect-legacy-codex-tool-map
Open

fix(ce-setup): detect leftover Codex tool-map sentinels#1570
saurabhkagent-lab wants to merge 6 commits into
EveryInc:mainfrom
saurabhkagent-lab:fix/ce-setup-detect-legacy-codex-tool-map

Conversation

@saurabhkagent-lab

Copy link
Copy Markdown

Summary

ce-setup reported a healthy Codex environment even when the retired <!-- BEGIN COMPOUND CODEX TOOL MAP --> block remained in $CODEX_HOME/AGENTS.md. That mapping is known to make Codex skip ce-code-review.

check-health now scans $CODEX_HOME/AGENTS.md and profile copies for both sentinels and points at docs/install/upgrading.md. Out of scope: changing ce-work skip phrases or auto-stripping the file.

Validation

  • bun test tests/skills/ce-setup-check-health.test.ts — 57 pass
  • bun run release:validate — in sync

Closes #1559

Security Disclosure

No security-relevant changes. The check only reads AGENTS.md for exact sentinels.

Agent Disclosure

  • Model: Hermes Agent · grok-4.6

Native Codex install no longer needs the Bun-era AGENTS.md tool map,
but ce-setup still reported healthy when the block remained and Codex
could skip ce-code-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: 8a630c109f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread skills/ce-setup/scripts/check-health Outdated
Comment thread tests/skills/ce-setup-check-health.test.ts
Isolate CODEX_HOME in check-health fixtures so host installs cannot hide
or fake the leftover tool-map warning.

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

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread skills/ce-setup/scripts/check-health Outdated
Named-profile copies under ~/.codex/profiles are still scanned. The
default root AGENTS.md is not the current session.

@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: 79b222fd37

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread skills/ce-setup/scripts/check-health Outdated
Marketplace installs do not include docs/install/upgrading.md. Point the
health warning at a skill-local reference instead.

@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: 46d051f92f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread skills/ce-setup/scripts/check-health Outdated
Independent grep treated END-then-BEGIN as a removable map even though
removeCodexAgentsToolMapBlock would leave the file unchanged. Warn only
when the first BEGIN precedes its END.

@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: aef3b3910d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +305 to +307
si = index(buf, s)
ei = index(buf, e)
exit (si > 0 && ei > 0 && ei > si) ? 0 : 1

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 Detect a later ordered sentinel pair

Fresh evidence beyond the prior END-before-BEGIN case: I reproduced a file containing END, then BEGIN, then another END; this check emits no warning even though the latter two sentinels form a safely removable ordered block containing the retired tool map. Because ei records only the first END, any stray earlier END masks every valid block later in the file. Detect whether any END occurs after a BEGIN rather than comparing only the first occurrences.

AGENTS.md reference: AGENTS.md:L121-L121

Useful? React with 👍 / 👎.

Platform-variable convention requires ${CODEX_HOME:-...}; bare
$CODEX_HOME failed skill-conventions CI.
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.

ce-setup misses legacy Codex tool map that can cause false ce-code-review unavailable skips

1 participant