Skip to content

fix(parser): add approval_mode field to CodexSessionInfo (unbreak CI)#188

Merged
delexw merged 1 commit into
mainfrom
fix-ci-approval-mode
Jul 14, 2026
Merged

fix(parser): add approval_mode field to CodexSessionInfo (unbreak CI)#188
delexw merged 1 commit into
mainfrom
fix-ci-approval-mode

Conversation

@delexw

@delexw delexw commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Problem

CI has been red on main since #185 landed. Cargo compile error on state.rs:

error[E0560]: struct `discover::CodexSessionInfo` has no field named `approval_mode`
    --> src/state.rs:181:21

Cause

PR #185 (v0.144.0 writes app-approval) added approval_mode: None to two test fixtures in state.rs and added approval_mode: string | null to the TypeScript CodexSession / CodexSessionInfo interfaces — but never added the corresponding field to the Rust CodexSessionInfo struct in discover.rs. The state.rs fixtures then referenced a field that didn't exist.

Fix

Add the missing pub approval_mode: Option<String> to CodexSessionInfo and populate it from session_meta.ask_for_approval in scan_session_file. session_meta_root (which carries no approval metadata) returns None.

Verification

cargo test --lib
test result: ok. 339 passed; 0 failed
cargo clippy -- -D warnings
Finished (clean)

🤖 Generated with Claude Code


Generated by Claude Code

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.
@delexw
delexw merged commit 4b00fad into main Jul 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants