audit-g1: six one-liner drift fixes from 2026-06-02 audit #49
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Group 1 of the 2026-06-02 multi-system drift audit (workflow
wf_bbe3fdb1-e62, 83 agents, adversarially verified). Six small fixes, each on its own audit finding.BACKFILL_TIMEOUT_SECONDScapped at 1170s (under Celery's 1200s hardtime_limit). Backfill subprocesses no longer get SIGKILLed beforesubprocess.TimeoutExpiredfires, so stdout/stderr aren't lost andbackfill_runs_remainingactually decrements. Re-creates the same rationale as the tick 870s/900s pairing.recover_interrupted_tasksorphan UPDATE now stampsfinished_at; without itcleanup_old_tasks'WHERE finished_at < cutoffnever reaped orphan-swept rows, leaving them as permanent table tenants.recover_stalled_task_runsalso now stampsduration_msso sweep-closed rows carry duration like normally-finalized rows.ExtensionService.quick_add_sourcearmsNEW_SOURCE_BACKFILL_RUNS=3on Source creation (mirroringSourceService.create). Without it, Firefox quick-add on a creator with >20 unsynced posts walked the full feed to subprocess timeout. Constant renamed (dropped leading underscore) to allow cross-module import.gallery_dl.verify()acceptsTIER_LIMITEDas auth-success alongsideNO_NEW_CONTENT. The download path (line 712) already treatsTIER_LIMITEDas success —TIER_LIMITEDproves auth reached the post and was told it was tier-gated. Operators no longer rotate working cookies because verify showed red.prune_unused_tagsrewritten as a single DELETE with the same NOT-IN predicatefind_unused_tagsuses, instead of SELECT-ids → DELETE-WHERE-IN. Removes the psycopg 65535-parameter cliff that would have surfaced on a tag explosion.credentials.upload()reflects the returned record into the store cache (.set(platform, rec)) instead of evicting it. Eliminates the gap where the card briefly showed "no credential" between upload and the caller's follow-uploadAll().Test Plan
okorpartial, noterrorwith empty logs; confirmbackfill_runs_remainingdecremented.cleanup_old_tasksafter 7 days — orphaned rows should be reaped.Audit reference
This PR closes Group 1 of plan task
Scribe #551(FC integrity-audit drift remediation). Groups 2-5 (async race fixes, lifecycle batch, status-enum miss batch, architectural debt) to follow.🤖 Generated with Claude Code