GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add durable OpenRouter inference broker by w4ffl35 · Pull Request #23 · Capsize-Games/headlesscode

Conversation

@w4ffl35

@w4ffl35 w4ffl35 commented Sep 30, 2026

Copy link
Copy Markdown
Member

Summary

Closes #17.

  • Adds a host-side OpenRouter broker with pinned model routing, job capabilities, finite request/token/time/spend ceilings, and durable Postgres and file-ledger admission and receipts.
  • Keeps provider credentials outside OpenShell guests, rejects arbitrary broker routes, and records authenticated denial counts by status and reason without storing prompt or credential data. Failed fleet mutations retain only an unqualified denial summary.
  • Enforces job deadlines from broker registration through guest setup and execution, blocks qualification for ambiguous or late usage, and preserves bounded receipts through benchmark and fleet reports.
  • Adds the gateway network-namespace launch recipe and bounded mock-upstream OpenShell smoke. The smoke does not contact OpenRouter or use a production credential.

Verification

  • npm run typecheck — exit 0.
  • npm test — exit 0; run-tests: all 174 file(s) passed. The PostgreSQL queue TAP suite had 9 database/S3-gated skips in this run because those integration settings were absent.
  • Focused broker, reports, runner, and OpenShell integration tests — 15 passed, 0 failed, 0 skipped.
  • Disposable PostgreSQL 16 run of src/rsi/__tests__/postgres-queue.test.ts — 5 passed, 7 S3-gated skips, 0 failed. This exercised migrations 004–005, broker admission, denial persistence, and failed-job denial summary storage.
  • Exact image build: harness commit a55c8438b954501ffd9b6455156f17f97f51b9c5; agent image ID sha256:ce3df9db8d0bdaa5d9d6177adeed5d1cff5c1e62efa4ce6ca42805e8212c0bf2.
  • Bounded gateway-namespace mock smoke — passed on that exact image: 3 mock upstream calls, 1,272 tokens, simulated cost $0.001272, host sentinel hits 0, host key absent from guest result. HTTP audit showed three admitted completion requests (200) and two expected metadata requests (404). No production provider credential or paid request was used. The smoke left no sandbox, temporary endpoint alias, or temporary firewall rule.

Security impact

The broker keeps the provider key in the host process and gives the guest a per-job capability restricted to one model endpoint. The guest cannot select another provider/model or use the broker as a general proxy. Spend and duration reservations are durable and fail closed; ambiguous dispatches are not retried. Denial summaries contain only status, reason category, and count. The bounded smoke also tested that the guest could not reach a second local HTTP sentinel outside the broker allowlist.

Test plan

Run npm run typecheck and npm test. For the local Docker gateway integration, follow the bounded mock-upstream recipe in docs/recursive-self-improvement.md; it builds the image from the current clean commit, joins only the gateway network namespace, uses a mock upstream, and removes its temporary mTLS endpoint alias on exit. No production API key is needed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
w4ffl35 added 6 commits September 30, 2026 05:29
@w4ffl35
Add bounded OpenRouter inference broker for RSI
fdc3dc4
@w4ffl35
Make baked OpenShell source readable to sandbox
56dae35
@w4ffl35
Assert OpenShell runtime source permissions
3591616
@w4ffl35
Keep OpenShell broker responsive during guest runs
c520b0b
@w4ffl35
Report OpenShell guest command timeouts safely
62e50e1
@w4ffl35
Add durable OpenRouter inference broker
a55c843
@w4ffl35
w4ffl35 marked this pull request as ready for review September 30, 2026 14:17
@w4ffl35
w4ffl35 merged commit 7983a24 into master Sep 30, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@w4ffl35 w4ffl35 mentioned this pull request Sep 30, 2026
RSI proof 3/6: Add bounded OpenRouter mutation inference #17
Closed
@w4ffl35
w4ffl35 deleted the codex/rsi-proof-17 branch October 6, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

RSI proof 3/6: Add bounded OpenRouter mutation inference

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@w4ffl35
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.