diff --git a/docs/maintenance-2026-12-04.md b/docs/maintenance-2026-12-04.md new file mode 100644 index 0000000..5b876c2 --- /dev/null +++ b/docs/maintenance-2026-12-04.md @@ -0,0 +1,29 @@ +# Daily upstream review — 2026-12-04 WIB + +## Baseline and scope + +Exact fork baseline: `0b73da3eb427e86e0a1f344433c975b65c058699`. +Inspected upstream range: `1c0d1cd5fea1cb2aeda5a06358bf74ae9277a3cd..c5e4a6d61331dc9f5fde088a11f76b75a49db96b` (43 commits including merges). +Previous PR #3 is actually merged into this baseline; no open maintenance PR existed at discovery. + +The fork is a Home-managed Rust worker, not the upstream standalone Go service. Ancestry and patch comparison were inspected, but textual non-equivalence is not proof of absent functionality. + +## Retained behavior and regression coverage + +The Codex normalization portion of upstream `c5e4a6d6` already exists in `src/providers/codex.rs`: trim/case-fold string tiers, map fast/priority to priority, retain Codex ultrafast and remove unsupported/non-string values. Add a table-driven regression for those cases, missing values, and retained model/stream/store behavior. Run the identical fixture on the exact origin/main baseline and maintenance worktrees using separate build target directories. This is regression-only partial semantic coverage, not a production implementation change or complete upstream synchronization. + +No textual conflicts or blanket ours/theirs resolution. Existing Rust architecture, AI48 branding, Home-owned scheduling/credentials, RESP/mTLS, authentication, billing/accounting, fail-closed plugin restrictions and bounded streaming remain unchanged. Prior empty-tool-argument and midstream-usage fixes remain in the baseline. + +## Concrete remaining compatibility gaps + +- Decisions dispatch requires Home capability negotiation and model capability propagation. Current sibling Home has no Decisions dispatch implementation; advertising it solely from the worker would violate the contract. +- Plugin OAuth persistence and coalesced plugin TTFT changes do not enable this intentionally plugin-disabled worker. ACP pricing UI work must not imply supported worker execution. +- Antigravity continuation/replay, license probes, OAuth refresh/cooldown and failover changes need adaptations across the Home-owned scheduler and worker response/accounting boundaries; copying the upstream local auth manager is not safe. +- Standard Responses service-tier policy is not covered by this Codex test; do not globally discard custom provider tiers or claim every converter is normalized. +- Claude ClientHello/first-party headers, rate-limit forwarding, Kimi terminal frames and OpenAI WebSocket error changes remain unverified at their route boundaries. + +## Database and verification boundaries + +No schema changes or migrations. Sibling Home schema remains **31 → 31**, upstream Home **21**. No production database access, migration renumbering or daily version increment. + +Use locked all-target Cargo tests, strict Clippy and format checks, comparing identical fixtures/environment against exact origin/main. Record actual outcomes in the PR. Any existing lint failure blocks a ready PR; a draft does not assert readiness. No live-provider, browser or deployment acceptance is claimed. No deployment, restart, force push, main push or auto-merge. diff --git a/src/providers/tests.rs b/src/providers/tests.rs index 1952e4a..c47f071 100644 --- a/src/providers/tests.rs +++ b/src/providers/tests.rs @@ -44,6 +44,33 @@ fn codex_normalization_fixture() { assert!(continued.get("previous_response_id").is_none()); } +// Upstream c5e4a6d6: Codex accepts ultrafast while fast aliases priority. +#[test] +fn codex_service_tier_upstream_regression() { + for (tier, expected) in [ + (json!("priority"), Some("priority")), + (json!(" Fast "), Some("priority")), + (json!(" ULTRAFAST "), Some("ultrafast")), + (json!("default"), None), + (json!(""), None), + (json!(1), None), + (Value::Null, None), + ] { + let mut body = json!({"input":"hello", "service_tier":tier}); + codex::normalize_request(&mut body, "gpt-fixture").unwrap(); + assert_eq!(body.get("service_tier").and_then(Value::as_str), expected); + if expected.is_none() { + assert!(body.get("service_tier").is_none()); + } + assert_eq!(body["model"], "gpt-fixture"); + assert_eq!(body["store"], false); + assert_eq!(body["stream"], true); + } + let mut missing = json!({"input":"hello"}); + codex::normalize_request(&mut missing, "gpt-fixture").unwrap(); + assert!(missing.get("service_tier").is_none()); +} + #[test] fn codex_terminal_fixture() { assert_eq!(