Skip to content

provider + git jail: check HTTP status in complete(); drive-letter paths in add jail #119

Closed

Description

@ajianaz

Two provider/git correctness MAJORs from the cora full scan:

  1. HTTP status unchecked in complete() (openai.rs:361) — send_json→read_json never inspects the status; non-2xx bodies (HTML gateways, proxy errors) surface as "malformed response" instead of the real status. Fix: check resp.status().is_success() first and return a scrubbed ProviderError carrying status + body snippet. Note the feat: usage ledger wiring, 429 retry classification, no per-step transcript clone #66 transient-retry classification depends on error text — keep "http status: N" phrasing so 429/5xx keep auto-retrying.
  2. git add jail misses Windows drive-letter absolute paths (git.rs:91) — C:\Windows\evil passes the '/'-prefix and '..' checks lexically. Tole's mobile story targets Android but the lexical jail should be host-OS-honest: also reject len>1 && byte[1]==b':'.

Acceptance: unit test with a mock 500 response asserting the error contains the status (and that the retry path still classifies it); unit tests for C:\..., C:/..., and plain relative paths against the add jail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions