Agent/from pathlib import path import re p pathmntdataki 75 l3 codex#1453
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 880931c051
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
kimi_enterprise_complete.py
Outdated
| if not isinstance(payload, dict) or "message" not in payload: | ||
| return None | ||
| return WireMessageRecord( | ||
| timestamp=float(payload.get("timestamp", time.time())), |
There was a problem hiding this comment.
Guard timestamp parsing against malformed wire records
parse_wire_file_line converts timestamp with float(payload.get("timestamp", time.time())) without handling conversion errors, and WireFile.iter_records does not catch parser exceptions, so a single line like {"timestamp": null, ...} or {"timestamp": "bad", ...} will raise and stop iteration for the rest of the file. This can break replay/audit ingestion whenever a wire file contains partially corrupted or non-conforming records.
Useful? React with 👍 / 👎.
kimi_enterprise_complete.py
Outdated
| if not isinstance(payload, dict) or "message" not in payload: | ||
| return None | ||
| return WireMessageRecord( | ||
| timestamp=float(payload.get("timestamp", time.time())), |
There was a problem hiding this comment.
🔴 parse_wire_file_line fabricates non-deterministic timestamps using time.time() for records missing a timestamp field
When parsing a wire file record that lacks a "timestamp" key, payload.get("timestamp", time.time()) at line 83 silently substitutes the current wall-clock time. This means:
- Each parse of the same file produces different timestamps for the same record, making replay non-deterministic.
- The fabricated timestamp has no relation to when the event actually occurred, silently corrupting data.
The canonical implementation in src/kimi_cli/wire/file.py:32 declares timestamp: float as a required Pydantic field with no default—model_validate_json would raise ValidationError for a missing timestamp, and the caller in iter_records (src/kimi_cli/wire/file.py:104-110) would log and skip the malformed record. The new code silently accepts it with a wrong value instead.
Was this helpful? React with 👍 or 👎 to provide feedback.
…athmntdataki-75-l3-codex
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2835461fef
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| def sdk_setup_text() -> str: | ||
| return "" |
There was a problem hiding this comment.
Return non-empty SDK setup instructions
The print-sdk-setup subcommand advertises that it prints setup instructions, but sdk_setup_text() currently returns an empty string, so even when called programmatically it emits no guidance. This leaves users with a documented command that appears to work but provides no actionable output.
Useful? React with 👍 / 👎.
Nietzsche-Ubermensch
left a comment
There was a problem hiding this comment.
Agent/from pathlib import path import
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Signed-off-by: Nietzsche-Ubermensch <peterbilt5018@gmail.com>
Nietzsche-Ubermensch
left a comment
There was a problem hiding this comment.
Agent/from pathlib import path import
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ea23f046f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| def _build_parser() -> argparse.ArgumentParser: | ||
| parser = argparse.ArgumentParser() | ||
| sub = parser.add_subparsers(dest="cmd") |
There was a problem hiding this comment.
Require a subcommand before returning success
The parser creates subcommands with dest="cmd" but does not make them required, and async_main falls through to return 0 when no command is provided. That means a caller can invoke this entrypoint without a subcommand and get a success exit code even though no operation ran, which can hide broken CI/wrapper invocations where the intended command argument was dropped.
Useful? React with 👍 / 👎.
| with self.path.open(encoding="utf-8") as f: | ||
| for line in f: |
There was a problem hiding this comment.
Avoid blocking I/O inside async record iterator
iter_records is an async generator but performs synchronous file reads via open() and a normal for loop, so scanning large wire files will block the event loop while disk I/O runs. In processes that multiplex other async work, this can stall unrelated tasks during replay/audit reads and cause noticeable responsiveness issues.
Useful? React with 👍 / 👎.
Related Issue
Resolve #(issue_number)
Description
Checklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.