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
5 changes: 2 additions & 3 deletions scripts/homeboy-dmc-provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -657,12 +657,11 @@ static function ( array $matches ): string {
}
$task_url = $canonical_task_url((string) ( $payload['task_url'] ?? '' ));
if (
( '' === $task_url && ! str_starts_with($value, '/') )
|| ! is_string($payload['handle'] ?? null) || '' === $payload['handle']
! is_string($payload['handle'] ?? null) || '' === $payload['handle']
|| ! is_string($payload['path'] ?? null) || '' === $payload['path']
|| ! is_string($payload['branch'] ?? null) || '' === $payload['branch']
) {
fwrite(STDERR, "DMC standalone identity does not provide tracker ownership.\n");
fwrite(STDERR, "DMC standalone identity returned an incomplete exact identity.\n");
exit(1);
}
$result = array(
Expand Down
13 changes: 8 additions & 5 deletions tests/homeboy-dmc-provider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,15 @@ canonical = run("canonical_task")
if canonical.returncode or json.loads(canonical.stdout) != expected:
raise SystemExit(f"FAIL: exact resolution did not canonicalize persisted task identity: {canonical!r}")
missing = run("missing_task")
if missing.returncode == 0 or "does not provide tracker ownership" not in missing.stderr:
raise SystemExit(f"FAIL: missing standalone tracker evidence must fail closed: {missing!r}")
missing_expected = [{**expected[0], "task_url": None}]
if missing.returncode or json.loads(missing.stdout) != missing_expected:
raise SystemExit(f"FAIL: lifecycle-owned handle resolution did not project a null tracker: {missing!r}")
missing_path = run("missing_task", "resolve_path")
missing_path_expected = [{**expected[0], "task_url": None}]
if missing_path.returncode or json.loads(missing_path.stdout) != missing_path_expected:
if missing_path.returncode or json.loads(missing_path.stdout) != missing_expected:
raise SystemExit(f"FAIL: exact path resolution did not preserve an untracked worktree for negotiated attachment: {missing_path!r}")
malformed = run("malformed")
if malformed.returncode == 0 or "incomplete exact identity" not in malformed.stderr:
raise SystemExit(f"FAIL: malformed standalone identity must fail closed: {malformed!r}")
PY
}

Expand Down Expand Up @@ -562,7 +565,7 @@ if ('identity' === $operation) {
'token' => 'fixture-token',
'handle' => $value,
'path' => getenv('DMC_STATE'),
'branch' => 'fix/310-dmc-cook',
'branch' => 'malformed' === $mode ? '' : 'fix/310-dmc-cook',
'primary' => false,
'task_url' => $task_url,
'latency_ms' => 1,
Expand Down
Loading