First marge#2
Draft
PenguinDOOM wants to merge 172 commits into
Draft
Conversation
- add Rust crate bootstrap, config, and public errors - add /health, /v1/models, and placeholder /v1/responses - add route tests, align workflow checkout versions, and update README
- add auth loading with explicit token override and safe errors - add Codex websocket handshake builder and header tests - add standalone websocket pump and scripted socket tests
- add retained session registry and continuation lease handling - add /v1/responses SSE bridge and stable upstream error mapping - add registry and bridge integration coverage for continuity and recoverability
- inject threadline_* tool schemas without overriding downstream tools - suppress internal-tool upstream events and send combined follow-up outputs after completion - add deterministic internal tool loop coverage while preserving normal streaming behavior
- add a bounded local job manager with polling, output reads, result lookup, cancellation, and TTL cleanup - wire threadline_* job tools to stable JSON outputs for function_call_output follow-ups - keep jobs disabled by default and enforce UTF-8 byte-bounded output retention via explicit command allowlists
- consume reconnect retry budget across pre-stream send failures - preserve reconnect errors in response streaming - add stable upstream and ws pump debug events - cover pre-stream reconnect single-attempt regression
- replace duplicated outbound capacity literals with one constant - use the same constant for mpsc channel creation and startup logging - keep ws_pump behavior unchanged
- add strict SSE frame parsing helpers for route tests - seed RED compaction contracts for pretty upstream JSON - tighten downstream error and internal tool SSE assertions
- replace raw SSE data forwarding with compact JSON serialization - route normal and completed downstream events through a shared helper - preserve stable public error payloads while blocking raw non-JSON forwarding
- strengthen internal tool downstream SSE assertions - tighten reconnect success and error frame contracts - keep keepalive unimplemented where no real path exists
- Changed the default port in ThreadlineConfig from 8787 to 8100 to align with the expected configuration.
- Updated AGENTS.md and README.md to consistently use "VSCode" instead of "VS Code" for clarity and uniformity.
- add RED unit contracts for HTTP handshake rejection mapping - preserve GREEN 502 regression coverage for generic connect failure
- map upstream HTTP handshake rejection statuses exactly - preserve 502 behavior for non-HTTP websocket connect failures
- add secret-safe structured logging for upstream connect errors - keep upstream HTTP rejection status propagation intact - complete targeted and full cargo test regression sweep
- Modified Cargo.toml to include the "native-tls" feature for the tokio-tungstenite dependency.
- Refactor the `build_handshake_request` function to use `IntoClientRequest` for creating the request. - Standardize header insertion using a new `header_value` helper function. - Add additional headers: `originator`, `user-agent`, and ensure proper handling of `x-codex-turn-state`. - Update tests to validate the new headers and error handling for invalid URLs.
- Reordered imports in `src/http.rs` for better organization. - Enhanced error logging in `map_upstream_connect_error` to include the error message.
- Modified `send_response_create` to construct the outbound message without a nested 'response' object. - Updated tests in `internal_tools.rs`, `reconnect.rs`, and `responses_bridge.rs` to reflect the removal of the 'response' field and adjusted assertions accordingly.
- Improved error handling in `responses_handler` by extracting error code, message, and status from the parsed JSON. - Added a new helper function `safe_scalar_field` to safely retrieve scalar values from JSON. - Updated test case in `responses_bridge.rs` to include error code and status in the emitted error message.
- Simplified the insertion of "x-client-request-id" header in build_handshake_request function. - Improved formatting for the user-agent string in responses_handler function. - Removed unnecessary line breaks in internal_tool_outputs_are_sent_after_intermediate_response_completes test. - Streamlined the message sending in upstream_pretty_json_is_compacted_before_downstream_sse test.
…es, and workflow documentation - Added `architecture.md` to outline module boundaries, ownership, dependency direction, and refactor guidelines for the Threadline agent. - Created `conventions.md` to establish naming, commenting, testing, logging, and commit message standards for the project. - Introduced `protocol.md` detailing rules for handling `/v1/responses`, WebSocket sessions, internal tools, jobs, and error management. - Established `workflow.md` to define development practices, validation processes, CI configurations, and final development summaries.
…flow - **conventions.md**: - Streamlined naming and wording guidelines. - Improved clarity on naming conventions and examples. - Consolidated sections on comments, TODOs, tests, logs, commits, and PRs. - Enhanced public terminology definitions and consistency. - **protocol.md**: - Clarified scope and protocol boundaries. - Updated definitions for direction terms and registry purpose. - Improved handling of internal tool lifecycle and job model. - Enhanced error handling and public error codes sections. - Streamlined SSE translation and concurrency rules. - **workflow.md**: - Refined scope and workflow principles. - Consolidated sections on local-only state and secret handling. - Updated validation baseline and CI workflow rules. - Improved development summaries structure and safety guidelines.
- Enhanced the scope section for clearer guidance on module management. - Consolidated architecture goals for better focus on VSCode BYOK `/v1/responses`. - Clarified module principles and responsibilities, emphasizing separation of concerns. - Updated dependency direction and transport ownership sections for better understanding. - Improved error, configuration, and authentication architecture descriptions. - Refined shared types and abstraction guidelines to avoid over-abstraction.
- add RED contract for missing/null instructions - confirm expected RED with targeted cargo test
- normalize missing and null instructions to "" - preserve explicit instructions in response.create - add GREEN bridge coverage and confirm fmt check
- assert empty instructions on initial and follow-up upstream requests - confirm responses_bridge and internal_tools stayed GREEN
- require upstream store:false in bridge contract tests - keep phase test-only and intentionally RED before implementation
- normalize every upstream response.create payload to store:false - cover internal-tool follow-up payloads with the same contract
- update responses bridge tests to seed unsupported fields - assert upstream response.create omits token and truncation fields - keep supported BYOK preservation checks and record expected RED
- add profile parsing to Threadline config and CLI - advertise profile-scoped aliases from /v1/models - carry route profile into shared HTTP and responses state
- resolve model aliases at the responses boundary by route profile - rewrite upstream payload models to real upstream ids - preserve invalid_model errors and reasoning effort coverage
- route Utility requests through a shared transient one-shot helper - strip continuity fields and threadline tools on Utility requests - lock Main summary and stale-marker behavior with focused regressions
- document two-process startup for Main and Utility profiles - add VS Code Custom Endpoint alias and utility model examples - clarify stateless Utility behavior and reasoning effort guidance
- rerun focused profile and utility regression coverage - pass fmt, clippy, and all-targets tests - keep manual two-process smoke as an external follow-up
- add utility_port CLI and env parsing - extend help text and README config coverage
- add pure config split helper for utility listener - map invalid startup config to configuration_error
- extract per-listener serve helper from startup - start main and utility listeners with try_join
- update README startup guidance for utility port - add README guard for one-process startup contract
- Add HTTP surface contract coverage for unsupported reasoning all_turns cases - Add supported forwarding regression coverage for reasoning and include preservation
- Add explicit per-alias all-turn reasoning support metadata - Preserve existing invalid_model behavior and model list shape
- Add stable unsupported_reasoning_context public error - Reject unsupported all-turns requests before auth and retained-session side effects
- Confirm supported all-turns reasoning payloads are preserved upstream - Re-run HTTP surface, bridge, lint, format, and full test validation
README.md: note that reasoning.context=all_turns is not supported for raw gpt-5.5 and gpt-5.4 compatibility ids, keep persistentCoT disabled in VS Code, and prefer the advertised Threadline aliases for all-turn reasoning.
- Add allowlisted interaction-type scaffolding and tests for header-driven and foreground summary classification. - Validate that the crate compiles and that only the new positive contracts remain red while negative guard coverage stays green.
- Normalize X-Interaction-Type at the HTTP boundary and classify conversation-compaction as AuxiliarySummary ahead of body fingerprint fallback. - Validate focused downstream/header tests and run clippy with warnings denied after formatting the touched Rust files.
- Extend summary fingerprint matching so the newer VS Code foreground summary prompt shape routes as AuxiliarySummary without compressed-history wording. - Validate the new positive case plus negative guard coverage and preserve existing compressed-history summary classification behavior.
- Extend responses bridge integration tests to prove header and body-fallback AuxiliarySummary requests bypass retained-session routing and preserve the expected transient payload behavior. - Validate privacy-safe routing diagnostics and keep Utility regression coverage intact without changing production routing code.
- Tighten the responses bridge diagnostics log selection so the full Rust test suite does not pick up unrelated normal-routing trace lines. - Re-run formatting, clippy with warnings denied, and the full locked all-targets/all-features test suite to confirm the final tree is green.
- add downstream and bridge tests for context_management normal routing, conversation-compaction routing, and nested summary fallback detection - validate with targeted downstream and responses_bridge filters; no intentional RED tests remain
- remove context_management from route-shaped upstream response.create payloads across normal, transient, and internal-tool follow-up paths while keeping valid previous_response_id continuity - validate bridge coverage for context-management stripping, summary-path consistency, diagnostics privacy, and rustfmt cleanliness
- restrict retained-session conflict reroutes to explicit compaction interaction, summary fingerprints, and narrow nested fallback signals while leaving ordinary conflicts unchanged - validate downstream fallback rules, retained conflict bridge coverage, and privacy-safe reroute diagnostics with focused Rust tests
- add bridge coverage proving transient summary ids are not retained markers and stale previous_response_id inputs remain stable not-found errors even with summary-like payloads - validate compaction-marker preservation and hidden internal function calls through focused responses_bridge filters without changing production code
- note that downstream context_management is stripped before upstream response.create - state that auxiliary summary does not imply server-side compaction passthrough - tighten compaction diagnostics and round-trip checklist wording
- Extend model and HTTP contract tests to name the new threadline-main-gpt-5.6-* aliases and hidden raw gpt-5.6-* compatibility IDs. - Validate the intended pre-implementation RED state with targeted cargo test runs so next can resolve only catalog gaps.
- Add advertised Main aliases and hidden raw compatibility IDs for gpt-5.6-sol, gpt-5.6-terra, and gpt-5.6-luna in MODEL_ALIAS_CATALOG. - Confirm the catalog-driven model and HTTP contracts are GREEN with targeted cargo test runs and no extra HTTP or response-layer changes.
- Add the new GPT-5.6 Main aliases, raw upstream IDs, VS Code endpoint examples, and a local-only unreleased-model caveat to the README. - Tighten the CLI README contract test around supported alias sections and note that cargo fmt --all --check is still blocked by pre-existing formatting drift outside the changed files.
- Condense the new main raw compatibility model constant declaration - Reflow long status assertions for readability - Fix formatting in the reasoning all_turns compatibility test
- add a case for removing `reasoning.summary: "off"` while preserving `effort` - add a case for dropping empty `reasoning` objects after stripping `summary: "off"`
- strip `reasoning.summary = "off"` before forwarding to Codex - remove empty `reasoning` objects after normalization
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.
No description provided.