Files
archie/internal/infrastructure/postgres/migrations/0022_installed_package_authority.sql
T
sam ed35b826ad feat(store): record accepted package authority against the pin
An archie package declares its authority; nothing in the tree recorded the
operator's acceptance of it. This lands the acceptance-record slice of
docs/prds/store.md ("Authority"):

- storepkg.Authority gains Covers (the upper-bound predicate: equal or
  narrower applies, wider does not) and Validate (forge-permission
  vocabulary, no blank grants).
- Installed carries AcceptedAuthority (nil until accepted); install leaves it
  unset, so an unaccepted package has no authority.
- AcceptPackageAuthority on the storepkg Manager records the acceptance
  against the pinned digest and refuses grants the package does not declare
  (storepkg.ErrAuthorityNotDeclared), carried over the wire.
- staterpc gains the admin-only AcceptPackageAuthority RPC;
  InstalledPackage carries accepted_authority.
2026-09-30 07:40:06 +10:00

8 lines
378 B
SQL

-- +goose Up
-- The operator's accepted authority, recorded against the pinned digest. NULL
-- until the operator accepts; NULL is also the correct value for existing
-- rows, which were installed before acceptance records existed.
ALTER TABLE installed_packages ADD COLUMN accepted_authority jsonb;
-- +goose Down
ALTER TABLE installed_packages DROP COLUMN accepted_authority;