fix(parser): add approval_mode field to CodexSessionInfo (unbreak CI)#188
Merged
Conversation
PR #185 added `approval_mode: None` to `state.rs` test fixtures and `approval_mode: string | null` to the TypeScript CodexSession / CodexSessionInfo interfaces, but never added the corresponding field to the Rust CodexSessionInfo struct in discover.rs. This left main red with E0560: 'struct CodexSessionInfo has no field named approval_mode'. Adds: - `pub approval_mode: Option<String>` to CodexSessionInfo - Extraction from session_meta.ask_for_approval in scan_session_file - None for session_meta_root sessions (no approval mode captured there) 339 lib tests pass; clippy -D warnings clean.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
CI has been red on
mainsince #185 landed. Cargo compile error onstate.rs:Cause
PR #185 (v0.144.0
writesapp-approval) addedapproval_mode: Noneto two test fixtures instate.rsand addedapproval_mode: string | nullto the TypeScriptCodexSession/CodexSessionInfointerfaces — but never added the corresponding field to the RustCodexSessionInfostruct indiscover.rs. The state.rs fixtures then referenced a field that didn't exist.Fix
Add the missing
pub approval_mode: Option<String>toCodexSessionInfoand populate it fromsession_meta.ask_for_approvalinscan_session_file.session_meta_root(which carries no approval metadata) returnsNone.Verification
🤖 Generated with Claude Code
Generated by Claude Code