Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Effect/VerifiedPrincipal.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
final readonly class VerifiedPrincipal
{
/**
* @param string $principal who, with its origin in front: `cli:rod@laptop`, `key:ABCD…`
* @param string $principal who, with its origin in front: `cli:operator@example.com`, `key:ABCD…`
* @param bool $verified whether a proof actually backs this — never asserted alone
* @param string|null $channel the surface it arrived through
* @param list<string> $scopes what is verifiable, not what was asked for
Expand Down
6 changes: 3 additions & 3 deletions tests/Effect/VerifiedFactsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ public function testAnAdmittedPrincipalYieldsVerifiedFacts(): void
/** 2 · a terminal's os-user is a fact, but an unverified one — the useful, honest default. */
public function testATerminalPrincipalIsUnverified(): void
{
$principal = VerifiedPrincipal::fromTerminal('rod', 'laptop');
$principal = VerifiedPrincipal::fromTerminal('operator', 'example.com');

self::assertFalse($principal->toFacts()->verified);
self::assertSame('cli:rod@laptop', $principal->principal);
self::assertSame('cli:operator@example.com', $principal->principal);
}

/**
Expand Down Expand Up @@ -100,7 +100,7 @@ public function testAPayloadWithoutAPrincipalIsRefused(): void
/** 6 · the terminal path can never be talked up: fromTerminal is verified:false by construction. */
public function testTheTerminalPathHasNoProofToCarry(): void
{
$arr = VerifiedPrincipal::fromTerminal('rod', 'laptop')->toArray();
$arr = VerifiedPrincipal::fromTerminal('operator', 'example.com')->toArray();

self::assertArrayNotHasKey('method', array_filter($arr, static fn ($v) => $v !== null));
self::assertFalse(VerifiedPrincipal::fromArray($arr)->toFacts()->verified);
Expand Down
4 changes: 2 additions & 2 deletions tests/InvocationContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ final class InvocationContextTest extends TestCase
*/
public function testATerminalBringsAnExecutorAndNoActor(): void
{
$ctx = InvocationContext::cli('rod@laptop', 'req-1');
$ctx = InvocationContext::cli('operator@example.com', 'req-1');

self::assertNull($ctx->actor);
self::assertFalse($ctx->verified);
self::assertSame('cli', $ctx->channel);
self::assertSame('rod@laptop', $ctx->executor);
self::assertSame('operator@example.com', $ctx->executor);
self::assertSame('req-1', $ctx->correlationId);
self::assertFalse($ctx->isAttributable(), 'y por eso no puede firmar nada que exija atribución');
}
Expand Down
Loading