Skip to content

fix(chat): preserve null timeouts and attribute worker expiry - #974

Open
seonghobae wants to merge 2 commits into
mainfrom
codex/ask-timeout-attribution-20260907
Open

fix(chat): preserve null timeouts and attribute worker expiry#974
seonghobae wants to merge 2 commits into
mainfrom
codex/ask-timeout-attribution-20260907

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Post chat silently applied a 180-second model transport limit, including when the factory received explicit null. Separately, Ask classified an immediate upstream TimeoutError as expiry of its 600-second worker timer.

Default the post-chat transport to null and preserve omitted/null/explicit seconds through its factory and shared HTTP boundary. Use the native asyncio timeout context's expiration state to attribute only actual worker expiry; provider failures retain ADR 0123's bounded unavailable response, and shutdown cancellation propagates without failed settlement. ADR 0083 records the transport-default amendment as Proposed, with its existing Accepted runtime pin unchanged.

Validation on exact head def15fc691d4442c0d82103c1642147b1528d7be:

  • Three RED assertions reproduced implicit limits through direct and factory creation. The provider-origin RED assertion reproduced incorrect deadline attribution.
  • Focused post-chat/HTTP/queue/service suites: 69 passed, 2 real-provider tests skipped. Includes omitted/null/numeric values through both construction paths, null/numeric requests against a local HTTP server, worker expiry, provider failure, and shutdown without failed settlement.
  • Exact-head Tests 34087424307 are terminal GREEN: PostgreSQL-backed full suite and frontend lint/test/production-build/Storybook passed.
  • SAST 34087424256 and Security 34087424295 are now terminal GREEN on the same head.
  • Required CodeQL PR 34087424233 is terminal fail-closed, not a source finding. Language detection succeeded; Python, JavaScript/TypeScript, and Actions compatibility jobs successfully dispatched current-head scans, then failed at Release runner or enforce current-head CodeQL verdict because the authenticated codeql-dispatch/* verdict was still pending. The job explicitly records that the dispatcher is expected to publish a terminal verdict and rerun the exact failed job. Do not replace this with a synthetic status or leaf head churn.
  • Qualifying independent exact-head APPROVE: none.

Remaining scope: Ask still explicitly supplies a 570-second socket limit and enforces a 600-second execution deadline. Age-based orphan recovery and settlement require execution-owner fencing; remove those limits only with a liveness/recovery contract. Null socket timeouts do not establish cancellation of blocking network work. Other model clients require separate verification.

The contextual-orchestrator #1053 contract inspected at a95d3c8c1160c821d4e1ed7a2fbe50eaed176b7f remains Draft: it stores/reads timeout policy but explicitly reports enforcement unavailable. No open upstream PR is treated as a released runtime.

Direct descendant #979 is the #975 ownership-fencing lane and remains dependent on this exact parent. Keep this PR Ready for Review but do not merge until required CodeQL has a terminal authenticated GREEN and qualifying independent approval exists. No self-approval, gate weakening, deployment, or live-provider acceptance is claimed.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 3c5c9b4d-9556-45ad-919a-5732b1da397a

📥 Commits

Reviewing files that changed from the base of the PR and between 83eba56 and def15fc.

📒 Files selected for processing (10)
  • AGENTS.md
  • backend/app/global_ask_queue.py
  • backend/app/main.py
  • docs/adr/0083-orchestrator-runtime-commit-pin.md
  • docs/product-technical-gap-baseline.md
  • lineageweave/http_client.py
  • lineageweave/post_chat.py
  • tests/test_global_ask_queue.py
  • tests/test_http_client.py
  • tests/test_post_chat.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae seonghobae added the bug Something isn't working label Sep 7, 2026 — with ChatGPT Codex Connector
@seonghobae seonghobae changed the title fix(ask): distinguish provider timeouts from worker expiry fix(chat): preserve null timeouts and attribute worker expiry Sep 7, 2026

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode reviewed the current-head product diff. Coverage is a separate gate.

Changed files

  • AGENTS.md — repository behavior
  • backend/app/global_ask_queue.py — API and service runtime
  • backend/app/main.py — API and service runtime
  • docs/adr/0083-orchestrator-runtime-commit-pin.md — operator or user guidance
  • docs/product-technical-gap-baseline.md — operator or user guidance
  • lineageweave/http_client.py — Python module behavior
  • lineageweave/post_chat.py — Python module behavior
  • tests/test_global_ask_queue.py — regression suite
  • tests/test_http_client.py — regression suite
  • tests/test_post_chat.py — regression suite

Changed behavior

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Repository file: AGENTS.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Repository file: AGENTS.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["Backend: global_ask_queue.py (2 files)"]
  S2 --> I2["API and service runtime"]
  I2 --> R2["Review risk: Backend: global_ask_queue.py (2 files)"]
  R2 --> V2["backend tests"]
  Evidence --> S3["Docs: 0083-orchestrator-runtime-commit-pin.md (2 files)"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: 0083-orchestrator-runtime-commit-pin.md (2 files)"]
  R3 --> V3["docs review"]
  Evidence --> S4["Python: http_client.py (2 files)"]
  S4 --> I4["Python module behavior"]
  I4 --> R4["Review risk: Python: http_client.py (2 files)"]
  R4 --> V4["pytest plus coverage"]
  Evidence --> S5["Test: test_global_ask_queue.py (3 files)"]
  S5 --> I5["regression suite"]
  I5 --> R5["Review risk: Test: test_global_ask_queue.py (3 files)"]
  R5 --> V5["targeted test run"]
Loading

Findings

No source-backed product finding is synthesized from the coverage gate. A coverage miss belongs in the status comment.

  • Head SHA: def15fc691d4442c0d82103c1642147b1528d7be
  • Workflow run: 34111705214
  • Workflow attempt: 1
  • Coverage gate: failure

Review outcome

Coverage is a gate, not the review. This body reviews the changed product files.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Repository file: AGENTS.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Repository file: AGENTS.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["Backend: global_ask_queue.py (2 files)"]
  S2 --> I2["API and service runtime"]
  I2 --> R2["Review risk: Backend: global_ask_queue.py (2 files)"]
  R2 --> V2["backend tests"]
  Evidence --> S3["Docs: 0083-orchestrator-runtime-commit-pin.md (2 files)"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: 0083-orchestrator-runtime-commit-pin.md (2 files)"]
  R3 --> V3["docs review"]
  Evidence --> S4["Python: http_client.py (2 files)"]
  S4 --> I4["Python module behavior"]
  I4 --> R4["Review risk: Python: http_client.py (2 files)"]
  R4 --> V4["pytest plus coverage"]
  Evidence --> S5["Test: test_global_ask_queue.py (3 files)"]
  S5 --> I5["regression suite"]
  I5 --> R5["Review risk: Test: test_global_ask_queue.py (3 files)"]
  R5 --> V5["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

Coverage evidence did not pass, so approval is blocked. The formal pull-request review is the source-backed diff review, not this status comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant