Artifact and media metadata were previously reconstructed from job result
refs and JSON sidecar files. This change regularizes metadata into SQLite,
keeps filesystem blobs in place, and preserves backward compatibility via
lazy fallback and backfill from existing job refs and JSON metadata.
Constraint: Blob storage remains on the local filesystem in this phase
Rejected: Migrate blobs into SQLite | larger scope and worse operational profile for current media sizes
Rejected: Hard cutover without fallback | unsafe for historical data already on the test server
Confidence: medium
Scope-risk: moderate
Directive: Treat SQLite as the metadata source of truth; JSON sidecars are compatibility fallback only
Tested: go test ./...; deployed to test server 101.42.99.35; verified /v1/artifacts, /v1/artifacts/:id, signed media URL 200, unsigned content 401
Not-tested: Full historical backfill sweep over all existing artifact rows under production-sized data volume
The remote master branch was carrying AppleDouble metadata, local database state, and checked-in Next.js build output. This commit syncs the repository to the current local source snapshot, preserves the skillhub static pages that exist locally, and extends ignore rules so these runtime artifacts stay out of history going forward.
Constraint: The existing remote history already contained tracked macOS metadata files and web build output
Constraint: The local source tree must remain deployable after removing repository noise
Rejected: Force-push the unrelated local bootstrap commit | would discard the existing remote history
Rejected: Leave tracked runtime artifacts in place | would keep polluting future diffs and deployments
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Keep AppleDouble files, local SQLite state, and web build artifacts out of version control; regenerate them per-environment instead
Tested: go test ./...; go build -o /tmp/popiartserver-sync ./cmd/popiartserver
Not-tested: Remote test-server deployment