Skip to content

Forge identity probe: contract method + GitHubForge/FakeForge impls, ru… - #10

Open
RandomFish227 wants to merge 3 commits into
mainfrom
warren/run_49a8a4ktw0rn
Open

Forge identity probe: contract method + GitHubForge/FakeForge impls, ru…#10
RandomFish227 wants to merge 3 commits into
mainfrom
warren/run_49a8a4ktw0rn

Conversation

@RandomFish227

Copy link
Copy Markdown
Owner

Summary

feat(forge): identity probe contract method + GitHubForge/FakeForge impls (warren-56bb)

Run

  • Warren run: run_49a8a4ktw0rn
  • Agent: claude-code
  • Cost: $5.14 (1.2k in / 50.1k out / 12.8M cache-r)

Seeds

  • warren-56bb — Forge identity probe: contract method + GitHubForge/FakeForge impls, run at instance registration to validate the operator's stated kind

Commits (3)

  • dec9114 feat(forge): identity probe contract method + GitHubForge/FakeForge impls (warren-56bb)
  • 713d585 chore(warren): seeds state
  • ec49c19 chore(warren): seeds state

Files changed

.seeds/issues.jsonl                |  2 +-
 src/forge/contract.test.ts         | 17 ++++++-
 src/forge/contract.ts              | 17 +++++++
 src/forge/fake/fake-forge.test.ts  | 30 +++++++++++++
 src/forge/fake/fake-forge.ts       | 17 +++++++
 src/forge/github-app/provider.ts   |  5 +++
 src/forge/github/identity-probe.ts | 66 +++++++++++++++++++++++++++
 src/forge/github/provider.test.ts  | 92 ++++++++++++++++++++++++++++++++++++++
 src/forge/github/provider.ts       |  6 +++
 src/forge/github/stub-server.ts    | 10 +++++
 src/forge/registry.test.ts         | 51 ++++++++++++++++-----
 src/forge/registry.ts              | 50 +++++++++++++++++++--
 src/runs/reap/test-helpers.ts      |  1 +
 src/server/main/index.ts           |  3 +-
 14 files changed, 349 insertions(+), 18 deletions(-)

Prompt

Show prompt
work on sd warren-56bb

🤖 Opened by warren run run_49a8a4ktw0rn

RandomFish227 and others added 3 commits August 20, 2026 23:11
…mpls (warren-56bb)

Adds `probeIdentity(baseUrl)` to the `Forge` interface (multi-forge-support.md
§4b) and implements it for all three providers:

- GitHubForge: issues an unauthenticated GET to `${baseUrl}/meta` and asserts
  presence of `x-github-request-id` or `x-github-media-type` headers
  (probe observed live 2026-08-19 against api.github.com). Implementation
  extracted to `src/forge/github/identity-probe.ts` to keep provider.ts under
  the 500-line budget.
- FakeForge: trivially satisfied by owning the `fake://` scheme — no network
  call, just a URL prefix check.
- GitHubAppForge: delegates to the inner GitHubForge transport.

`resolveForgeFromConfig` is now async and runs `probeIdentity` for every
config-driven `[[forges]]` instance at boot (§4b: "once per forge instance,
not once per project"). A probe failure throws `ForgeConfigError` and aborts
boot loud. Pass `skipProbe: true` in tests that do not need network validation.

The contract conformance suite gains a `probeBaseUrl` knob and a conformance
test for the new method. `stubGitHubServer` gains a `/meta` handler.
`stubForge` in reap test-helpers gains the new method.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
RandomFish227 pushed a commit that referenced this pull request Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant