#2593
db: add the storage class column to snapshot storage locations
Summary
Add the storage class column to snapshot storage locations.
This is the schema half of recording a verified storage class, split out so the migration lands apart from runtime code.
- Add a nullable
storage_classtext column tosnapshot_storage_locations. It records the class of the location, which holds every object of the snapshot at that route, so the name does not saydisk. - Add a named
NOT VALIDcheck that permitshot,cold, or NULL. Existing rows stay NULL; there is no scan or backfill. - Keep this change schema-only. The down migration drops the column and its check, discarding any recorded classes.
Validation
- Passed
scripts/check-postgres-migrations-isolated.sh,scripts/check-migration-versions.sh, andscripts/check-postgres-migrations-squawk.shagainst main. Squawk reported zero issues.
Severity and risk
Low. The change is additive and existing writers can omit the column. PostgreSQL still takes a brief table lock; the migration bounds lock and statement waits. Apply this migration before introducing the writer, and roll back the writer before dropping the column.
AI assistance: Perplexity contributed the migration and this description.
Created with Perplexity
Automatic approval withheld
Automatic approval is disabled by the configured approval policy for this pull request. Review comments and requests for changes continue normally.
Commit:
2cfbcb8822ca.No actionable comments were generated in the recent review.
Walkthrough
The up migration adds a nullable
storage_classcolumn tosnapshot_storage_locationsand constrains its values tohotorcoldwith aNOT VALIDcheck. The down migration drops the column. Both migrations set local lock and statement timeouts.Merge Risk: Low · up to
2cfbcThis adds an optional hot or cold storage class to snapshot locations without changing existing rows. The risk is low. Apply the migration before introducing the writer, and roll the writer back before dropping the column.
Architecture risk: Low · up to
2cfbcThe persisted snapshot-location contract adds an optional hot-or-cold storage classification, with a down migration that removes the field.
Changed areas:
dbReview details
Systems and components
Pre-merge checks: 7
storage_classcolumn tosnapshot_storage_locations…#2593, shehan-pplx, main <- loki/location-class-migration) adds a nullable storage_class…db/postgres/20261201204354_snapshot_location_storage_class.up.sqland.down.sql. Both are new (status A). The diff removes or edits no test, a…db/postgres/20261201204354_snapshot_location_storage_class.up.sqlan…storage_classcolumn with aNOT VALIDcheck (hot/cold), and a down migration that dr…Full details: Title check
Explanation
The title "db: add the storage class column to snapshot storage locations" follows the required format: a lowercase area ("db") followed by a colon, then a summary starting with a lowercase word ("add"). It has no trailing period, ticket ID, or internal link. It matches the main change, which adds a nullable storage_class column to snapshot_storage_locations.
Full details: Description Follows The Pr Template
Explanation
The PR description contains all four required items, each with real content: 1. "## Summary": present. It states that merging adds a nullable
storage_classcolumn tosnapshot_storage_locationsand a namedNOT VALIDcheck. 2. "## Validation": present. It namesscripts/check-postgres-migrations-isolated.sh,scripts/check-migration-versions.sh, andscripts/check-postgres-migrations-squawk.sh, and reports that they passed againstmainwith zero Squawk issues. 3. "## Severity and risk": present. It gives "Low" as the severity and describes the risk: a brief table lock, bounded by the lock and statement timeouts. 4. "AI assistance:" line: present. It reads "AI assistance: Perplexity contributed the migration and this description," which names the tool and the parts it drafted. The check judges presence only, so the content quality is not assessed.Full details: Bug Fixes Name A Regression Test
Explanation
The check applies only when the PR fixes a defect in application behavior under crates/, shim/, or ui/. The PR (
#2593, shehan-pplx, main <- loki/location-class-migration) adds a nullable storage_class column and a NOT VALID check to snapshot_storage_locations. The changed-file inventory shows only two added files under db/postgres/: an up and a down migration. No file under crates/, shim/, or ui/ changes. The PR is a schema addition, not an application bug fix, so the check does not apply and passes.Full details: Weakened Safeguards Are Justified
Explanation
The PR range adds two files and changes nothing else:
db/postgres/20261201204354_snapshot_location_storage_class.up.sqland.down.sql. Both are new (status A). The diff removes or edits no test, assertion, lint, CI step, allowlist, baseline, exception, or guideline file, so none of the listed weakening patterns applies. The up migration adds a nullablestorage_class TEXTcolumn and a namedNOT VALIDcheck that permitshotorcold. It also setslock_timeoutto 1s andstatement_timeoutto 5s. These settings bound waits and add no relaxation. The down migration drops the column. Nothing in the diff disables or narrows an existing safeguard. Primary PR: perplexityai/SPACE#2593, author shehan-pplx. The author identity does not affect this check.Full details: Agent Tooling Runs No New Commands
Explanation
The check covers agent plugin manifests, SKILL.md files, command/skill files, and guideline files. The PR changes only two files:
db/postgres/20261201204354_snapshot_location_storage_class.up.sqland.down.sql. The changed-file inventory (git diff --name-status) lists no plugin manifest, skill, command, or guideline file. The SQL diffs contain onlySET LOCALtimeouts andALTER TABLEstatements, with no hooks, MCP/LSP server entries, SKILL.md frontmatter, inline shell substitutions, or other content that agent tools would run. The check does not apply to this diff, so it passes.Full details: External Code Sources Need A Person
Explanation
The check applies only to external code sources: Cargo.toml dependency sources, container image references, downloaded binaries or archives in Dockerfiles or scripts, and external Helm chart dependencies. The PR changes two files, both new SQL migrations:
db/postgres/20261201204354_snapshot_location_storage_class.up.sqland.down.sql. Neither file matches a failure condition. The up migration adds a nullablestorage_classTEXT column and aNOT VALIDcheck constraint allowing'hot'and'cold'. The down migration drops the column. No Cargo.toml, Dockerfile, image reference, download URL or checksum, or Helm chart file is added or changed.Full details: Public-Safe Content
Explanation
The public-safe content check passes. The PR adds two migration files: an up migration that adds a nullable
storage_classcolumn with aNOT VALIDcheck (hot/cold), and a down migration that drops it. Neither file contains credentials, tokens, keys, internal hostnames or URLs, cloud account IDs or ARNs, cluster or environment names, personal absolute paths, production logs or measurements, incident details, or undisclosed vulnerability descriptions. The title and description contain no such values either. Repo-relative script paths (scripts/check-*.sh) are not personal workstation paths. The only link is the closing "Created with Perplexity" credit, which points to perplexity.ai, the AI tool's own site, so it is allowed under the check's exception.Automatic approval policy
Commit:
2cfbcb8822ca.Matching overrides (numbered as in the resolved configuration):
.coderabbit.yaml,.coderabbit.yml,coderabbit.yaml,coderabbit.yml,.coderabbit.config.ts,.github/**,ci/scripts/ci-image.sh,ci/scripts/mirror-images.sh,ci/scripts/lib/test-deps.sh,ci/scripts/run-space-bundle-builds.py,ci/scripts/ensure-uv.sh,ci/scripts/tfswitch-lite.sh,ci/scripts/notify-main-ci-failure.sh,templates/firecracker/kernel/ci.sh,ci/Dockerfile.ci,ci/mirrored-images.txt,ci/scripts/pull-ci-reuse.py,.claude/settings*.json,**/.mcp.json,**/hooks.json,.agents/plugins/**/hooks/**,.agents/plugins/**/scripts/**,.agents/plugins/**/commands/**,.agents/plugins/**/agents/**,**/skills/**/hooks/**,**/skills/**/scripts/**,**/skills/**/commands/**,**/skills/**/agents/**,.claude/commands/**,.claude/agents/**,**/marketplace.json,.pre-commit-config.yaml,lefthook.yaml,.cargo/**,rust-toolchain.toml,supply-chain/**,**/pyproject.toml,**/uv.lock,**/package.json,**/package-lock.json,**/go.mod,**/go.sum,**/requirements*.txt,**/requirements*.in,db/**,!db/README.md,proto/**,docs/versioning.md,ci/guest-update-required-since,crates/l40_api/api/src/auth.rs,crates/l40_api/api/src/auth/**,crates/l40_api/api/src/middleware/auth*,crates/l40_api/api/src/middleware/auth/**,crates/l40_api/api/src/routes/authz.rs,crates/l10_foundation/bearer/**,crates/l10_foundation/rustls/**,crates/l10_foundation/guest/**,crates/l10_foundation/pii/**,infra/space/aws/**,infra/space/cluster/**,infra/space/identity/**,infra/space/observability/**,infra/space/packer/**,LICENSE,SECURITY.md; automatic approvals: disabled.Any matching disabled override withholds approval, regardless of risk. Otherwise, the strictest explicitly set limit wins for each score. Limits omitted by all matching overrides inherit the global configuration.
Not set means no limit was configured after inheritance. Use
@coderabbitai configurationto inspect the resolved settings and their sources.547a73d7-0628-4d1e-b7de-ef9482f6f20eReviewing files that changed from the base of the PR and between c08192bb95886999d8c4b09f37db6f63a9dc1d2b and 2cfbcb8822cabc4076c46d1b8ab68674213d4d3e.
db/postgres/20261201204354_snapshot_location_storage_class.down.sqldb/postgres/20261201204354_snapshot_location_storage_class.up.sqlIncluded review availability: This review used your included allowance. 6 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.