Commit Graph
4115 Commits
Author SHA1 Message Date
James Peter f7a49d2535 fix(mcp): validate stdio command on PATH; improve spawn error context. Fixes #302 2025-10-06 19:59:07 +10:00
James Peter a1b19f9ab1 fix(release): ensure release notes header matches tag; add guard check. Fixes #326 2025-10-06 19:36:52 +10:00
James Peter 2b871ab54b prompt tweak 2025-10-06 19:23:29 +10:00
James Peter 2b58038eeb ci(release): run nextest with locked debug profile 2025-10-06 18:32:07 +10:00
James Peter e53db0d243 ci(release): reuse dev-fast build for tests and cleanup target 2025-10-06 18:14:50 +10:00
James Peter c71c5cbb32 fix(rollout): prefer rollout files when resuming 2025-10-06 17:27:22 +10:00
James Peter ab3d651a23 test: run nextest in release and harden smokes 2025-10-06 16:26:26 +10:00
James Peter 897d3cb8f0 Merge branch 'code-branch-20251006-020831' into main 2025-10-06 14:14:08 +10:00
James Peter 7947f6fa8e merge local main into code-branch-20251006-020831 before merge 2025-10-06 14:14:08 +10:00
James Peter d8f5e50cde merge main into code-branch-20251006-020831 before merge 2025-10-06 14:14:07 +10:00
James Peter cef3359113 fix(tui): stabilize history ordering and scrollback 2025-10-06 14:05:00 +10:00
James Peter d206df5e9f Merge branch 'code-branch-20251006-020602' into main 2025-10-06 13:50:16 +10:00
James Peter b92970c502 merge main into code-branch-20251006-020602 before merge 2025-10-06 13:50:16 +10:00
James Peter 6e9763fb05 fix(core/tests): restore cargo test coverage 2025-10-06 13:49:35 +10:00
GitHub Action 52d6aabef1 chore(release): 0.2.186 [skip ci] 2025-10-06 02:23:01 +00:00
James Peter 1010377c10 chore(codex-rs): align mirror with parallel tool API 2025-10-06 12:04:29 +10:00
James Peter ac1920dcc0 fix(ci): restore execpolicy cli and test deps 2025-10-06 11:46:01 +10:00
James Peter 44458d2d0e Merge upstream/main: adopt tool parallelism and exec formatting 2025-10-06 11:19:57 +10:00
James Peter 4cd15413ab Merge branch 'code-branch-20251005-231240' into main 2025-10-06 10:21:48 +10:00
James Peter 96d1fad448 merge local main into code-branch-20251005-231240 before merge 2025-10-06 10:21:48 +10:00
James Peter 175a5eac7d refactor(upstream): re-export crates and prune docs 2025-10-06 10:21:27 +10:00
James Peter ac9590b7ba Merge branch 'code-branch-20251006-000111' into main 2025-10-06 10:20:49 +10:00
James Peter a1f65904d1 merge local main into code-branch-20251006-000111 before merge 2025-10-06 10:20:49 +10:00
James Peter 49cf2dfa58 Merge branch 'code-branch-20251006-000101' into main 2025-10-06 10:16:01 +10:00
James Peter a3d14642e8 fix(agents): show cloud builtin in /agents UI 2025-10-06 10:14:03 +10:00
James Peter a1965499d3 fix(ci-tests): call --tests for migrated crates 2025-10-06 10:09:39 +10:00
James Peter 4cf2ddf493 Merge branch 'code-branch-20251005-232038' into main 2025-10-06 09:58:40 +10:00
James Peter 2077e7be5d fix(tui/explore): hold exploring header off rendered cells 2025-10-06 09:58:16 +10:00
pakrym-oaiandGitHub 80b58b340c Trim double Total output lines (#4787) 2025-10-05 16:41:55 -07:00
James Peter 536c1aec8a chore(upstream): strip code branding in docs during diff 2025-10-06 09:07:04 +10:00
James Peter 5f74f7ca81 chore(upstream): drop .DS_Store noise in diff-crates 2025-10-06 09:05:14 +10:00
pakrym-oaiandGitHub caf7654565 Make output assertions more explicit (#4784)
Match using precise regexes.
2025-10-05 16:01:38 -07:00
James Peter bc744fad6f chore(upstream): ignore code prefix in diff crate comparisons 2025-10-06 09:01:17 +10:00
James Peter d5a124fd3a chore(upstream): normalize crate rename noise in diff-crates 2025-10-06 08:59:57 +10:00
James Peter 0089b863d8 fix(workflows): restore release and point to code-rs 2025-10-06 08:54:53 +10:00
Fouad MatinandGitHub 16a03d549c add codex sandbox {linux|macos} (#4782)
## Summary
- add a `codex sandbox` subcommand with macOS and Linux targets while
keeping the legacy `codex debug` aliases
- update documentation to highlight the new sandbox entrypoints and
point existing references to the new command
- clarify the core README about the linux sandbox helper alias

## Testing
- just fmt
- just fix -p codex-cli
- cargo test -p codex-cli


------
https://chatgpt.com/codex/tasks/task_i_68e2e00ca1e8832d8bff53aa0b50b49e
2025-10-05 15:51:57 -07:00
James Peter d3b4b15eb5 chore(tui): remove legacy overlay stack 2025-10-06 08:48:22 +10:00
James Peter 01795513fe chore(tui): drop vt100-tests flag and sync docs 2025-10-06 08:40:54 +10:00
Gabriel PealandGitHub 29aa7cad2b [MCP] Upgrade rmcp to 0.8 (#4774)
The version with the well-known discovery and my MCP client name change
were just released

https://github.com/modelcontextprotocol/rust-sdk/releases
2025-10-05 18:12:37 -04:00
pakrym-oaiandGitHub a4000bd9f3 Use response helpers when mounting SSE test responses (#4783)
## Summary
- replace manual wiremock SSE mounts in the compact suite with the
shared response helpers
- simplify the exec auth_env integration test by using the
mount_sse_once_match helper
- rely on mount_sse_sequence plus server request collection to replace
the bespoke SeqResponder utility in tests

## Testing
- just fmt

------
https://chatgpt.com/codex/tasks/task_i_68e2e238f2a88320a337f0b9e4098093
2025-10-05 21:58:16 +00:00
1dbf50ffd9 Expand TypeScript SDK README (#4779)
## Summary
- expand the TypeScript SDK README with streaming, architecture, and API
docs
- refresh quick start examples and clarify thread management options

## Testing
- Not Run (docs only)

---------

Co-authored-by: Hanzo Dev <[email protected]>
2025-10-05 21:43:34 +00:00
pakrym-oaiandGitHub 5f7213f3db Use assert_matches (#4756)
assert_matches is soon to be in std but is experimental for now.
2025-10-05 21:12:31 +00:00
pakrym-oaiandGitHub 81d1494686 Add helper for response created SSE events in tests (#4758)
## Summary
- add a reusable `ev_response_created` helper that builds
`response.created` SSE events for integration tests
- update the exec and core integration suites to use the new helper
instead of repeating manual JSON literals
- keep the streaming fixtures consistent by relying on the shared helper
in every touched test

## Testing
- `just fmt`


------
https://chatgpt.com/codex/tasks/task_i_68e1fe885bb883208aafffb94218da61
2025-10-05 21:11:43 +00:00
Michael BolinandGitHub d571e1cd02 fix: use low-level stdin read logic to avoid a BufReader (#4778)
`codex-responses-api-proxy` is designed so that there should be exactly
one copy of the API key in memory (that is `mlock`'d on UNIX), but in
practice, I was seeing two when I dumped the process data from
`/proc/$PID/mem`.

It appears that `std::io::stdin()` maintains an internal `BufReader`
that we cannot zero out, so this PR changes the implementation on UNIX
so that we use a low-level `read(2)` instead.

Even though it seems like it would be incredibly unlikely, we also make
this logic tolerant of short reads. Either `\n` or `EOF` must be sent to
signal the end of the key written to stdin.
2025-10-05 13:58:30 -07:00
James PeterandHanzo Dev 584fe44ee0 docs: add comprehensive session summary for 2025-10-06
Created detailed summary document capturing all work completed during
the Phase 1 cleanup session.

Session Achievements:
- Completed Phase 1-3: Baseline & Tooling, Crate Adoption, Fork Cleanup
- Removed 35,000 lines of legacy test code (106 files)
- Adopted upstream crates (mcp-client, responses-api-proxy)
- Audited feature flags and module usage (all active, no dead code)
- Documented test scaffolding patterns (ChatWidgetHarness)
- Created 5 new migration/maintenance documentation files

Metrics Summary:
- Test files: 205 → 99 (-52%)
- Test code lines: 46,300 → 11,300 (-76%)
- Orphaned modules: 6 → 0 (100% removed)
- Build time: 1m 30s (no regression)
- Documentation: 5 new comprehensive guides

Commits Created (4):
1. Legacy test retirement and upstream crate adoption
2. Feature flag and module audit completion
3. Test scaffolding patterns documentation
4. Roadmap update with completion status

Next Steps Identified:
- Checkout upstream to codex-rs/ for test porting
- Begin Phase 2: Port 6 critical core runtime tests
- Begin Phase 3: Port 3 TUI rendering tests
- Expand smoke test coverage using documented patterns

Status: Phase 1 Complete ✅ | Phase 2-4 Ready 🔄 | Upstream Checkout Needed 📋

Session captured all deliverables, metrics, lessons learned, and blockers
for future reference and continuity.

Co-authored-by: Hanzo Dev <[email protected]>
2025-10-06 05:25:36 +10:00
James PeterandHanzo Dev 8350b07e33 docs: update roadmap with Phase 1 completion status
Updated ROADMAP.md to reflect all completed Phase 1 work and reorganize
next actions with completion markers.

Completed (2025-10-06):
- Feature flag audit: code-fork properly used, gates 12 TUI extensions
- Module usage audit: All core and TUI modules actively used
- Test scaffolding documentation: ChatWidgetHarness patterns documented
- Dead code inventory: Comprehensive audit summary added

Active Work:
- Phase 2: Core runtime test porting (blocked on codex-rs/ checkout)
- Upstream diff review (requires codex-rs/ directory setup)
- Smoke test expansion (ongoing, following documented patterns)

Next Steps:
- Checkout upstream to codex-rs/ for diff tracking and test porting
- Begin porting 9 critical tests per legacy-tests-retirement.md
- Expand smoke test coverage using documented harness patterns

All Phase 1-3 objectives complete (Baseline & Tooling, Crate Adoption,
Fork Cleanup). Phase 4 (Test Suite Rebuild) in progress with scaffolding
complete and porting plan documented.

Co-authored-by: Hanzo Dev <[email protected]>
2025-10-06 05:23:48 +10:00
James PeterandHanzo Dev 94135c92f7 docs: document test scaffolding patterns and helpers
Added comprehensive documentation for the new test scaffolding infrastructure
created for code-rs smoke tests.

Test Scaffolding Documentation:
- ChatWidgetHarness: Test harness for widget testing without terminal I/O
- Assertion helpers: Pre-built assertions for common test patterns
- Usage examples: Real-world test patterns from ui_smoke.rs
- Best practices: Guidelines for writing maintainable smoke tests
- Extension guide: How to add new helpers and harness variants

Helper Functions Documented:
- ChatWidgetHarness::new() - Create test harness with defaults
- harness.handle_event() - Send protocol events to widget
- harness.drain_events() - Collect emitted AppEvents
- assert_has_insert_history() - Verify history insertion
- assert_has_background_event_containing() - Check background events
- assert_has_terminal_chunk_containing() - Verify terminal output
- assert_has_codex_event() - Check CodexEvent emission
- assert_no_events() - Verify no events emitted

Future Infrastructure:
- AppHarness for full app-level testing
- ExecutorHarness for command lifecycle testing
- MCPHarness for MCP server interaction testing
- VT100 replay tests for rendering regression testing

This documentation enables developers to write new smoke tests following
established patterns and expand test coverage incrementally.

Related: chatwidget::smoke_helpers in code-rs/tui/src/chatwidget/smoke_helpers.rs

Co-authored-by: Hanzo Dev <[email protected]>
2025-10-06 05:23:09 +10:00
James PeterandHanzo Dev c894d61233 docs: complete feature flag and module audit
Completed comprehensive audit of code-fork feature flag usage and module
organization across code-rs workspace.

Audit Results:
- Feature flags: All flags actively used, no unused flags detected
  - code-fork: Enabled by default, gates 12 fork-specific TUI extensions
  - vt100-tests: Retained for future test scaffolding
  - debug-logs, dev-faults: Active for development

- Module usage: All core and TUI modules actively used
  - code-rs/core subdirs (codex/, unified_exec/, exec_command/): All active
  - code-rs/tui modules: No orphaned code detected
  - #![allow(dead_code)]: 9 files with acceptable usage (helpers, utilities)

- Dead code status: No critical dead code remaining after Phase 1 cleanup
  - 35,000+ lines removed (106 test files + 6 orphaned modules)
  - All remaining code actively used and properly integrated

Updated DEAD_CODE_INVENTORY.md with:
- Feature flag audit results and usage details
- Module usage verification for core and TUI
- Audit summary section with documentation links
- Updated success metrics reflecting Phase 1 completion

Next: Focus on porting 9 critical tests per legacy-tests-retirement.md

Co-authored-by: Hanzo Dev <[email protected]>
2025-10-06 05:20:34 +10:00
James PeterandHanzo Dev 7deab83fc3 chore: complete legacy test retirement and upstream crate adoption
This commit completes Phase 1 of the codebase cleanup plan documented in
ROADMAP.md and related migration documents.

Major changes:
- Removed legacy test suites from code-rs/ crates (~35,000 lines)
- Adopted upstream codex-mcp-client and codex-responses-api-proxy
- Deleted TUI compat layer, agent task planning docs, and orphaned modules
- Updated documentation to reflect current state and future phases

Test Coverage:
- Deleted tests from: app-server, apply-patch, chatgpt, cli, core, exec,
  login, mcp-server
- Documented 9 remaining coverage gaps requiring new tests (see
  docs/migration/legacy-tests-retirement.md)
- Preserved smoke test infrastructure in tui/tests/ui_smoke.rs

Crate Adoptions:
- mcp-client: Now re-exports codex-mcp-client with fork-specific buffer config
- responses-api-proxy: Now re-exports codex-responses-api-proxy with minimal
  wrapper
- mcp-types: Updated to use upstream types where possible

TUI Cleanup:
- Removed compat.rs ratatui adapter layer
- Deleted obsolete modules: app_backtrack, custom_terminal, scroll_view,
  text_block, transcript_app
- Archived agent_tasks/ planning docs to docs/archive/

Documentation Updates:
- ROADMAP.md: Marked Phases 1-2 complete, updated next actions
- TEST_SUITE_RESET.md: Documented Phase 1 completion
- DEAD_CODE_INVENTORY.md: Updated with deletion outcomes
- Added docs/migration/legacy-tests-retirement.md with 6-week plan
- Added docs/maintenance/prompt-architecture.md

Next Steps (Phase 2-3):
- Port critical test coverage (9 test files identified)
- Expand smoke test scenarios
- Continue upstream tracking per monthly cadence

See docs/migration/ for detailed migration status and roadmap.

Co-authored-by: Hanzo Dev <[email protected]>
2025-10-06 05:15:48 +10:00
jif-oaiandGitHub 1e26288001 chore: drop read-file for gpt-5-codex (#4739)
Drop `read_file` for gpt-5-codex (will do the same for parallel tool
call) and add `codex-` as internal model for this kind of feature
2025-10-05 16:26:04 +00:00