Forge identity probe: contract method + GitHubForge/FakeForge impls, ru… - #10
Open
RandomFish227 wants to merge 3 commits into
Open
Forge identity probe: contract method + GitHubForge/FakeForge impls, ru…#10RandomFish227 wants to merge 3 commits into
RandomFish227 wants to merge 3 commits into
Conversation
…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
…#10 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015tYTu1c8sWTQDG3RiYxgac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
feat(forge): identity probe contract method + GitHubForge/FakeForge impls (warren-56bb)
Run
run_49a8a4ktw0rnSeeds
Commits (3)
Files changed
Prompt
Show prompt
🤖 Opened by warren run
run_49a8a4ktw0rn