Skip to content

Commit cc8f9db

Browse files
committed
Fix codex test network issue
1 parent ce8dc95 commit cc8f9db

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

skills/bibtidy/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ For unchanged entries, do NOT add any comments or URLs.
8383
## Workflow
8484

8585
- Read the .bib file, note the file path
86-
- Clear the log file: `> <file>.bib.log`
86+
- Clear the log file: `> <file>.bib.cc.log` (Claude Code) or `> <file>.bib.codex.log` (Codex)
8787
- Back up for format validation: `cp <file>.bib <file>.bib.orig`
8888
- Preserve `@string`, `@preamble`, `@comment` blocks verbatim
8989
- **Comment out exact/subset duplicates**: `python3 $TOOLS_DIR/duplicates.py <file.bib> --exact` — this comments out entries that are identical or a strict subset of another entry (same key, same type, matching fields). The entry with more fields is kept. Safe to auto-comment since no information is lost.

skills/bibtidy/tools/log.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"""Logging helper that tees stdout/stderr to a .bib.log file."""
33
from __future__ import annotations
44

5+
import os
56
import sys
67

78

@@ -22,9 +23,16 @@ def flush(self) -> None:
2223
self.log_file.flush()
2324

2425

26+
def _platform_suffix() -> str:
27+
"""Return a platform-specific log suffix based on the runtime environment."""
28+
if os.environ.get("CODEX_HOME") or os.path.isdir(os.path.expanduser("~/.codex/skills/bibtidy")):
29+
return ".codex.log"
30+
return ".cc.log"
31+
32+
2533
def setup(bib_path: str) -> None:
26-
"""Tee stdout and stderr to ``<bib_path>.log`` (append mode)."""
27-
log_path = bib_path + ".log"
34+
"""Tee stdout and stderr to ``<bib_path>.<platform>.log`` (append mode)."""
35+
log_path = bib_path + _platform_suffix()
2836
log_file = open(log_path, "a", encoding="utf-8") # noqa: SIM115
2937
sys.stdout = _Tee(sys.stdout, log_file) # type: ignore[assignment]
3038
sys.stderr = _Tee(sys.stderr, log_file) # type: ignore[assignment]

tests/run_bibtidy_codex_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ echo ""
3636
START_TIME=$SECONDS
3737

3838
codex --search exec \
39-
--full-auto \
39+
--sandbox danger-full-access \
4040
--add-dir "$CODEX_HOME_DIR/skills" \
4141
-C "$REPO_DIR" \
4242
"Use the bibtidy skill to validate and fix $GOT in place. Follow the skill exactly." >/dev/null

0 commit comments

Comments
 (0)