Repository navigation
perf(eval): measure MCP catalog usage through the real Codex harness - #9035
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The reviewed changes appear safe to merge; both previous findings are fixed and no new blocking issue was found. SummaryAdds a real Codex catalog evaluation lane with no-server, all-tools, and selected-tools controls.
Reviews (2) · Last reviewed commit: "fix(eval): pin matrix identity and retai..." · Reviewed by Greptile |
| profile = Path(tempfile.mkdtemp(prefix='profile-', dir=args.output)) | ||
| # Output artifacts may live inside a checkout. Execution must not: Codex | ||
| # discovers ancestor AGENTS.md and skills independently of its user config. | ||
| profile_parent = (args.profile_parent or source_auth_home.parent / '.cache' / 'rea-agent-trials').resolve() |
| profile_parent = (args.profile_parent or source_auth_home.parent / '.cache' / 'rea-agent-trials').resolve() | ||
| if any(profile_parent.is_relative_to(root.resolve()) for root in [repository, driver_repository]): | ||
| raise ValueError('--profile-parent must be outside the runtime and driver checkouts') | ||
| profile_parent.mkdir(parents=True, exist_ok=True, mode=0o700) |
| if any(profile_parent.is_relative_to(root.resolve()) for root in [repository, driver_repository]): | ||
| raise ValueError('--profile-parent must be outside the runtime and driver checkouts') | ||
| profile_parent.mkdir(parents=True, exist_ok=True, mode=0o700) | ||
| profile = Path(tempfile.mkdtemp(prefix='profile-', dir=profile_parent)) |
| command.extend(['--enabled-tools', str(output / 'selected-tools.json')]) | ||
| print(json.dumps({'starting': cell}), flush=True) | ||
| with directory.with_suffix('.log').open('w') as log: | ||
| outcome = subprocess.run(command, stdout=log, stderr=subprocess.STDOUT, check=False) |
|
|
||
| def file_digest(path): | ||
| digest = hashlib.sha256() | ||
| with path.open('rb') as data: |
Summary
Add
npm run eval:mcp-catalogto measure actual Codex usage with no-server/all-tools/selected-tools controls, retained per-response usage and guarded process-family resources.The old runner could inherit repository instructions through its output directory, and its legacy code-mode switches did not control the current host. Execution now uses an external disposable profile, explicit host settings, required MCP startup, the driver artifact lock, a pinned matrix runtime, runtime drift checks and actionable failure reporting. The default uses the working host; disabled-host errors remain invalid even when the model returns the marker.
Procedure and pinned measurements: nine valid loading samples had a +3-token paired median within framing variation. Nine disabled-host controls correctly failed. A real semver package question passed the same three source-field oracle in both arms: 271,084 / 160,438 cumulative input tokens, including discovery and continuations. This is a single-task pilot, not a general performance advantage.
Scope and contracts
The matrix binds its catalog receipt and every valid pair to one shared runtime fingerprint, with freshness checks that stop further model calls after a rebuild. Observation collection retains usage, cleanup and resource facts independently before grading; stage-specific errors preserve partial results.
Validation performed
npm run check:fast— passed.npm run docs:check— passed, including 9 README consistency checks.node scripts/run-typescript.mjs -p tsconfig.build.jsonfollowed bypython3 scripts/run-python-tests.py --analysis-efficiency— 102 passed.gpt-6.1-sol: loading controls, three-cell supported-default smoke and two completed package tasks; cleanup and runtime identity verified, no OOM/resource stop.mcp doctor --json— healthy; 234 tools, 6 prompts, matching identity, successfulbinary_session.git diff --check— passed.CodeQL scope assessment
Default setup's local-input queries flag four caller-selected filesystem paths and the command argument vector in the development harness (check annotations). Sources are local operator argv/CODEX_HOME, not target contents or remote requests. The sinks are private profile creation, read-only fingerprinting, and explicitly selected Codex invocation via an argv list without a shell. This CLI runs with the operator's existing permissions and exposes no privileged/service entrypoint. These are intended inputs, rather than an injection or path-escape defect to fix by restricting caller choices. The repository's documented production CodeQL scope excludes test support, but advanced setup is inactive; no scanning configuration or alert state was changed.
Author readiness
Human owner: @gensokyo-dev (author is exempt from the declaration under CONTRIBUTING.md).