perlsky is a Perl 5 implementation of an AT Protocol Personal Data Server.
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

Prefer external atproto-smoke checkout for browser smoke

alice 81bcb641 a0d8893a

+34 -5
+1 -1
README.md
··· 59 59 - Fresh-account creation is still available through the explicit `bootstrap-*` commands, but it is no longer the normal path for repeated browser smoke runs. 60 60 - Detailed browser-smoke workflow, current interaction coverage, and the env-gated `prove` wrapper live in `docs/BROWSER_SMOKE.md`. 61 61 - Extraction work toward a cross-PDS standalone package now lives in `atproto-smoke/`, which owns the browser runtime, package CLI, example configs, and bring-your-own-account plus `perlsky` adapter helpers. 62 - - For now, `script/perlsky-browser-smoke` remains the active `perlsky` adapter entrypoint in this repo, forwarding into the generic package while the external package boundary stabilizes. 62 + - `script/perlsky-browser-smoke` now prefers an external sibling checkout at `../atproto-smoke` when present, and falls back to the in-repo `atproto-smoke/` copy. Set `PERLSKY_BROWSER_SUITE_ROOT` to point it at any other checkout explicitly. 63 63 64 64 Moderation and labels: 65 65
+4
docs/BROWSER_SMOKE.md
··· 98 98 This keeps the current `perlsky` workflow stable while making extraction to a 99 99 repo-independent package much more straightforward. 100 100 101 + The wrapper now prefers an external sibling checkout at `../atproto-smoke` 102 + when present, and otherwise falls back to the in-repo `atproto-smoke/` copy. 103 + Set `PERLSKY_BROWSER_SUITE_ROOT` to force a specific checkout. 104 + 101 105 ## Notes 102 106 103 107 - The reusable dual-account path is intentionally conservative about account creation. Fresh actors are only created through explicit `bootstrap-*` commands.
+29 -4
script/perlsky-browser-smoke
··· 12 12 use POSIX qw(strftime); 13 13 14 14 my $root = abs_path(File::Spec->catdir($Bin, '..')); 15 - my $tools_dir = File::Spec->catdir($root, 'tools', 'browser-automation'); 15 + my $embedded_suite_dir = File::Spec->catdir($root, 'atproto-smoke'); 16 + my $adjacent_suite_dir = File::Spec->catdir($root, '..', 'atproto-smoke'); 17 + my $suite_dir = _resolve_suite_dir( 18 + $ENV{PERLSKY_BROWSER_SUITE_ROOT}, 19 + $adjacent_suite_dir, 20 + $embedded_suite_dir, 21 + ); 16 22 my $cache_dir = File::Spec->catdir($root, '.cache', 'ms-playwright'); 17 23 my $default_pair_file = File::Spec->catfile($root, '.cache', 'browser-smoke', 'reusable-pair.json'); 18 24 my $default_artifacts = File::Spec->catdir($root, 'data', 'browser-smoke', 'latest'); ··· 110 116 --strict-errors 111 117 112 118 Environment: 119 + PERLSKY_BROWSER_SUITE_ROOT 113 120 PERLSKY_BROWSER_HANDLE 114 121 PERLSKY_BROWSER_PASSWORD 115 122 PERLSKY_BROWSER_SECONDARY_HANDLE ··· 347 354 close $cfg; 348 355 349 356 local $ENV{PLAYWRIGHT_BROWSERS_PATH} = $cache_dir; 350 - my $script = File::Spec->catfile($tools_dir, $cmd eq 'run-dual' ? 'dual-smoke.mjs' : 'smoke.mjs'); 357 + my $script = File::Spec->catfile( 358 + $suite_dir, 359 + 'src', 360 + 'browser', 361 + $cmd eq 'run-dual' ? 'run-dual.mjs' : 'run-single.mjs', 362 + ); 351 363 my @cmdline = ('node', $script, $config_path); 352 364 system(@cmdline) == 0 or die "browser smoke failed\n"; 353 365 354 366 sub install_runtime { 355 367 make_path($cache_dir); 356 - run_or_die('npm', 'install', '--prefix', $tools_dir); 368 + run_or_die('npm', 'install', '--prefix', $suite_dir); 357 369 local $ENV{PLAYWRIGHT_BROWSERS_PATH} = $cache_dir; 358 - run_or_die('npm', 'exec', '--prefix', $tools_dir, 'playwright', '--', 'install', 'chromium'); 370 + run_or_die('npm', 'exec', '--prefix', $suite_dir, 'playwright', '--', 'install', 'chromium'); 359 371 } 360 372 361 373 sub run_or_die { ··· 454 466 return 0 unless defined $value; 455 467 return 0 if $value =~ /\A(?:0|false|no|off)\z/i; 456 468 return 1; 469 + } 470 + 471 + sub _resolve_suite_dir { 472 + my (@candidates) = @_; 473 + for my $candidate (@candidates) { 474 + next unless defined $candidate && length $candidate; 475 + next unless -d $candidate; 476 + my $package_json = File::Spec->catfile($candidate, 'package.json'); 477 + my $browser_dir = File::Spec->catdir($candidate, 'src', 'browser'); 478 + next unless -f $package_json && -d $browser_dir; 479 + return abs_path($candidate); 480 + } 481 + die "unable to locate atproto-smoke suite checkout; set PERLSKY_BROWSER_SUITE_ROOT\n"; 457 482 } 458 483 459 484 sub _bootstrap_account {