Repository navigation
Verify tagged OpenAI ZIPs in Codex #217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9289fa0
Verify tagged OpenAI ZIPs in Codex
Aaravkhanal a57711a
Verify Codex guide preflight in release test
Aaravkhanal d8a7910
Keep Codex release test evidence consistent
Aaravkhanal dcd73ac
Report the Codex release workflow preflight gap
Aaravkhanal 8e1e5f7
Align release validation setup with repository guidance
Aaravkhanal fd4885d
Count verified per-file reads from Codex traces
Aaravkhanal 9d3cfbd
Keep Codex guide check path-free and simplify read assertions
Aaravkhanal 6e8ddda
Test Codex read evidence against native trace events
Aaravkhanal d800faf
Recognize literal reads in Codex compound commands
Aaravkhanal 8bd11c5
Add conservative cases for Codex read tracing
Aaravkhanal 7b42bbc
Update Codex verification report
Aaravkhanal 889cde4
Sync packaged Claude README with source
Aaravkhanal 78df721
Merge current main and preserve Codex release verification
n3wth 480e077
Keep native trace read paths unquoted on Windows
n3wth 977835b
Use native absolute missing paths in trace fixtures
n3wth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| # Copyright 2026 Google LLC. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| """Offline regression tests for Codex command-read trace evidence.""" | ||
|
|
||
| from pathlib import Path | ||
| import runpy | ||
| import shlex | ||
|
|
||
| import pytest | ||
|
|
||
| ROOT = Path(__file__).resolve().parents[2] | ||
|
|
||
|
|
||
| @pytest.mark.parametrize( | ||
| ("parsed_command", "exit_code", "output", "expected"), | ||
| [ | ||
| ( | ||
| lambda path: {"type": "unknown", "cmd": f"cat {path} /missing"}, | ||
| 1, | ||
| "# Installed guide\n" + "guide content " * 20, | ||
| True, | ||
| ), | ||
| ( | ||
| lambda path: { | ||
| "type": "unknown", | ||
| "cmd": f"pwd; rg --files -g 'README*' .; cat {path}", | ||
| }, | ||
| 0, | ||
| "# Installed guide\n" + "guide content " * 20, | ||
| True, | ||
| ), | ||
|
Aaravkhanal marked this conversation as resolved.
Resolved
|
||
| ( | ||
| lambda path: { | ||
| "type": "unknown", | ||
| "cmd": f"cd {Path(path).parent} && cat {path}", | ||
| }, | ||
| 0, | ||
| "# Installed guide\n" + "guide content " * 20, | ||
| False, | ||
| ), | ||
| ( | ||
| lambda path: { | ||
| "type": "unknown", | ||
| "cmd": f"cat {path} | head", | ||
| }, | ||
| 0, | ||
| "# Installed guide\n" + "guide content " * 20, | ||
| False, | ||
| ), | ||
| ( | ||
| lambda path: {"type": "unknown", "cmd": f"cat {path} /missing"}, | ||
| 1, | ||
| "cat: /missing: No such file or directory\n", | ||
| False, | ||
| ), | ||
| ( | ||
| lambda path: {"type": "read", "path": str(path)}, | ||
| 1, | ||
| "# Installed guide\n" + "guide content " * 20, | ||
| False, | ||
| ), | ||
| ( | ||
| lambda path: {"type": "read", "path": str(path)}, | ||
| 0, | ||
| "# Installed guide\n" + "guide content " * 20, | ||
| True, | ||
| ), | ||
| ], | ||
| ids=( | ||
| "failed-cat-printed-file", "compound-cat-printed-file", | ||
| "and-separated-cat-rejected", "piped-cat-rejected", | ||
| "failed-cat-no-file-output", "failed-read", "successful-read", | ||
| ), | ||
| ) | ||
| def test_successful_reads_requires_native_trace_evidence( | ||
| tmp_path: Path, parsed_command, exit_code: int, output: str, | ||
| expected: bool, | ||
| ) -> None: | ||
| successful_reads = runpy.run_path( | ||
| str(ROOT / "tests/integration/test_codex.py") | ||
| )["successful_reads"] | ||
|
n3wth marked this conversation as resolved.
Resolved
|
||
| guide = tmp_path / "docs" / "codex.md" | ||
| guide.parent.mkdir() | ||
| guide.write_text("# Installed guide\n" + "guide content " * 20) | ||
| command = parsed_command(shlex.quote(str(guide))) | ||
| trace = [{ | ||
| "type": "event_msg", | ||
| "payload": { | ||
| "type": "item_completed", | ||
| "item": { | ||
| "type": "CommandExecution", | ||
| "status": "failed" if exit_code else "completed", | ||
| "exit_code": exit_code, | ||
| "cwd": tmp_path.as_uri(), | ||
| "parsed_cmd": [command], | ||
| "aggregated_output": output, | ||
| }, | ||
| }, | ||
| }] | ||
|
|
||
| assert (guide.resolve() in successful_reads(trace)) is expected | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.