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.

Rename project branding from perlds to perlsky

alice c262bd84 21d93571

+204 -204
+1 -1
Makefile.PL
··· 8 8 VERSION_FROM => 'lib/ATProto/PDS.pm', 9 9 ABSTRACT => 'Perl 5 implementation of an AT Protocol PDS', 10 10 AUTHOR => 'aliceisjustplaying', 11 - EXE_FILES => ['script/perlds'], 11 + EXE_FILES => ['script/perlsky'], 12 12 PREREQ_PM => { 13 13 'CBOR::XS' => '1.87', 14 14 'Crypt::PK::Ed25519' => '0',
+9 -9
README.md
··· 1 - # perlds 1 + # perlsky 2 2 3 - `perlds` is a Perl 5 implementation of an AT Protocol Personal Data Server. 3 + `perlsky` is a Perl 5 implementation of an AT Protocol Personal Data Server. 4 4 5 5 Current direction: 6 6 ··· 13 13 14 14 Reference differential validation: 15 15 16 - - Run `script/differential-validate` to compare `perlds` against the official published `@atproto/pds` on a focused set of account, repo, moderation, sync, firehose, and `importRepo` snapshot-restore behaviors. 16 + - Run `script/differential-validate` to compare `perlsky` against the official published `@atproto/pds` on a focused set of account, repo, moderation, sync, firehose, and `importRepo` snapshot-restore behaviors. 17 17 - The differential harness also configures a local relay/crawler mock for both servers and verifies that both emit `com.atproto.sync.requestCrawl` notices with the expected hostname after repo activity, based on the upstream crawler wiring in `packages/pds/src/crawlers.ts`, `context.ts`, and `sequencer.ts`. 18 - - Run `PERLDS_DIFF_ACCOUNT_DID_METHOD=did:plc script/differential-validate` to exercise the same harness in PLC-account mode, including recommended DID credentials, PLC signature requests, PLC handle updates, token-gated PLC signing behavior, and moderation checks after PLC handle changes. 18 + - Run `PERLSKY_DIFF_ACCOUNT_DID_METHOD=did:plc script/differential-validate` to exercise the same harness in PLC-account mode, including recommended DID credentials, PLC signature requests, PLC handle updates, token-gated PLC signing behavior, and moderation checks after PLC handle changes. 19 19 - The helper installs the reference runtime into `.tools/reference-runtime` with Node 20 via `fnm`. 20 - - Run `PERLDS_RUN_REFERENCE_DIFF=1 prove -lv t/reference-differential.t` to exercise the same harness from the test suite. 21 - - Run `PERLDS_RUN_REFERENCE_DIFF=1 prove -lv t/reference-differential-plc.t` to run the PLC-specific reference comparison from the test suite. 20 + - Run `PERLSKY_RUN_REFERENCE_DIFF=1 prove -lv t/reference-differential.t` to exercise the same harness from the test suite. 21 + - Run `PERLSKY_RUN_REFERENCE_DIFF=1 prove -lv t/reference-differential-plc.t` to run the PLC-specific reference comparison from the test suite. 22 22 23 23 Metrics and observability: 24 24 25 - - `perlds` now exposes Prometheus-compatible metrics at `/metrics`. 25 + - `perlsky` now exposes Prometheus-compatible metrics at `/metrics`. 26 26 - Set `metrics_token` to require `Authorization: Bearer <token>` for scrapes. 27 27 - The main runtime signals cover XRPC request counts/latency, websocket subscriptions and emitted frames, crawler notifications, blob ingress/egress bytes, and key store operation timings. 28 28 - Detailed operator documentation lives in `docs/METRICS.md`. ··· 31 31 32 32 - Configure `hostname` to the public host name you want relays to crawl, for example `pds.example.com`. This should be the host, not the full URL. 33 33 - Configure `crawlers` as a list of relay or crawler service origins, for example `["https://bsky.network"]`. 34 - - `perlds` will POST `com.atproto.sync.requestCrawl` to each configured crawler after local repo/account/identity activity, while throttling repeat notices with `crawler_notify_interval` (default `1200` seconds). 34 + - `perlsky` will POST `com.atproto.sync.requestCrawl` to each configured crawler after local repo/account/identity activity, while throttling repeat notices with `crawler_notify_interval` (default `1200` seconds). 35 35 - Local regression coverage for this path lives in `t/crawlers.t`. 36 36 37 37 Moderation and labels: ··· 46 46 Interop fixtures: 47 47 48 48 - `t/crypto-interop.t` loads the official Bluesky `tools/reference/atproto/interop-test-files/crypto/w3c_didkey_K256.json` vectors so secp256k1 `did:key` encoding stays pinned to the same public fixtures as the upstream stack. 49 - - `t/plc-identity.t` drives `perlds` against the local PLC mock built on the official `@did-plc/lib`, covering account creation, recommended DID credentials, PLC handle updates, token-gated PLC signing, and validated PLC submission semantics. 49 + - `t/plc-identity.t` drives `perlsky` against the local PLC mock built on the official `@did-plc/lib`, covering account creation, recommended DID credentials, PLC handle updates, token-gated PLC signing, and validated PLC submission semantics.
+20 -20
docs/METRICS.md
··· 1 1 # Metrics 2 2 3 - `perlds` now exposes Prometheus-style metrics at `/metrics`. 3 + `perlsky` now exposes Prometheus-style metrics at `/metrics`. 4 4 5 5 ## Security 6 6 ··· 10 10 11 11 ## Main Metrics 12 12 13 - - `perlds_xrpc_requests_total` 13 + - `perlsky_xrpc_requests_total` 14 14 Counts HTTP XRPC requests by method, NSID, endpoint type, and status. 15 - - `perlds_xrpc_request_duration_seconds` 15 + - `perlsky_xrpc_request_duration_seconds` 16 16 Histogram for HTTP XRPC latency with the same labels. 17 - - `perlds_subscription_connections_total` 17 + - `perlsky_subscription_connections_total` 18 18 Counts websocket subscription opens by NSID. 19 - - `perlds_subscription_active` 19 + - `perlsky_subscription_active` 20 20 Gauge of active websocket subscriptions by NSID. 21 - - `perlds_subscription_closes_total` 21 + - `perlsky_subscription_closes_total` 22 22 Counts websocket closes by NSID and close code. 23 - - `perlds_subscription_frames_total` 23 + - `perlsky_subscription_frames_total` 24 24 Counts emitted websocket frames by NSID, frame type, and encoding. 25 - - `perlds_subscription_bytes_total` 25 + - `perlsky_subscription_bytes_total` 26 26 Counts emitted websocket bytes by NSID and encoding. 27 - - `perlds_subscription_duration_seconds` 27 + - `perlsky_subscription_duration_seconds` 28 28 Histogram of websocket lifetime by NSID. 29 - - `perlds_crawler_requests_total` 29 + - `perlsky_crawler_requests_total` 30 30 Counts outbound `com.atproto.sync.requestCrawl` calls by crawler service and result. 31 - - `perlds_crawler_request_duration_seconds` 31 + - `perlsky_crawler_request_duration_seconds` 32 32 Histogram of outbound crawler request latency. 33 - - `perlds_blob_ingress_bytes_total` 33 + - `perlsky_blob_ingress_bytes_total` 34 34 Counts uploaded blob bytes by MIME type. 35 - - `perlds_blob_egress_bytes_total` 35 + - `perlsky_blob_egress_bytes_total` 36 36 Counts downloaded blob bytes by MIME type. 37 - - `perlds_store_operations_total` 37 + - `perlsky_store_operations_total` 38 38 Counts instrumented SQLite-backed store operations by operation and status. 39 - - `perlds_store_operation_duration_seconds` 39 + - `perlsky_store_operation_duration_seconds` 40 40 Histogram of instrumented store operation duration. 41 - - `perlds_build_info` 41 + - `perlsky_build_info` 42 42 Static build/service info gauge. 43 43 44 44 ## Current Store Coverage ··· 57 57 58 58 ## Suggested Alerts 59 59 60 - - high error rate on `perlds_xrpc_requests_total` 61 - - sustained increase in `perlds_xrpc_request_duration_seconds` 62 - - non-zero `perlds_subscription_active` with no corresponding frame growth 63 - - crawler errors from `perlds_crawler_requests_total{result="error"}` 60 + - high error rate on `perlsky_xrpc_requests_total` 61 + - sustained increase in `perlsky_xrpc_request_duration_seconds` 62 + - non-zero `perlsky_subscription_active` with no corresponding frame growth 63 + - crawler errors from `perlsky_crawler_requests_total{result="error"}` 64 64 - large ingress with low egress or vice versa on blob byte counters 65 65 - persistent growth in store latency histograms 66 66
+1 -1
etc/perlds.example.json etc/perlsky.example.json
··· 11 11 "crawlers": [], 12 12 "crawler_notify_interval": 1200, 13 13 "data_dir": "data/runtime", 14 - "db_path": "data/runtime/perlds.sqlite" 14 + "db_path": "data/runtime/perlsky.sqlite" 15 15 }
+9 -9
lib/ATProto/PDS.pm
··· 31 31 my $root = $self->project_root; 32 32 my $public_url = Mojo::URL->new($config->{base_url} // 'http://127.0.0.1:7755'); 33 33 my $metrics = ATProto::PDS::Metrics->new( 34 - service => $config->{service_name} // 'perlds', 34 + service => $config->{service_name} // 'perlsky', 35 35 ); 36 36 my $crawler_notifier = ATProto::PDS::Crawlers->new( 37 37 hostname => ($config->{hostname} // lc($public_url->host // 'localhost')), ··· 40 40 metrics => $metrics, 41 41 ); 42 42 43 - $self->secrets([$config->{jwt_secret} // 'perlds-dev-secret']); 43 + $self->secrets([$config->{jwt_secret} // 'perlsky-dev-secret']); 44 44 $self->helper(metrics => sub { $metrics }); 45 45 $self->helper(api_registry => sub { state $registry = ATProto::PDS::API::Registry->new }); 46 46 $self->helper(endpoint_catalog => sub ($c) { endpoint_catalog($root) }); ··· 48 48 $self->helper(lexicons => sub ($c) { state $registry = ATProto::PDS::LexiconRegistry->new(root => $root) }); 49 49 $self->helper(store => sub ($c) { 50 50 state $store = ATProto::PDS::Store::SQLite->new( 51 - path => $c->app->settings->{db_path} || File::Spec->catfile($root, 'data', 'runtime', 'perlds.sqlite'), 51 + path => $c->app->settings->{db_path} || File::Spec->catfile($root, 'data', 'runtime', 'perlsky.sqlite'), 52 52 metrics => $metrics, 53 53 )->bootstrap; 54 54 }); ··· 71 71 ? length($args{binary} // q()) 72 72 : length(Mojo::JSON::encode_json($args{json} // {})); 73 73 74 - $c->app->metrics->increment_counter('perlds_subscription_frames_total', 1, { 74 + $c->app->metrics->increment_counter('perlsky_subscription_frames_total', 1, { 75 75 nsid => $nsid, 76 76 frame_type => $frame_type, 77 77 encoding => $encoding, 78 78 }); 79 - $c->app->metrics->increment_counter('perlds_subscription_bytes_total', $payload_size, { 79 + $c->app->metrics->increment_counter('perlsky_subscription_bytes_total', $payload_size, { 80 80 nsid => $nsid, 81 81 encoding => $encoding, 82 82 }); ··· 86 86 : $c->send({ json => $args{json} }); 87 87 }); 88 88 $self->helper(observe_blob_ingress => sub ($c, $mime_type, $bytes) { 89 - $c->app->metrics->increment_counter('perlds_blob_ingress_bytes_total', $bytes, { 89 + $c->app->metrics->increment_counter('perlsky_blob_ingress_bytes_total', $bytes, { 90 90 mime_type => $mime_type || 'application/octet-stream', 91 91 }); 92 92 }); 93 93 $self->helper(observe_blob_egress => sub ($c, $mime_type, $bytes) { 94 - $c->app->metrics->increment_counter('perlds_blob_egress_bytes_total', $bytes, { 94 + $c->app->metrics->increment_counter('perlsky_blob_egress_bytes_total', $bytes, { 95 95 mime_type => $mime_type || 'application/octet-stream', 96 96 }); 97 97 }); ··· 105 105 my $routes = $self->routes; 106 106 $routes->get('/')->to(cb => sub ($c) { 107 107 $c->render(json => { 108 - service => 'perlds', 108 + service => 'perlsky', 109 109 status => 'booting', 110 110 did => service_did($c->app->settings), 111 111 endpoints => scalar @{ $c->endpoint_catalog }, ··· 115 115 $routes->get('/_health')->to(cb => sub ($c) { 116 116 $c->render(json => { 117 117 ok => Mojo::JSON->true, 118 - service => 'perlds', 118 + service => 'perlsky', 119 119 endpoints => scalar @{ endpoint_catalog($root) }, 120 120 }); 121 121 });
+8 -8
lib/ATProto/PDS/API/Server.pm
··· 261 261 $c->store->log_outbound_email( 262 262 recipient_did => $account->{did}, 263 263 recipient_email => $account->{email}, 264 - subject => 'perlds password reset', 264 + subject => 'perlsky password reset', 265 265 content => "Use token $token->{token} to reset your password.", 266 266 ); 267 267 } ··· 304 304 $c->store->log_outbound_email( 305 305 recipient_did => $account->{did}, 306 306 recipient_email => $account->{email}, 307 - subject => 'perlds email confirmation', 307 + subject => 'perlsky email confirmation', 308 308 content => "Use token $token->{token} to confirm your email address.", 309 309 ); 310 310 return {}; ··· 338 338 $c->store->log_outbound_email( 339 339 recipient_did => $account->{did}, 340 340 recipient_email => $account->{email}, 341 - subject => 'perlds email change authorization', 341 + subject => 'perlsky email change authorization', 342 342 content => "Use token $token->{token} to update your email address.", 343 343 ); 344 344 } ··· 380 380 $c->store->log_outbound_email( 381 381 recipient_did => $account->{did}, 382 382 recipient_email => $account->{email}, 383 - subject => 'perlds account deletion', 383 + subject => 'perlsky account deletion', 384 384 content => "Use token $token->{token} to delete your account.", 385 385 ) if $account->{email}; 386 386 return {}; ··· 435 435 exp => $exp, 436 436 typ => 'service', 437 437 ($c->param('lxm') ? (lxm => $c->param('lxm')) : ()), 438 - }, $c->config_value('jwt_secret', 'perlds-dev-secret')); 438 + }, $c->config_value('jwt_secret', 'perlsky-dev-secret')); 439 439 return { token => $token }; 440 440 }); 441 441 ··· 526 526 unless $auth =~ /\ABearer\s+(.+)\z/i; 527 527 my $token = $1; 528 528 529 - my $decoded = eval { decode_jwt($token, $c->config_value('jwt_secret', 'perlds-dev-secret')) }; 529 + my $decoded = eval { decode_jwt($token, $c->config_value('jwt_secret', 'perlsky-dev-secret')) }; 530 530 if (my $err = $@) { 531 531 my $message = "$err"; 532 532 my $code = $message =~ /expired/i ? 'ExpiredToken' : 'InvalidToken'; ··· 552 552 ); 553 553 554 554 my $issuer = service_did($c->app->settings); 555 - my $secret = $c->config_value('jwt_secret', 'perlds-dev-secret'); 555 + my $secret = $c->config_value('jwt_secret', 'perlsky-dev-secret'); 556 556 my $now = time; 557 557 558 558 my $access = encode_jwt({ ··· 598 598 } 599 599 600 600 sub _new_invite_code { 601 - return 'perlds-' . substr(random_hex(8), 0, 12); 601 + return 'perlsky-' . substr(random_hex(8), 0, 12); 602 602 } 603 603 604 604 1;
+2 -2
lib/ATProto/PDS/Crawlers.pm
··· 76 76 for my $result (@{ $results || [] }) { 77 77 if ($self->{metrics}) { 78 78 my $result_label = $result->{ok} ? 'ok' : 'error'; 79 - $self->{metrics}->increment_counter('perlds_crawler_requests_total', 1, { 79 + $self->{metrics}->increment_counter('perlsky_crawler_requests_total', 1, { 80 80 service => $result->{service}, 81 81 result => $result_label, 82 82 }); 83 83 $self->{metrics}->observe_histogram( 84 - 'perlds_crawler_request_duration_seconds', 84 + 'perlsky_crawler_request_duration_seconds', 85 85 $result->{duration_seconds} // 0, 86 86 { 87 87 service => $result->{service},
+17 -17
lib/ATProto/PDS/Metrics.pm
··· 9 9 10 10 sub new ($class, %args) { 11 11 my $self = bless { 12 - service => $args{service} // 'perlds', 12 + service => $args{service} // 'perlsky', 13 13 metrics => {}, 14 14 }, $class; 15 15 16 16 $self->_register_counter( 17 - 'perlds_xrpc_requests_total', 17 + 'perlsky_xrpc_requests_total', 18 18 'Total XRPC HTTP requests by method, endpoint, type, and status.', 19 19 [qw(method nsid endpoint_type status)], 20 20 ); 21 21 $self->_register_histogram( 22 - 'perlds_xrpc_request_duration_seconds', 22 + 'perlsky_xrpc_request_duration_seconds', 23 23 'XRPC HTTP request duration in seconds.', 24 24 [qw(method nsid endpoint_type status)], 25 25 [0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10], 26 26 ); 27 27 $self->_register_counter( 28 - 'perlds_subscription_connections_total', 28 + 'perlsky_subscription_connections_total', 29 29 'Total websocket subscription connections opened.', 30 30 [qw(nsid)], 31 31 ); 32 32 $self->_register_counter( 33 - 'perlds_subscription_closes_total', 33 + 'perlsky_subscription_closes_total', 34 34 'Total websocket subscription closes by endpoint and close code.', 35 35 [qw(nsid code)], 36 36 ); 37 37 $self->_register_gauge( 38 - 'perlds_subscription_active', 38 + 'perlsky_subscription_active', 39 39 'Active websocket subscription connections.', 40 40 [qw(nsid)], 41 41 ); 42 42 $self->_register_counter( 43 - 'perlds_subscription_frames_total', 43 + 'perlsky_subscription_frames_total', 44 44 'Total websocket frames emitted by endpoint, frame type, and encoding.', 45 45 [qw(nsid frame_type encoding)], 46 46 ); 47 47 $self->_register_counter( 48 - 'perlds_subscription_bytes_total', 48 + 'perlsky_subscription_bytes_total', 49 49 'Total websocket frame bytes emitted by endpoint and encoding.', 50 50 [qw(nsid encoding)], 51 51 ); 52 52 $self->_register_histogram( 53 - 'perlds_subscription_duration_seconds', 53 + 'perlsky_subscription_duration_seconds', 54 54 'Subscription connection lifetime in seconds.', 55 55 [qw(nsid)], 56 56 [0.1, 0.5, 1, 5, 15, 30, 60, 300, 900, 3600], 57 57 ); 58 58 $self->_register_counter( 59 - 'perlds_crawler_requests_total', 59 + 'perlsky_crawler_requests_total', 60 60 'Total outbound requestCrawl notifications by crawler service and result.', 61 61 [qw(service result)], 62 62 ); 63 63 $self->_register_histogram( 64 - 'perlds_crawler_request_duration_seconds', 64 + 'perlsky_crawler_request_duration_seconds', 65 65 'Outbound requestCrawl latency in seconds.', 66 66 [qw(service result)], 67 67 [0.01, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10], 68 68 ); 69 69 $self->_register_counter( 70 - 'perlds_blob_ingress_bytes_total', 70 + 'perlsky_blob_ingress_bytes_total', 71 71 'Total bytes accepted through repo blob uploads.', 72 72 [qw(mime_type)], 73 73 ); 74 74 $self->_register_counter( 75 - 'perlds_blob_egress_bytes_total', 75 + 'perlsky_blob_egress_bytes_total', 76 76 'Total bytes served through sync blob downloads.', 77 77 [qw(mime_type)], 78 78 ); 79 79 $self->_register_counter( 80 - 'perlds_store_operations_total', 80 + 'perlsky_store_operations_total', 81 81 'Total instrumented store operations by operation and status.', 82 82 [qw(operation status)], 83 83 ); 84 84 $self->_register_histogram( 85 - 'perlds_store_operation_duration_seconds', 85 + 'perlsky_store_operation_duration_seconds', 86 86 'Duration of instrumented store operations.', 87 87 [qw(operation status)], 88 88 [0.0005, 0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1], 89 89 ); 90 90 $self->_register_gauge( 91 - 'perlds_build_info', 91 + 'perlsky_build_info', 92 92 'Static build information for the running service.', 93 93 [qw(service)], 94 94 ); 95 - $self->set_gauge('perlds_build_info', 1, { service => $self->{service} }); 95 + $self->set_gauge('perlsky_build_info', 1, { service => $self->{service} }); 96 96 97 97 return $self; 98 98 }
+2 -2
lib/ATProto/PDS/Metrics/Store.pm
··· 38 38 operation => $operation, 39 39 status => $status, 40 40 }; 41 - $metrics->increment_counter('perlds_store_operations_total', 1, $labels); 42 - $metrics->observe_histogram('perlds_store_operation_duration_seconds', $duration, $labels); 41 + $metrics->increment_counter('perlsky_store_operations_total', 1, $labels); 42 + $metrics->observe_histogram('perlsky_store_operation_duration_seconds', $duration, $labels); 43 43 } 44 44 45 45 die $@ unless $ok;
+1 -1
lib/ATProto/PDS/Moderation.pm
··· 135 135 && $auth =~ /\ABearer\s+\Q@{[$c->config_value('admin_password')]}\E\z/; 136 136 return 0 unless $auth =~ /\ABearer\s+(.+)\z/i; 137 137 my $token = $1; 138 - my $decoded = eval { decode_jwt($token, $c->config_value('jwt_secret', 'perlds-dev-secret')) }; 138 + my $decoded = eval { decode_jwt($token, $c->config_value('jwt_secret', 'perlsky-dev-secret')) }; 139 139 return 0 unless $decoded && ref($decoded) eq 'HASH'; 140 140 my $claims = $decoded->{claims} || {}; 141 141 return (($claims->{sub} // q()) eq ($did // q())) ? 1 : 0;
+8 -8
lib/ATProto/PDS/XRPC/Dispatcher.pm
··· 20 20 return $c->finish(1008) unless $endpoint; 21 21 22 22 if ($endpoint->{type} ne 'subscription') { 23 - $c->app->metrics->increment_counter('perlds_subscription_closes_total', 1, { 23 + $c->app->metrics->increment_counter('perlsky_subscription_closes_total', 1, { 24 24 nsid => $endpoint->{id}, 25 25 code => 1008, 26 26 }); ··· 32 32 } 33 33 34 34 my $labels = { nsid => $endpoint->{id} }; 35 - $c->app->metrics->increment_counter('perlds_subscription_connections_total', 1, $labels); 36 - $c->app->metrics->add_gauge('perlds_subscription_active', 1, $labels); 35 + $c->app->metrics->increment_counter('perlsky_subscription_connections_total', 1, $labels); 36 + $c->app->metrics->add_gauge('perlsky_subscription_active', 1, $labels); 37 37 $c->on(finish => sub ($c, $code, $reason = undef) { 38 - $c->app->metrics->add_gauge('perlds_subscription_active', -1, $labels); 39 - $c->app->metrics->increment_counter('perlds_subscription_closes_total', 1, { 38 + $c->app->metrics->add_gauge('perlsky_subscription_active', -1, $labels); 39 + $c->app->metrics->increment_counter('perlsky_subscription_closes_total', 1, { 40 40 %{$labels}, 41 41 code => defined($code) ? $code : 0, 42 42 }); 43 43 $c->app->metrics->observe_histogram( 44 - 'perlds_subscription_duration_seconds', 44 + 'perlsky_subscription_duration_seconds', 45 45 time - $started, 46 46 $labels, 47 47 ); ··· 70 70 endpoint_type => $endpoint_type, 71 71 status => $status, 72 72 }; 73 - $c->app->metrics->increment_counter('perlds_xrpc_requests_total', 1, $labels); 73 + $c->app->metrics->increment_counter('perlsky_xrpc_requests_total', 1, $labels); 74 74 $c->app->metrics->observe_histogram( 75 - 'perlds_xrpc_request_duration_seconds', 75 + 'perlsky_xrpc_request_duration_seconds', 76 76 time - $started, 77 77 $labels, 78 78 );
+50 -50
script/differential-validate
··· 444 444 note('Preparing official reference runtime'); 445 445 setup_reference_runtime(); 446 446 447 - my $diff_account_did_method = $ENV{PERLDS_DIFF_ACCOUNT_DID_METHOD} // 'did:web'; 447 + my $diff_account_did_method = $ENV{PERLSKY_DIFF_ACCOUNT_DID_METHOD} // 'did:web'; 448 448 note("Differential mode: $diff_account_did_method"); 449 449 450 450 my $plc_port = free_port(); ··· 454 454 my $plc_ready = File::Spec->catfile($tmp, 'plc.ready.json'); 455 455 my $ref_ready = File::Spec->catfile($tmp, 'reference.ready.json'); 456 456 my $reference_crawler_ready = File::Spec->catfile($tmp, 'reference-crawler.ready.json'); 457 - my $perlds_crawler_ready = File::Spec->catfile($tmp, 'perlds-crawler.ready.json'); 457 + my $perlsky_crawler_ready = File::Spec->catfile($tmp, 'perlsky-crawler.ready.json'); 458 458 459 459 my $plc_log = File::Spec->catfile($tmp, 'plc.log'); 460 460 my $ref_log = File::Spec->catfile($tmp, 'reference.log'); 461 - my $perl_log = File::Spec->catfile($tmp, 'perlds.log'); 461 + my $perl_log = File::Spec->catfile($tmp, 'perlsky.log'); 462 462 my $reference_crawler_log = File::Spec->catfile($tmp, 'reference-crawler.log'); 463 - my $perlds_crawler_log = File::Spec->catfile($tmp, 'perlds-crawler.log'); 463 + my $perlsky_crawler_log = File::Spec->catfile($tmp, 'perlsky-crawler.log'); 464 464 465 465 my $plc = spawn_logged( 466 466 'plc-mock', 467 467 ['fnm', 'exec', '--using=20', '--', 'node', File::Spec->catfile($root, 'tools', 'differential', 'plc-mock.cjs')], 468 468 { 469 - PERLDS_READY_FILE => $plc_ready, 470 - PERLDS_PLC_PORT => $plc_port, 471 - PERLDS_PLC_HOST => '127.0.0.1', 469 + PERLSKY_READY_FILE => $plc_ready, 470 + PERLSKY_PLC_PORT => $plc_port, 471 + PERLSKY_PLC_HOST => '127.0.0.1', 472 472 }, 473 473 $plc_log, 474 474 ); ··· 477 477 pass("started local PLC mock at $plc_info->{origin}"); 478 478 479 479 my $reference_crawler_port = free_port(); 480 - my $perlds_crawler_port = free_port(); 480 + my $perlsky_crawler_port = free_port(); 481 481 482 482 my $reference_crawler = spawn_logged( 483 483 'reference-crawler', 484 484 ['fnm', 'exec', '--using=20', '--', 'node', File::Spec->catfile($root, 'tools', 'differential', 'crawler-mock.cjs')], 485 485 { 486 - PERLDS_READY_FILE => $reference_crawler_ready, 487 - PERLDS_CRAWLER_PORT => $reference_crawler_port, 488 - PERLDS_CRAWLER_HOST => '127.0.0.1', 486 + PERLSKY_READY_FILE => $reference_crawler_ready, 487 + PERLSKY_CRAWLER_PORT => $reference_crawler_port, 488 + PERLSKY_CRAWLER_HOST => '127.0.0.1', 489 489 }, 490 490 $reference_crawler_log, 491 491 ); 492 492 493 - my $perlds_crawler = spawn_logged( 494 - 'perlds-crawler', 493 + my $perlsky_crawler = spawn_logged( 494 + 'perlsky-crawler', 495 495 ['fnm', 'exec', '--using=20', '--', 'node', File::Spec->catfile($root, 'tools', 'differential', 'crawler-mock.cjs')], 496 496 { 497 - PERLDS_READY_FILE => $perlds_crawler_ready, 498 - PERLDS_CRAWLER_PORT => $perlds_crawler_port, 499 - PERLDS_CRAWLER_HOST => '127.0.0.1', 497 + PERLSKY_READY_FILE => $perlsky_crawler_ready, 498 + PERLSKY_CRAWLER_PORT => $perlsky_crawler_port, 499 + PERLSKY_CRAWLER_HOST => '127.0.0.1', 500 500 }, 501 - $perlds_crawler_log, 501 + $perlsky_crawler_log, 502 502 ); 503 503 504 504 my $reference_crawler_info = wait_for_ready_file('reference crawler', $reference_crawler_ready); 505 505 wait_for_http_ok('reference crawler', "$reference_crawler_info->{origin}/_health"); 506 506 pass("started reference crawler mock at $reference_crawler_info->{origin}"); 507 507 508 - my $perlds_crawler_info = wait_for_ready_file('perlds crawler', $perlds_crawler_ready); 509 - wait_for_http_ok('perlds crawler', "$perlds_crawler_info->{origin}/_health"); 510 - pass("started perlds crawler mock at $perlds_crawler_info->{origin}"); 508 + my $perlsky_crawler_info = wait_for_ready_file('perlsky crawler', $perlsky_crawler_ready); 509 + wait_for_http_ok('perlsky crawler', "$perlsky_crawler_info->{origin}/_health"); 510 + pass("started perlsky crawler mock at $perlsky_crawler_info->{origin}"); 511 511 512 512 my $reference_data = File::Spec->catdir($tmp, 'reference'); 513 513 make_path($reference_data); ··· 516 516 'reference-pds', 517 517 ['fnm', 'exec', '--using=20', '--', 'node', File::Spec->catfile($root, 'tools', 'differential', 'reference-pds-runner.cjs')], 518 518 { 519 - PERLDS_READY_FILE => $ref_ready, 519 + PERLSKY_READY_FILE => $ref_ready, 520 520 PDS_PORT => $reference_port, 521 521 PDS_HOSTNAME => 'localhost', 522 522 PDS_DEV_MODE => 1, ··· 538 538 wait_for_http_ok('reference pds', "$reference_info->{origin}/xrpc/_health"); 539 539 pass("started official reference PDS at $reference_info->{origin}"); 540 540 541 - my $perlds_config = File::Spec->catfile($tmp, 'perlds.json'); 542 - open my $cfg_fh, '>', $perlds_config or die "unable to write $perlds_config: $!"; 541 + my $perlsky_config = File::Spec->catfile($tmp, 'perlsky.json'); 542 + open my $cfg_fh, '>', $perlsky_config or die "unable to write $perlsky_config: $!"; 543 543 print {$cfg_fh} encode_json({ 544 544 base_url => "http://127.0.0.1:$perl_port", 545 545 hostname => 'localhost', ··· 552 552 plc_rotation_private_key_hex => ('11' x 32), 553 553 ) 554 554 : ()), 555 - jwt_secret => 'perlds-jwt-secret', 556 - admin_password => 'perlds-admin-secret', 557 - crawlers => [$perlds_crawler_info->{origin}], 558 - data_dir => File::Spec->catdir($tmp, 'perlds-data'), 559 - db_path => File::Spec->catfile($tmp, 'perlds.sqlite'), 555 + jwt_secret => 'perlsky-jwt-secret', 556 + admin_password => 'perlsky-admin-secret', 557 + crawlers => [$perlsky_crawler_info->{origin}], 558 + data_dir => File::Spec->catdir($tmp, 'perlsky-data'), 559 + db_path => File::Spec->catfile($tmp, 'perlsky.sqlite'), 560 560 }); 561 561 close $cfg_fh; 562 562 563 - my $perlds = spawn_logged( 564 - 'perlds', 565 - [$^X, File::Spec->catfile($root, 'script', 'perlds'), 'daemon', '-l', "http://127.0.0.1:$perl_port"], 563 + my $perlsky = spawn_logged( 564 + 'perlsky', 565 + [$^X, File::Spec->catfile($root, 'script', 'perlsky'), 'daemon', '-l', "http://127.0.0.1:$perl_port"], 566 566 { 567 - PERLDS_CONFIG => $perlds_config, 567 + PERLSKY_CONFIG => $perlsky_config, 568 568 }, 569 569 $perl_log, 570 570 ); 571 571 572 - wait_for_http_ok('perlds', "http://127.0.0.1:$perl_port/_health"); 573 - pass("started perlds at http://127.0.0.1:$perl_port"); 572 + wait_for_http_ok('perlsky', "http://127.0.0.1:$perl_port/_health"); 573 + pass("started perlsky at http://127.0.0.1:$perl_port"); 574 574 575 575 my %server = ( 576 576 reference => { ··· 580 580 admin_password => 'reference-admin-secret', 581 581 crawler_origin => $reference_crawler_info->{origin}, 582 582 }, 583 - perlds => { 583 + perlsky => { 584 584 origin => "http://127.0.0.1:$perl_port", 585 585 handle => 'alice.test', 586 586 email => 'alice-perl@test.com', 587 - admin_password => 'perlds-admin-secret', 588 - crawler_origin => $perlds_crawler_info->{origin}, 587 + admin_password => 'perlsky-admin-secret', 588 + crawler_origin => $perlsky_crawler_info->{origin}, 589 589 }, 590 590 ); 591 591 ··· 603 603 availableUserDomains => normalized_domains(get_json($server{reference}{origin}, 'com.atproto.server.describeServer')), 604 604 }, 605 605 { 606 - inviteCodeRequired => $server{perlds}{describe}{inviteCodeRequired} ? true : false, 607 - availableUserDomains => normalized_domains(get_json($server{perlds}{origin}, 'com.atproto.server.describeServer')), 606 + inviteCodeRequired => $server{perlsky}{describe}{inviteCodeRequired} ? true : false, 607 + availableUserDomains => normalized_domains(get_json($server{perlsky}{origin}, 'com.atproto.server.describeServer')), 608 608 }, 609 609 ), 610 610 'describeServer matches on invite requirement and user domains', ··· 655 655 } 656 656 657 657 check( 658 - same_hash($server{reference}{crawler_notice}, $server{perlds}{crawler_notice}), 658 + same_hash($server{reference}{crawler_notice}, $server{perlsky}{crawler_notice}), 659 659 'outbound crawler notifications match the official reference PDS semantics', 660 660 ); 661 661 ··· 689 689 } 690 690 691 691 check( 692 - same_hash($server{reference}{recommended_did}, $server{perlds}{recommended_did}), 692 + same_hash($server{reference}{recommended_did}, $server{perlsky}{recommended_did}), 693 693 'getRecommendedDidCredentials matches the official reference PDS semantics', 694 694 ); 695 695 ··· 739 739 } 740 740 741 741 check( 742 - same_hash($server{reference}{missing_plc_token_error}, $server{perlds}{missing_plc_token_error}), 742 + same_hash($server{reference}{missing_plc_token_error}, $server{perlsky}{missing_plc_token_error}), 743 743 'signPlcOperation matches the official reference PDS token requirement semantics', 744 744 ); 745 745 } ··· 889 889 } 890 890 891 891 check( 892 - same_hash($server{reference}{repo_takedown}, $server{perlds}{repo_takedown}), 892 + same_hash($server{reference}{repo_takedown}, $server{perlsky}{repo_takedown}), 893 893 'repo takedown login and write semantics match the official reference PDS', 894 894 ); 895 895 896 896 check( 897 - same_hash($server{reference}{record_takedown}, $server{perlds}{record_takedown}), 897 + same_hash($server{reference}{record_takedown}, $server{perlsky}{record_takedown}), 898 898 'record takedown visibility semantics match the official reference PDS', 899 899 ); 900 900 ··· 970 970 } 971 971 972 972 check( 973 - same_hash($server{reference}{import_repo_state}, $server{perlds}{import_repo_state}), 973 + same_hash($server{reference}{import_repo_state}, $server{perlsky}{import_repo_state}), 974 974 'importRepo restores the same normalized repo state as the official reference PDS', 975 975 ); 976 976 ··· 1003 1003 } 1004 1004 1005 1005 check( 1006 - same_hash($server{reference}{firehose_commit}, $server{perlds}{firehose_commit}), 1006 + same_hash($server{reference}{firehose_commit}, $server{perlsky}{firehose_commit}), 1007 1007 'subscribeRepos emits the same normalized commit semantics as the official reference PDS', 1008 1008 ); 1009 1009 ··· 1019 1019 } 1020 1020 1021 1021 check( 1022 - same_hash($server{reference}{future_cursor}, $server{perlds}{future_cursor}), 1022 + same_hash($server{reference}{future_cursor}, $server{perlsky}{future_cursor}), 1023 1023 'subscribeRepos agrees on future cursor errors', 1024 1024 ); 1025 1025 1026 1026 if ($failed) { 1027 1027 print "\nReference PDS log:\n"; 1028 1028 print slurp_file($ref_log); 1029 - print "\nperlds log:\n"; 1029 + print "\nperlsky log:\n"; 1030 1030 print slurp_file($perl_log); 1031 1031 print "\nPLC mock log:\n"; 1032 1032 print slurp_file($plc_log); 1033 1033 print "\nReference crawler log:\n"; 1034 1034 print slurp_file($reference_crawler_log); 1035 - print "\nperlds crawler log:\n"; 1036 - print slurp_file($perlds_crawler_log); 1035 + print "\nperlsky crawler log:\n"; 1036 + print slurp_file($perlsky_crawler_log); 1037 1037 die "\ndifferential validation failed with $failed mismatches\n"; 1038 1038 } 1039 1039
-32
script/perlds
··· 1 - #!/usr/bin/env perl 2 - use v5.34; 3 - use warnings; 4 - 5 - use Config (); 6 - use FindBin (); 7 - use File::Spec; 8 - 9 - BEGIN { 10 - require File::Spec; 11 - require lib; 12 - my $root = File::Spec->rel2abs(File::Spec->catdir($FindBin::RealBin, '..')); 13 - lib->import( 14 - File::Spec->catdir($root, 'lib'), 15 - File::Spec->catdir($root, 'local', 'lib', 'perl5'), 16 - File::Spec->catdir($root, 'local', 'lib', 'perl5', $Config::Config{archname}), 17 - ); 18 - } 19 - 20 - use ATProto::PDS; 21 - use ATProto::PDS::Config qw(load_config); 22 - 23 - my $root = File::Spec->rel2abs(File::Spec->catdir($FindBin::RealBin, '..')); 24 - my $config_path = $ENV{PERLDS_CONFIG} || File::Spec->catfile($root, 'etc', 'perlds.example.json'); 25 - my $config = load_config($config_path); 26 - 27 - my $app = ATProto::PDS->new( 28 - project_root => $root, 29 - settings => $config, 30 - ); 31 - 32 - $app->start(@ARGV);
+32
script/perlsky
··· 1 + #!/usr/bin/env perl 2 + use v5.34; 3 + use warnings; 4 + 5 + use Config (); 6 + use FindBin (); 7 + use File::Spec; 8 + 9 + BEGIN { 10 + require File::Spec; 11 + require lib; 12 + my $root = File::Spec->rel2abs(File::Spec->catdir($FindBin::RealBin, '..')); 13 + lib->import( 14 + File::Spec->catdir($root, 'lib'), 15 + File::Spec->catdir($root, 'local', 'lib', 'perl5'), 16 + File::Spec->catdir($root, 'local', 'lib', 'perl5', $Config::Config{archname}), 17 + ); 18 + } 19 + 20 + use ATProto::PDS; 21 + use ATProto::PDS::Config qw(load_config); 22 + 23 + my $root = File::Spec->rel2abs(File::Spec->catdir($FindBin::RealBin, '..')); 24 + my $config_path = $ENV{PERLSKY_CONFIG} || File::Spec->catfile($root, 'etc', 'perlsky.example.json'); 25 + my $config = load_config($config_path); 26 + 27 + my $app = ATProto::PDS->new( 28 + project_root => $root, 29 + settings => $config, 30 + ); 31 + 32 + $app->start(@ARGV);
+2 -2
t/app-routes.t
··· 21 21 use ATProto::PDS::Config qw(load_config); 22 22 23 23 my $root = File::Spec->rel2abs(File::Spec->catdir($Bin, '..')); 24 - my $config = load_config(File::Spec->catfile($root, 'etc', 'perlds.example.json')); 24 + my $config = load_config(File::Spec->catfile($root, 'etc', 'perlsky.example.json')); 25 25 my $t = Test::Mojo->new( 26 26 ATProto::PDS->new( 27 27 project_root => $root, ··· 31 31 32 32 $t->get_ok('/_health') 33 33 ->status_is(200) 34 - ->json_is('/service' => 'perlds') 34 + ->json_is('/service' => 'perlsky') 35 35 ->json_has('/ok'); 36 36 37 37 $t->get_ok('/xrpc/com.atproto.server.describeServer')
+1 -1
t/app.t
··· 20 20 use ATProto::PDS; 21 21 22 22 my $root = File::Spec->rel2abs(File::Spec->catdir($Bin, '..')); 23 - my $config = File::Spec->catfile($root, 'etc', 'perlds.example.json'); 23 + my $config = File::Spec->catfile($root, 'etc', 'perlsky.example.json'); 24 24 my $t = Test::Mojo->new(ATProto::PDS->new( 25 25 project_root => $root, 26 26 settings => {
+2 -2
t/auth-jwt.t
··· 21 21 my $token = encode_jwt( 22 22 { 23 23 sub => 'did:web:example.com:users:alice', 24 - aud => 'perlds', 24 + aud => 'perlsky', 25 25 exp => 1_900_000_000, 26 26 }, 27 27 'super-secret', 28 28 ); 29 29 30 - my $decoded = decode_jwt($token, 'super-secret', audience => 'perlds', now => 1_800_000_000); 30 + my $decoded = decode_jwt($token, 'super-secret', audience => 'perlsky', now => 1_800_000_000); 31 31 32 32 is($decoded->{claims}{sub}, 'did:web:example.com:users:alice', 'subject round-trips'); 33 33 is($decoded->{header}{alg}, 'HS256', 'algorithm preserved');
+3 -3
t/crawlers.t
··· 74 74 open STDOUT, '>', $log_file or die "open($log_file): $!"; 75 75 open STDERR, '>&', \*STDOUT or die "dup stdout failed"; 76 76 chdir $root or die "chdir($root): $!"; 77 - $ENV{PERLDS_READY_FILE} = $ready_file; 78 - $ENV{PERLDS_CRAWLER_PORT} = $port; 79 - $ENV{PERLDS_CRAWLER_HOST} = '127.0.0.1'; 77 + $ENV{PERLSKY_READY_FILE} = $ready_file; 78 + $ENV{PERLSKY_CRAWLER_PORT} = $port; 79 + $ENV{PERLSKY_CRAWLER_HOST} = '127.0.0.1'; 80 80 exec 'fnm', 'exec', '--using=20', '--', 'node', 81 81 File::Spec->catfile($root, 'tools', 'differential', 'crawler-mock.cjs'); 82 82 die "exec failed: $!";
+1 -1
t/extended-api.t
··· 34 34 jwt_secret => 'extended-secret', 35 35 admin_password => 'admin-secret', 36 36 data_dir => $tmp, 37 - db_path => File::Spec->catfile($tmp, 'perlds.sqlite'), 37 + db_path => File::Spec->catfile($tmp, 'perlsky.sqlite'), 38 38 }, 39 39 ); 40 40
+1 -1
t/external-surface.t
··· 34 34 jwt_secret => 'surface-secret', 35 35 admin_password => 'admin-secret', 36 36 data_dir => File::Spec->catdir($tmp, 'data'), 37 - db_path => File::Spec->catfile($tmp, 'perlds.sqlite'), 37 + db_path => File::Spec->catfile($tmp, 'perlsky.sqlite'), 38 38 }, 39 39 ); 40 40
+1 -1
t/firehose.t
··· 33 33 jwt_secret => 'firehose-secret', 34 34 admin_password => 'admin-secret', 35 35 data_dir => File::Spec->catdir($tmp, 'data'), 36 - db_path => File::Spec->catfile($tmp, 'perlds.sqlite'), 36 + db_path => File::Spec->catfile($tmp, 'perlsky.sqlite'), 37 37 }, 38 38 ); 39 39
+1 -1
t/import-repo.t
··· 33 33 jwt_secret => 'import-secret', 34 34 admin_password => 'admin-secret', 35 35 data_dir => File::Spec->catdir($tmp, 'data'), 36 - db_path => File::Spec->catfile($tmp, 'perlds.sqlite'), 36 + db_path => File::Spec->catfile($tmp, 'perlsky.sqlite'), 37 37 }, 38 38 ); 39 39
+1 -1
t/labels.t
··· 36 36 jwt_secret => 'labels-secret', 37 37 admin_password => 'admin-secret', 38 38 data_dir => File::Spec->catdir($tmp, 'data'), 39 - db_path => File::Spec->catfile($tmp, 'perlds.sqlite'), 39 + db_path => File::Spec->catfile($tmp, 'perlsky.sqlite'), 40 40 }, 41 41 ); 42 42
+7 -7
t/metrics.t
··· 68 68 69 69 like( 70 70 $metrics, 71 - qr/perlds_xrpc_requests_total\{endpoint_type="procedure",method="POST",nsid="com\.atproto\.server\.createAccount",status="200"\} 1\b/, 71 + qr/perlsky_xrpc_requests_total\{endpoint_type="procedure",method="POST",nsid="com\.atproto\.server\.createAccount",status="200"\} 1\b/, 72 72 'createAccount request counter is exported', 73 73 ); 74 74 like( 75 75 $metrics, 76 - qr/perlds_xrpc_request_duration_seconds_count\{endpoint_type="procedure",method="POST",nsid="com\.atproto\.server\.createAccount",status="200"\} 1\b/, 76 + qr/perlsky_xrpc_request_duration_seconds_count\{endpoint_type="procedure",method="POST",nsid="com\.atproto\.server\.createAccount",status="200"\} 1\b/, 77 77 'createAccount latency histogram is exported', 78 78 ); 79 79 like( 80 80 $metrics, 81 - qr/perlds_subscription_connections_total\{nsid="com\.atproto\.sync\.subscribeRepos"\} 1\b/, 81 + qr/perlsky_subscription_connections_total\{nsid="com\.atproto\.sync\.subscribeRepos"\} 1\b/, 82 82 'subscription open count is exported', 83 83 ); 84 84 like( 85 85 $metrics, 86 - qr/perlds_subscription_active\{nsid="com\.atproto\.sync\.subscribeRepos"\} 0\b/, 86 + qr/perlsky_subscription_active\{nsid="com\.atproto\.sync\.subscribeRepos"\} 0\b/, 87 87 'subscription active gauge returns to zero after close', 88 88 ); 89 89 like( 90 90 $metrics, 91 - qr/perlds_blob_ingress_bytes_total\{mime_type="text\/plain"\} 5\b/, 91 + qr/perlsky_blob_ingress_bytes_total\{mime_type="text\/plain"\} 5\b/, 92 92 'blob upload bytes are exported', 93 93 ); 94 94 like( 95 95 $metrics, 96 - qr/perlds_store_operations_total\{operation="append_event",status="ok"\} [1-9]\d*\b/, 96 + qr/perlsky_store_operations_total\{operation="append_event",status="ok"\} [1-9]\d*\b/, 97 97 'store operation counters are exported', 98 98 ); 99 99 like( 100 100 $metrics, 101 - qr/perlds_build_info\{service="perlds"\} 1\b/, 101 + qr/perlsky_build_info\{service="perlsky"\} 1\b/, 102 102 'build info metric is exported', 103 103 ); 104 104
+1 -1
t/moderation.t
··· 34 34 jwt_secret => 'moderation-secret', 35 35 admin_password => 'admin-secret', 36 36 data_dir => File::Spec->catdir($tmp, 'data'), 37 - db_path => File::Spec->catfile($tmp, 'perlds.sqlite'), 37 + db_path => File::Spec->catfile($tmp, 'perlsky.sqlite'), 38 38 }, 39 39 ); 40 40
+1 -1
t/pds_smoke.t
··· 31 31 service_did_method => 'did:web', 32 32 jwt_secret => 'smoke-secret', 33 33 admin_password => 'admin-secret', 34 - db_path => File::Spec->catfile($tmp, 'perlds.sqlite'), 34 + db_path => File::Spec->catfile($tmp, 'perlsky.sqlite'), 35 35 }, 36 36 ); 37 37
+3 -3
t/plc-identity.t
··· 72 72 open STDOUT, '>', $log_file or die "open($log_file): $!"; 73 73 open STDERR, '>&', \*STDOUT or die "dup stdout failed"; 74 74 chdir $root or die "chdir($root): $!"; 75 - $ENV{PERLDS_READY_FILE} = $ready_file; 76 - $ENV{PERLDS_PLC_PORT} = free_port(); 77 - $ENV{PERLDS_PLC_HOST} = '127.0.0.1'; 75 + $ENV{PERLSKY_READY_FILE} = $ready_file; 76 + $ENV{PERLSKY_PLC_PORT} = free_port(); 77 + $ENV{PERLSKY_PLC_HOST} = '127.0.0.1'; 78 78 exec 'fnm', 'exec', '--using=20', '--', 'node', 79 79 File::Spec->catfile($root, 'tools', 'differential', 'plc-mock.cjs'); 80 80 die "exec failed: $!";
+3 -3
t/reference-differential-plc.t
··· 16 16 ); 17 17 } 18 18 19 - plan skip_all => 'set PERLDS_RUN_REFERENCE_DIFF=1 to run the official PLC differential harness' 20 - unless $ENV{PERLDS_RUN_REFERENCE_DIFF}; 19 + plan skip_all => 'set PERLSKY_RUN_REFERENCE_DIFF=1 to run the official PLC differential harness' 20 + unless $ENV{PERLSKY_RUN_REFERENCE_DIFF}; 21 21 22 22 my $root = File::Spec->rel2abs(File::Spec->catdir($Bin, '..')); 23 23 my $script = File::Spec->catfile($root, 'script', 'differential-validate'); 24 24 25 - local $ENV{PERLDS_DIFF_ACCOUNT_DID_METHOD} = 'did:plc'; 25 + local $ENV{PERLSKY_DIFF_ACCOUNT_DID_METHOD} = 'did:plc'; 26 26 my $output = qx{$^X $script 2>&1}; 27 27 my $code = $? >> 8; 28 28
+2 -2
t/reference-differential.t
··· 16 16 ); 17 17 } 18 18 19 - plan skip_all => 'set PERLDS_RUN_REFERENCE_DIFF=1 to run the official reference PDS differential harness' 20 - unless $ENV{PERLDS_RUN_REFERENCE_DIFF}; 19 + plan skip_all => 'set PERLSKY_RUN_REFERENCE_DIFF=1 to run the official reference PDS differential harness' 20 + unless $ENV{PERLSKY_RUN_REFERENCE_DIFF}; 21 21 22 22 my $root = File::Spec->rel2abs(File::Spec->catdir($Bin, '..')); 23 23 my $script = File::Spec->catfile($root, 'script', 'differential-validate');
+1 -1
t/repo-api.t
··· 32 32 service_handle_domain => 'localhost', 33 33 jwt_secret => 'repo-secret', 34 34 data_dir => $tmp, 35 - db_path => File::Spec->catfile($tmp, 'perlds.sqlite'), 35 + db_path => File::Spec->catfile($tmp, 'perlsky.sqlite'), 36 36 }, 37 37 )); 38 38
+1 -1
t/server-auth.t
··· 30 30 service_handle_domain => 'localhost', 31 31 jwt_secret => 'test-secret', 32 32 data_dir => $tmp, 33 - db_path => File::Spec->catfile($tmp, 'perlds.sqlite'), 33 + db_path => File::Spec->catfile($tmp, 'perlsky.sqlite'), 34 34 }; 35 35 36 36 my $t = Test::Mojo->new(ATProto::PDS->new(
+1 -1
t/store-sqlite.t
··· 23 23 my $tmp = File::Spec->catdir($root, 'data', 'tmp-tests', 'store-sqlite'); 24 24 remove_tree($tmp) if -d $tmp; 25 25 26 - my $db_path = File::Spec->catfile($tmp, 'perlds.sqlite'); 26 + my $db_path = File::Spec->catfile($tmp, 'perlsky.sqlite'); 27 27 my $store = ATProto::PDS::Store::SQLite->new(path => $db_path)->bootstrap; 28 28 29 29 ok(-f $db_path, 'bootstrap creates the sqlite database');
+4 -4
tools/differential/crawler-mock.cjs
··· 3 3 const fs = require('node:fs'); 4 4 const http = require('node:http'); 5 5 6 - const readyFile = process.env.PERLDS_READY_FILE; 7 - const host = process.env.PERLDS_CRAWLER_HOST || '127.0.0.1'; 8 - const port = Number(process.env.PERLDS_CRAWLER_PORT || 0); 6 + const readyFile = process.env.PERLSKY_READY_FILE; 7 + const host = process.env.PERLSKY_CRAWLER_HOST || '127.0.0.1'; 8 + const port = Number(process.env.PERLSKY_CRAWLER_PORT || 0); 9 9 10 10 if (!readyFile) { 11 - console.error('PERLDS_READY_FILE is required'); 11 + console.error('PERLSKY_READY_FILE is required'); 12 12 process.exit(1); 13 13 } 14 14
+5 -5
tools/differential/plc-mock.cjs
··· 16 16 'dist', 17 17 )); 18 18 19 - const readyFile = process.env.PERLDS_READY_FILE; 20 - const port = Number(process.env.PERLDS_PLC_PORT || '0'); 21 - const host = process.env.PERLDS_PLC_HOST || '127.0.0.1'; 19 + const readyFile = process.env.PERLSKY_READY_FILE; 20 + const port = Number(process.env.PERLSKY_PLC_PORT || '0'); 21 + const host = process.env.PERLSKY_PLC_HOST || '127.0.0.1'; 22 22 23 23 if (!readyFile) { 24 - console.error('PERLDS_READY_FILE is required'); 24 + console.error('PERLSKY_READY_FILE is required'); 25 25 process.exit(1); 26 26 } 27 27 ··· 82 82 const parts = path.split('/').filter(Boolean).map(decodeURIComponent); 83 83 84 84 if (parts.length === 0) { 85 - return sendJson(res, 200, { service: 'perlds-plc-mock' }); 85 + return sendJson(res, 200, { service: 'perlsky-plc-mock' }); 86 86 } 87 87 88 88 const did = parts[0];
+2 -2
tools/differential/reference-pds-runner.cjs
··· 18 18 'pds', 19 19 )); 20 20 21 - const readyFile = process.env.PERLDS_READY_FILE; 21 + const readyFile = process.env.PERLSKY_READY_FILE; 22 22 23 23 if (!readyFile) { 24 - console.error('PERLDS_READY_FILE is required'); 24 + console.error('PERLSKY_READY_FILE is required'); 25 25 process.exit(1); 26 26 } 27 27