Tests/docs: promote Soul's two it.fails, update the tripwire and fixtures

Both caller-identity-soul.test.ts holes are now closed and promoted
from it.fails to a plain it (both green): the caller-chosen
completionCode is never redeemable, and an arbitrary returnTo origin
is refused. The AppCaller-literal tripwire's expected forger list moves
from ["private-command-plane.ts"] to [] now that the private plane
constructs its caller through callerFromOpenedEnvelope instead of the
literal; the "refuses to mint on refresh" test's wrongApp caller is
built the same way, since a raw { appSlug } literal no longer
satisfies the now-branded AppCaller type.

access-plugin.test.ts's ghostlight completion-code assertion is
updated: `completion.code` is minted independently of the attempt
handle now, so the test documents that the code differs from the
handle instead of asserting they match.

app-registry.test.ts drops validateAppRegistration coverage (deleted)
and seeds registered-app fixtures through InMemoryStore.seedRegisteredApp
instead of the deleted store.registerApp.

docs/service-contract.md documents the new 400 return_to_not_allowed
failure mode. state/evidence.jsonl records this pass's decisions.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-08 14:23:04 +02:00
commit 827cdee761
5 changed files with 75 additions and 144 deletions

View file

@ -129,7 +129,14 @@ describe("Heimdall Eve access plugin", () => {
url: `/v1/oauth/discord/callback?code=test-code&state=${encodeURIComponent(state ?? "")}`,
});
expect(callback.statusCode, callback.body).toBe(201);
expect(callback.json().completion.code).toBe(handle);
// The completion code is always minted by the store now, never the
// attempt handle the caller supplied (that coupling was the
// caller-identity hole: a client-chosen attemptId used to become the
// redemption code verbatim). heimdall.auth.complete below redeems by
// handle through the store's own attempt-correlated lookup, not by
// knowing this code.
expect(callback.json().completion.code).toEqual(expect.any(String));
expect(callback.json().completion.code).not.toBe(handle);
const completeEnvelope = sealPrivateEnvelope({
appSlug: "ghostlight",