Skip to content

Commit 1cc4758

Browse files
committed
docs: fold osv-sync ADRs into the living oss-packages ADR
Joana introduced docs/adr/0001-oss-packages-design-decisions.md (PR #4151, merged 2026-05-27) as the single living record for the oss-packages domain, with one section per decision and a Changelog at the bottom. Our slice landed three standalone ADRs (0003 / 0005 / 0006) before that consolidation merged. This rebases them into her structure. Folded into ADR-0001: - CVSS scoring strategy (was ADR-0005) — inline v3.1, qualitative fallback, v4 deferred, Scope-metric validation. Adjacent to §OSV. - has_critical_vulnerability semantics (was ADR-0003) — option (b) + MAL- override, comparator-driven derivation, idempotent recompute. Resolves the prior open question on this flag. - advisory_affected_ranges uniqueness scope (was ADR-0006) — full tuple unique index restores the "no denormalization" invariant. Other changes: - Updated the Scope and current status table at the top of ADR-0001 to list the three new decisions and remove the "flag deferred" qualifier on OSV. - Removed the open question on has_critical_vulnerability — now decided in §has_critical_vulnerability semantics. - Added a 2026-05-28 Changelog entry documenting the fold and the removal of standalone ADR-0004 (Temporal vs standalone-bin — superseded by §Worker architecture before merge). - Rewrote all in-tree ADR cross-references (6 source files, 3 migration SQL files) to point at the new section anchors instead of the removed standalone ADR ids. - Updated docs/adr/README.md to list only ADR-0001 (matches Joana's intent in PR #4151). All 68 unit tests still pass. Signed-off-by: Joan Reyero <joan@reyero.io>
1 parent 0898c23 commit 1cc4758

14 files changed

Lines changed: 182 additions & 337 deletions

backend/src/osspckgs/migrations/V1779871303__add_cvss_source_to_advisories.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
-- qualitative severity tag. Extensible to 'ghsa' | 'nvd' if we enrich later.
44
-- Values:
55
-- 'osv_cvss_v3' numeric score from a CVSS_V3 vector
6-
-- 'osv_cvss_v4' reserved; v4 numeric scoring deferred (ADR-0005)
6+
-- 'osv_cvss_v4' reserved; v4 numeric scoring deferred (see ADR-0001 §CVSS scoring strategy)
77
-- 'osv_qualitative_fallback' synthesized from database_specific.severity tag
8-
-- 'osv_malicious_package' MAL-* id with no CVSS vector (ADR-0003 / decision #6)
8+
-- 'osv_malicious_package' MAL-* id with no CVSS vector (see ADR-0001 §`has_critical_vulnerability` semantics)
99
ALTER TABLE advisories
1010
ADD COLUMN cvss_source text;

backend/src/osspckgs/migrations/V1779871327__add_has_critical_vulnerability_to_packages.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
-- Critical-vulnerability flag on packages. TRUE iff there exists a critical
22
-- advisory (advisories.is_critical) whose affected range covers the package's
33
-- current latest_version. Maintained by deriveCriticalFlag in the osv-sync
4-
-- worker; see ADR-0003 for the semantics (option (b) from the TODO in the
5-
-- initial schema migration).
4+
-- worker; see ADR-0001 §`has_critical_vulnerability` semantics for the
5+
-- option (b) decision and the MAL-* override.
66
ALTER TABLE packages
77
ADD COLUMN has_critical_vulnerability bool NOT NULL DEFAULT FALSE;
88

backend/src/osspckgs/migrations/V1779897650__widen_advisory_affected_ranges_unique_index.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
-- sharing an introduced_version but differing in fixed_version / last_affected
1010
-- (cross-distro patches, partial fixes) no longer collide on insert and lose
1111
-- the wider range. Restores the osv-plan §2 decision #1 invariant: "one
12-
-- package has many version ranges, no denormalization." See ADR-0006.
12+
-- package has many version ranges, no denormalization." See ADR-0001
13+
-- §`advisory_affected_ranges` uniqueness scope.
1314
DO $$
1415
DECLARE
1516
idx_name text;

docs/adr/0001-oss-packages-design-decisions.md

Lines changed: 158 additions & 87 deletions
Large diffs are not rendered by default.

docs/adr/0003-has-critical-vulnerability-semantics.md

Lines changed: 0 additions & 69 deletions
This file was deleted.

docs/adr/0005-cvss-scoring-strategy.md

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)