|
22 | 22 | CODEX_DOC = "AGENTS.md" |
23 | 23 | CLAUDE_DOC = ".claude/CLAUDE.md" |
24 | 24 | LEGACY_CLAUDE_DOC = "CLAUDE.md" |
| 25 | +ACTIVE_DOCS = ( |
| 26 | + CODEX_DOC, |
| 27 | + CLAUDE_DOC, |
| 28 | + "README.md", |
| 29 | + "docs/contract-matrix.md", |
| 30 | + "system/AGENTS.md", |
| 31 | +) |
| 32 | +FORBIDDEN_ACTIVE_CLAIMS = { |
| 33 | + "[features].plugin_hooks = true": "Codex 0.134 treats plugin_hooks as a removed feature flag", |
| 34 | + "features.plugin_hooks = true": "Codex 0.134 treats plugin_hooks as a removed feature flag", |
| 35 | + "active `hooks`, `plugin_hooks`, and `multi_agent`": "plugin hooks are verified through hooks/list, not an active feature flag", |
| 36 | + "active hooks, plugin_hooks, and multi_agent": "plugin hooks are verified through hooks/list, not an active feature flag", |
| 37 | + ":danger-no-sandbox": "current Codex built-ins use :danger-full-access for the danger profile", |
| 38 | + "currently pinned at v1.15.4": "active current-pin wording must match the current OpenCode baseline", |
| 39 | +} |
25 | 40 |
|
26 | 41 |
|
27 | 42 | def run_state(root: Path) -> dict[str, object]: |
@@ -53,6 +68,9 @@ def validate_file_content(root: Path, relative: str, errors: list[str], warnings |
53 | 68 | lines = text.splitlines() |
54 | 69 | if SECRET_RE.search(text): |
55 | 70 | errors.append(f"{relative}: contains secret-looking content") |
| 71 | + for needle, reason in FORBIDDEN_ACTIVE_CLAIMS.items(): |
| 72 | + if needle in text: |
| 73 | + errors.append(f"{relative}: forbidden active claim {needle!r}: {reason}") |
56 | 74 | if relative == CODEX_DOC: |
57 | 75 | if len(lines) > 260: |
58 | 76 | warnings.append(f"{relative}: {len(lines)} lines; keep Codex instructions compact") |
@@ -103,7 +121,7 @@ def main() -> int: |
103 | 121 | if (root / LEGACY_CLAUDE_DOC).is_file(): |
104 | 122 | errors.append(f"{LEGACY_CLAUDE_DOC}: use .claude/CLAUDE.md for Claude Code project memory") |
105 | 123 |
|
106 | | - for relative in (CODEX_DOC, CLAUDE_DOC): |
| 124 | + for relative in ACTIVE_DOCS: |
107 | 125 | validate_file_content(root, relative, errors, warnings) |
108 | 126 |
|
109 | 127 | payload = { |
|
0 commit comments