Skip to content

Commit 87ff975

Browse files
committed
fix(schema): coerce ExecCommandEndEvent.exit_code to integer
1 parent 4682fca commit 87ff975

5 files changed

Lines changed: 156 additions & 753 deletions

File tree

.github/workflows/codex-autoreview.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,30 @@
1-
name: Codex Review
1+
name: Codex Review & Edits
22

33
on:
44
pull_request:
55
types: [opened, synchronize, reopened, ready_for_review]
6+
issue_comment:
7+
types: [created]
8+
pull_request_review:
9+
types: [submitted]
10+
pull_request_review_comment:
11+
types: [created]
612

713
permissions:
8-
contents: read
14+
contents: write
915
pull-requests: write
1016

1117
jobs:
1218
review:
13-
name: Run Codex review
19+
name: Run Codex review & edits
1420
runs-on: ubuntu-latest
1521
steps:
1622
- uses: actions/checkout@v4
23+
with:
24+
# Ensure we can push back to the PR head branch
25+
fetch-depth: 0
1726

18-
- name: Codex autonomous review
27+
- name: Codex autonomous review & edits
1928
uses: gersmann/codex-review-action@latest
2029
with:
2130
openai_api_key: ${{ secrets.OPENAI_API_KEY }}

codex/protocol/types.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# generated by datamodel-codegen:
22
# ruff: noqa: F821
33
# filename: protocol.schema.json
4-
# timestamp: 2025-09-14T16:20:04+00:00
4+
# timestamp: 2025-09-14T16:47:21+00:00
55

66
from __future__ import annotations
77

@@ -145,7 +145,7 @@ class ExecCommandEndEvent(BaseModelWithExtras):
145145
aggregated_output: str = Field(..., description="Captured aggregated output")
146146
call_id: str = Field(..., description="Identifier for the ExecCommandBegin that finished.")
147147
duration: str = Field(..., description="The duration of the command execution.")
148-
exit_code: float = Field(..., description="The command's exit code.")
148+
exit_code: int = Field(..., description="The command's exit code.")
149149
formatted_output: str = Field(
150150
..., description="Formatted output from the command, as seen by the model."
151151
)
@@ -566,7 +566,7 @@ class TaskCompleteEvent(BaseModelWithExtras):
566566

567567

568568
class TaskStartedEvent(BaseModelWithExtras):
569-
model_context_window: float | None = None
569+
model_context_window: int | None = None
570570

571571

572572
class TextResourceContents(BaseModelWithExtras):
@@ -576,16 +576,16 @@ class TextResourceContents(BaseModelWithExtras):
576576

577577

578578
class TokenUsage(BaseModelWithExtras):
579-
cached_input_tokens: float
580-
input_tokens: float
581-
output_tokens: float
582-
reasoning_output_tokens: float
583-
total_tokens: float
579+
cached_input_tokens: int
580+
input_tokens: int
581+
output_tokens: int
582+
reasoning_output_tokens: int
583+
total_tokens: int
584584

585585

586586
class TokenUsageInfo(BaseModelWithExtras):
587587
last_token_usage: TokenUsage
588-
model_context_window: float | None = None
588+
model_context_window: int | None = None
589589
total_token_usage: TokenUsage
590590

591591

@@ -666,7 +666,7 @@ class EventMsgError(BaseModelWithExtras):
666666

667667

668668
class EventMsgTaskStarted(BaseModelWithExtras):
669-
model_context_window: float | None = None
669+
model_context_window: int | None = None
670670
type: Literal["task_started"]
671671

672672

@@ -767,7 +767,7 @@ class EventMsgExecCommandEnd(BaseModelWithExtras):
767767
aggregated_output: str = Field(..., description="Captured aggregated output")
768768
call_id: str = Field(..., description="Identifier for the ExecCommandBegin that finished.")
769769
duration: str = Field(..., description="The duration of the command execution.")
770-
exit_code: float = Field(..., description="The command's exit code.")
770+
exit_code: int = Field(..., description="The command's exit code.")
771771
formatted_output: str = Field(
772772
..., description="Formatted output from the command, as seen by the model."
773773
)
@@ -845,8 +845,8 @@ class EventMsgGetHistoryEntryResponse(BaseModelWithExtras):
845845
None,
846846
description="The entry at the requested offset, if available and parseable.",
847847
)
848-
log_id: float
849-
offset: float
848+
log_id: int
849+
offset: int
850850
type: Literal["get_history_entry_response"]
851851

852852

@@ -1088,8 +1088,8 @@ class GetHistoryEntryResponseEvent(BaseModelWithExtras):
10881088
None,
10891089
description="The entry at the requested offset, if available and parseable.",
10901090
)
1091-
log_id: float
1092-
offset: float
1091+
log_id: int
1092+
offset: int
10931093

10941094

10951095
class GitDiffToRemoteResponse(BaseModelWithExtras):
@@ -1505,10 +1505,10 @@ class ResumeConversationResponse(BaseModelWithExtras):
15051505

15061506

15071507
class SessionConfiguredEvent(BaseModelWithExtras):
1508-
history_entry_count: float = Field(
1508+
history_entry_count: int = Field(
15091509
..., description="Current number of entries in the history log."
15101510
)
1511-
history_log_id: float = Field(
1511+
history_log_id: int = Field(
15121512
...,
15131513
description="Identifier of the history log file (inode on Unix, 0 otherwise).",
15141514
)
@@ -1525,10 +1525,10 @@ class SessionConfiguredEvent(BaseModelWithExtras):
15251525

15261526

15271527
class EventMsgSessionConfigured(BaseModelWithExtras):
1528-
history_entry_count: float = Field(
1528+
history_entry_count: int = Field(
15291529
..., description="Current number of entries in the history log."
15301530
)
1531-
history_log_id: float = Field(
1531+
history_log_id: int = Field(
15321532
...,
15331533
description="Identifier of the history log file (inode on Unix, 0 otherwise).",
15341534
)

prompts/code-review.md

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)