Commit Graph

12961 Commits (b291b7bf6553b1e2b99ea13dc4364347b4971dbb)
 

Author SHA1 Message Date
Shlee b291b7bf65
Merge pull request #6783 from thomasjacumin/dev
Use Mastodon username convention for OIDC
4 weeks ago
Shlee a82dc91295
Merge branch 'staging' into dev 4 weeks ago
Shlee f710b5eee8
Merge pull request #6947 from pixelfed/shleeable-patch-1
Update php-psalm.yml
4 weeks ago
Shlee 27f7127ccd
Update php-psalm.yml 4 weeks ago
Shlee 32aa90301f
Merge pull request #6946 from pixelfed/shleeable-patch-1
Update php-psalm.yml
4 weeks ago
Shlee 3058d3f816
Update php-psalm.yml
Comment out the SARIF report check and upload steps in the workflow.
4 weeks ago
Shlee 6d9521e1c8
Merge pull request #6945 from pixelfed/chore/add-psalm-static-analysis
Chore/add psalm static analysis
4 weeks ago
Your Name 25494c4911 ci(psalm): run analyzer on PHP 8.4 to avoid 8.5 crash
Psalm 6.5.0 fatally crashes on PHP 8.5 (deprecated SplObjectStorage::attach
escalated by its error handler) before analyzing anything. Pin the Psalm
job to 8.4 so it runs and produces SARIF; revert to 8.5 once Psalm supports
it.
4 weeks ago
Your Name aed7936e4e ci(psalm): skip SARIF upload when report is missing
Replace the blank-SARIF fallback with an existence check; uploading an
empty SARIF would clear existing Code Scanning alerts. Now the upload is
skipped (with a warning) when Psalm produced no report.
4 weeks ago
Your Name 5cecde6708 ci(psalm): guarantee SARIF file exists and upgrade upload-sarif to v4
Add a fallback step that writes a minimal valid SARIF report when Psalm
exits before producing one, so the Code Scanning upload never hard-fails
the job. Bump github/codeql-action/upload-sarif v3 -> v4.
4 weeks ago
Shlee aa46ca2ba2
Merge pull request #6944 from pixelfed/chore/add-psalm-static-analysis
chore: add Psalm static analysis (plugin-laravel, baseline, CI)
4 weeks ago
Your Name 6945277e2c ci(psalm): align workflow with php-* conventions, test on PHP 8.5
Rename psalm.yml to php-psalm.yml to match sibling workflows, bump PHP
8.4 -> 8.5, use the shared checkout/setup-php/cache/composer steps and
staging/dev/unstable triggers. Keeps report-only behavior and SARIF
Code Scanning upload.
4 weeks ago
Your Name 2617211c1f ci(psalm): report findings but never fail the job 4 weeks ago
Your Name 1a234c3920 chore: add Psalm static analysis (plugin-laravel, baseline, CI)
Port PR #6646 onto staging: add psalm/plugin-laravel with psalm.xml,
a staging-generated baseline, and a CI workflow that emits GitHub
annotations and uploads SARIF to Code Scanning. Fix the psalm.xml schema
for Psalm 6.5 (drop unsupported ClassMustBeFinal handler) and ignore
generated report artifacts in git/docker.
4 weeks ago
Shlee cca9eb426d
Merge pull request #6942 from pixelfed/feature/fix-post-counts-command
Feature/fix post counts command
4 weeks ago
Your Name 078380723f style: import DB facade in FixPostCounts test (pint) 4 weeks ago
Your Name ec5be52418 test: add feature tests for admin:fixPostCounts
Cover source-of-truth resync of likes/boosts/comments, dry-run, no-op on
correct data, --type restriction, argument validation, and bulk --all
mode. Includes regression tests for the two reporting bugs: the summary
now lists only drifted metrics, and a null reply_count renders as 0.
4 weeks ago
Your Name de850836ca fix: make admin:fixPostCounts summary report only changed metrics
The resynced summary printed all three counts unconditionally, which
made an untouched metric (e.g. an already-correct comments count) look
like it had been resynced. Drive the summary from the drifted set and
show before->after values, so it matches the drift detection exactly.
4 weeks ago
Your Name d50024a578 fix: display comments count as 0 instead of blank in admin:fixPostCounts
reply_count is a nullable column, so NULL rendered as an empty string in
the resync summary. Cast the summary output to int so a null/absent
comment count prints as 0. No behavior change to the reconcile logic.
4 weeks ago
Shlee 303182daf8
Merge pull request #6940 from pixelfed/feature/fix-post-counts-command
feat: add admin:fixPostCounts to resync post like/boost/comment counts
4 weeks ago
Your Name 73b8353dab refactor: move admin:fix*Counts commands to Admin/
FixProfileCounts and FixPostCounts use the admin: signature prefix and
are operator-run maintenance tools, so move them from FixBugs/ to Admin/
(namespace updated) and refresh the README tables to match.
4 weeks ago
Your Name 744e453606 feat: add admin:fixPostCounts to resync post like/boost/comment counts
Add a FixPostCounts command mirroring admin:fixProfileCounts (single-id,
--all --scope, --active, --type, --dry-run, --force). It reconciles the
statuses likes_count, reblogs_count, and reply_count columns against
source-of-truth tables.

Add canonical recompute helpers and reconcileStatusCounts() to
StatusService (mirroring AccountStatService), busting the status cache
only when a column actually drifted.
4 weeks ago
Daniel Supernault ba8b92105d
Update compiled assets 4 weeks ago
Daniel Supernault 32ff6d48cd
Update Profile component 4 weeks ago
Shlee a288308323
Merge pull request #6938 from pixelfed/refactor/artisan-command-subfolders
refactor: move resolved one-off migrations to Deprecated/
4 weeks ago
Shlee 4699c2fe91
Merge branch 'staging' into refactor/artisan-command-subfolders 4 weeks ago
Your Name cd353a8305 refactor: move resolved one-off migrations to Deprecated/
status:dedup and fix:avatars address historical data states that can no
longer occur (unique statuses.uri index since 2019; SVG identicon avatars
no longer generated). Move both to a Deprecated/ folder and update the
README audit accordingly. media:fix stays in FixBugs/ since image filters
are still an active feature.
4 weeks ago
Shlee 0497aab3d2
Merge pull request #6937 from pixelfed/shleeable-patch-1
Update README.md
4 weeks ago
Shlee cafec250fe
Update README.md 4 weeks ago
Shlee a690fa7c81
Merge pull request #6936 from pixelfed/refactor/artisan-command-subfolders
docs: add README for Artisan commands with listing and audit
4 weeks ago
Your Name c99b8068a2 docs: add README for Artisan commands with listing and audit 4 weeks ago
Shlee 06cfcc6087
Merge pull request #6935 from pixelfed/refactor/artisan-command-subfolders
refactor: organize Artisan commands into subfolders
4 weeks ago
Your Name 1eae4bbd43 refactor: organize Artisan commands into subfolders
Group console commands into Admin, Dev, FixBugs, Install, Internal, and
User subfolders (matching the earlier reorganization), and add a new
Status subfolder for the status:user, status:profile, and status:post
debug commands. Namespaces updated to match; command signatures and the
total command count are unchanged.
4 weeks ago
Shlee ffe6c70469
Merge pull request #6934 from pixelfed/refactor/status-command-prefix
refactor: rename status debug commands to status: prefix
4 weeks ago
Your Name 16c7c5d2e3 refactor: rename status debug commands to status: prefix
Rename user:status, profile:status, and post:status console commands
to status:user, status:profile, and status:post. Rename the command
files and classes to match (StatusUser, StatusProfile, StatusPost) and
update the cross-reference tip in StatusProfile.
4 weeks ago
Shlee 9dae391e65
Merge pull request #6760 from pixelfed/shleeable-patch-5
Fix LDAP login issues with mail
4 weeks ago
Shlee fbf6f38be5
Merge pull request #6933 from pixelfed/fix/duplicate-media-attachment
Fix duplicate-key violation when importing remote media attachments
4 weeks ago
Your Name 0d01d5a963 Fix duplicate-key violation when importing remote media attachments
Helpers::importNoteAttachment unconditionally inserted a new Media row per
attachment, so re-importing a remote status (an Announce racing another
inbox job, a re-fetch, or a duplicate url within one activity) hit the
media_status_id_media_path_unique constraint and crashed the queue job with
a 1062 UniqueConstraintViolationException, dropping the boost/import.

Make createMediaAttachment idempotent on (status_id, media_path): skip when
a row already exists, and catch the unique-constraint violation as a
lost-race no-op, returning null so the caller skips re-dispatching storage.

Adds regression tests (re-import no-op, distinct urls still stored,
concurrent-insert returns null).
4 weeks ago
Shlee f017e03286
Merge pull request #6932 from pixelfed/feature/media-url-migrate
Feature/media url migrate
4 weeks ago
Your Name 68366c7dde polish 4 weeks ago
Your Name 70b4a05b5c Add admin:MediaMoveStorageCloudToCloud for cold S3->S3 migration
Cold-migrate existing media from an old S3 bucket to the current cloud
bucket, one media row at a time (like MigrateLocalS3MediaURL):
- Source = --sourceDisk (default s3-old, reads AWS_OLD_*); destination = the
  current cloud disk (config filesystems.cloud). No .env editing: operators
  point AWS_* at the new bucket first (restarting workers as usual) so new
  uploads/downloads land on the new bucket, then run this to backfill old data.
- Copies media (+thumbnail) source->destination, verifies by size and by
  sha256 of the freshly-written destination object (against original_sha256),
  rewrites cdn_url/optimized_url/thumbnail_url to the destination host, and
  GCs the source objects (unless --keep-source). Busts caches.
- Only touches rows whose cdn_url still points at the source host; idempotent.
- --sourceDisk / --limit / --dry-run / --force.
- Adds the s3-old disk (AWS_OLD_*) to config/filesystems.php and feature tests.
4 weeks ago
Your Name 6ff9ffbbb8 Add media storage migration commands (local<->cloud) with integrated GC
Add admin:MediaMoveStorageLocalToCloud and admin:MediaMoveStorageCloudToLocal:
- Copy media (+thumbnail) between local and cloud disks, verify by size (and
  sha256 against original_sha256 when present) before deleting the source.
- Integrated GC: delete the verified source copy (local on upload, cloud on
  download), set version=4 / reset to 3, and bust MediaService/StatusService
  caches. --keep-local / --keep-cloud opt out.
- Manage PF_ENABLE_CLOUD in .env AND the live runtime + config cache so new
  uploads route to the correct backend mid-migration on a hot server. Uses the
  installer's atomic .env writer (shared ManagesMediaStorageEnv trait).
- --limit / --dry-run / --force.

Replaces media:migrate2cloud (CloudMediaMigrate) and media:s3gc
(MediaS3GarbageCollector); scheduler now runs MediaMoveStorageLocalToCloud
hourly for straggler upload + GC. Keeps media:fix-nonlocal-driver.

Adds feature tests (download+GC, --keep-cloud, dry-run, env-flag flip both
directions, unknown-disk guard).
4 weeks ago
Shlee 27d6df4bdd
Merge pull request #6931 from pixelfed/shleeable-patch-1
Update CHANGELOG.md
4 weeks ago
Shlee 45918bbb1a
Update CHANGELOG.md 4 weeks ago
Shlee 137bc91b41
Merge pull request #6922 from pixelfed/security/ssrf-media-fetch
Fix media fetch
4 weeks ago
Shlee 94d519d3a2
Merge pull request #6929 from pixelfed/feature/media-url-migrate
post:status command for post/media diagnostics + admin:MigrateLocalS3MediaURL to fix broken CDN URLs
4 weeks ago
Your Name 34d6fb31f9 Fix MigrateLocalS3MediaUrl tests failing in CI
config_cache() falls through to config() when instance.enable_cc is off
(ENABLE_CONFIG_CACHE=false, as in CI/.env.testing), so ConfigCacheService::put()
alone did not toggle pixelfed.cloud_storage and the command's cloud-enabled
guard aborted with exit 1. Set the underlying config value too (both in
beforeEach and the local-storage refusal test).
4 weeks ago
Your Name da9e73dd22 Rename to admin:MigrateLocalS3MediaURL and drop --avatars
Rename the command (and test) to admin:MigrateLocalS3MediaURL to reflect its
scope: rewriting stale S3/cloud media URLs only. Remove avatar handling and
the --avatars option; the command now focuses solely on status media
(cdn_url, thumbnail_url, optimized_url).
4 weeks ago
Your Name 04536a6e32 Add admin:MigrateLocalMediaURL; replace media:cloud-url-rewrite
Rebuilds stale local media URLs (cdn_url, thumbnail_url, optimized_url) and
avatar cdn_urls from their storage paths via the configured cloud disk.

- Default target host comes from the configured cloud disk (AWS_URL);
  requires confirmation (or --force) and can be overridden with --newDomain.
- Optional --oldDomain filters to a single old backend host; by default all
  stale hosts are rewritten.
- Refuses to run when PF_ENABLE_CLOUD is false (local storage) and, when
  auto-detecting, refuses a target equal to the app domain — so local-storage
  instances are never rewritten.
- Single status id / post URL, --all, --avatars; --dry-run; busts
  MediaService/StatusService caches for affected statuses.
- Removes the superseded media:cloud-url-rewrite command.
- Adds feature tests covering rewrite/skip/dry-run/oldDomain/newDomain/
  remote-skip/local-storage-refusal.
4 weeks ago
Your Name 4aa7b57280 Add post:status command for post/media diagnostics
Dumps a Status and its media for debugging. Accepts a post id or URL
(/p/username/ID). Shows status columns, author, every media row's storage
fields (media_path, thumbnail_path, cdn_url, thumbnail_url, optimized_url,
remote_url, etc.), computed url()/thumbnailUrl()/expected-from-path, a URL
health check comparing stored URL hosts against the configured cloud disk
host (flags stale hosts), and the cached MediaService media_attachments
actually served to clients.
4 weeks ago