fix(ce-setup): detect leftover Codex tool-map sentinels - #1570
fix(ce-setup): detect leftover Codex tool-map sentinels#1570saurabhkagent-lab wants to merge 6 commits into
Conversation
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.
There was a problem hiding this comment.
💡 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".
Isolate CODEX_HOME in check-health fixtures so host installs cannot hide or fake the leftover tool-map warning.
There was a problem hiding this comment.
💡 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".
Named-profile copies under ~/.codex/profiles are still scanned. The default root AGENTS.md is not the current session.
There was a problem hiding this comment.
💡 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".
Marketplace installs do not include docs/install/upgrading.md. Point the health warning at a skill-local reference instead.
There was a problem hiding this comment.
💡 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".
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.
There was a problem hiding this comment.
💡 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".
| si = index(buf, s) | ||
| ei = index(buf, e) | ||
| exit (si > 0 && ei > 0 && ei > si) ? 0 : 1 |
There was a problem hiding this comment.
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.
Summary
ce-setupreported 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 skipce-code-review.check-healthnow scans$CODEX_HOME/AGENTS.mdand profile copies for both sentinels and points atdocs/install/upgrading.md. Out of scope: changingce-workskip phrases or auto-stripping the file.Validation
bun test tests/skills/ce-setup-check-health.test.ts— 57 passbun run release:validate— in syncCloses #1559
Security Disclosure
No security-relevant changes. The check only reads AGENTS.md for exact sentinels.
Agent Disclosure