Skip to content

Replace HemSoft OpenRouter PR reviews with subscription-backed Codex #125

Closed

Description

@HemSoft

Goal

Replace the HemSoft SFL PR reviewer runtime with native Codex GitHub code review backed by the owner's ChatGPT/Codex plan. HemSoft reviewer deployments must no longer call OpenRouter or require OPENROUTER_API_KEY.

Proven contract

The hs-buddy PR #427 experiment proved that a HemSoft-authored @codex review comment triggers the installed OpenAI connector and returns a result bound to the reviewed commit. Clean results arrive as issue comments; findings can arrive as a COMMENTED pull-request review with inline comments.

Authenticate Codex artifacts through GitHub App ID 1144995 (chatgpt-codex-connector, owned by openai) and bot user ID 199175422, not body text or login alone.

Acceptance criteria

  • Remove OpenRouter/Kimi as the HemSoft PR-review execution path, including its secret, provider URL, network allowance, model pricing, manifest defaults, documentation, and contract tests.
  • Add a small Codex review adapter at the reviewer lifecycle/evidence seam. Do not rewrite unrelated SFL deployment or gate code.
  • Add a gh sfl review --repo OWNER/REPO --pr NUMBER command that uses the active HemSoft GitHub identity to post exactly one @codex review request for the current head and reports the trigger comment URL.
  • Observe both native Codex result forms:
    • clean issue comment;
    • COMMENTED pull-request review with inline findings.
  • Resolve the Codex-reported commit prefix through GitHub and prove it equals the full current PR head before publishing success or failure.
  • Reject stale heads, changed bases, unauthenticated or wrong-App artifacts, ambiguous/missing commit evidence, and malformed results.
  • Preserve the existing Actions-owned SFL Reviewer Gate Runner required context and publish immutable-head evidence suitable for that gate.
  • A clean Codex result passes the gate. Any current-head Codex finding keeps it failed.
  • Document that HemSoft SFL now follows Codex GitHub review severity behavior rather than the former Kimi three-pass/all-severity contract.
  • Add focused tests for clean, finding, stale, spoofed, and malformed artifacts plus CLI request deduplication.
  • Keep target-repository deployment PRs as a separate pilot step. Pilot only on HemSoft/hs-buddy after this source PR is reviewed.

Non-goals

  • No OpenAI API key or Codex API-backed CI engine.
  • No OpenRouter fallback for HemSoft.
  • No developer-documentation repository changes.
  • No multi-tenant or non-HemSoft distribution redesign.

Runtime evidence

Activity

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

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