61b8c2fcefda39e886ee6e020491f45bc1b78d4e
SQLite's last_insert_rowid() only updates on actual INSERTs, not ON CONFLICT DO UPDATE. When pushing a second tag for an existing manifest digest, the upsert fires the conflict branch (no new row), so LastInsertId() returns a stale ID from a previous insert. This caused manifest_blobs and tags to reference the wrong manifest, producing a 500 on the PUT manifest response. Replace LastInsertId() with a SELECT id WHERE repository_id AND digest query within the same transaction. Security: manifest_blobs and tag foreign keys now always reference the correct manifest. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
MCR is the Metacircular Container Registry
This is a container registry integrated with MCIAS.
Description
Languages
Go
95.4%
HTML
2.5%
CSS
1.3%
Shell
0.5%
Makefile
0.2%
Other
0.1%