@sdd-method/maintain-cli 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/behaviour-store/archive.js +180 -0
- package/dist/lib/catalogue/build.js +18 -1
- package/dist/lib/catalogue/builders/capabilities.js +4 -1
- package/dist/lib/catalogue/builders/events.js +12 -5
- package/dist/lib/catalogue/builders/product-edges.js +3 -1
- package/dist/lib/catalogue/builders/product-platform-dependencies.js +16 -1
- package/dist/lib/catalogue/builders/repo-edges.js +4 -3
- package/dist/lib/catalogue/builders/repositories.js +6 -0
- package/dist/lib/catalogue/builders/requirements.js +208 -0
- package/dist/lib/catalogue/builders/service-contract.js +6 -9
- package/dist/lib/catalogue/canonical-schema.yaml +160 -7
- package/dist/lib/catalogue/rubric-coverage-map.yaml +36 -0
- package/dist/lib/catalogue/schema-compat.js +1 -1
- package/dist/lib/validate/behaviour-store.js +112 -1
- package/dist/lib/vocabulary/renames.js +40 -0
- package/dist/lib/vocabulary/vocabulary-renames.yaml +76 -0
- package/dist/maintain-version.json +2 -2
- package/dist/verify-version.json +2 -2
- package/package.json +2 -2
- package/scripts/validate-app-dependencies.sh +29 -21
|
@@ -11,23 +11,23 @@
|
|
|
11
11
|
#
|
|
12
12
|
# Checks (for each entry in app-platform-dependencies.yaml), split by whether they
|
|
13
13
|
# need a platform surface at all — LOCAL checks run wherever the app repo is:
|
|
14
|
-
# 1. (local) required_stability is a valid value (provisional |
|
|
14
|
+
# 1. (local) required_stability is a valid value (provisional | stable | unknown)
|
|
15
15
|
# 2a. (local) service_id is declared and non-empty
|
|
16
16
|
# 2b. (platform) service_id resolves against the platform source of truth:
|
|
17
17
|
# catalogues/services.csv (exact id match) when the catalogue exists,
|
|
18
18
|
# else docs/platform/service-architecture.md (word-anchored match)
|
|
19
|
-
# 3a. (local) a `
|
|
19
|
+
# 3a. (local) a `stable` dependency declares a contract_path at all
|
|
20
20
|
# 3b. (platform) that contract_path resolves to a file under the platform root
|
|
21
21
|
#
|
|
22
22
|
# Outputs a dependency status table.
|
|
23
|
-
# Used as the Stage
|
|
23
|
+
# Used as the Stage 9 agreement gate in the App Exploration Workflow.
|
|
24
24
|
#
|
|
25
25
|
# THE STABILITY VOCABULARY, AND WHY IT IS WHAT IT IS
|
|
26
26
|
# `required_stability` states the CONSUMING app's expectation of contract
|
|
27
27
|
# stability. Three values express that:
|
|
28
28
|
#
|
|
29
29
|
# provisional the contract may still change; the app tolerates it
|
|
30
|
-
#
|
|
30
|
+
# stable the contract is fixed; a contract_path must exist (check 3)
|
|
31
31
|
# unknown the expectation is not determined
|
|
32
32
|
#
|
|
33
33
|
# `unknown` is accepted because the canonical schema's
|
|
@@ -158,7 +158,7 @@ APP_DEPS_FILE="$APP_ROOT/app-platform-dependencies.yaml"
|
|
|
158
158
|
# This gate read only the forward file, so an entire equal-status source went
|
|
159
159
|
# ungated. Measured in one reverse estate: 15 evidence files declaring 65
|
|
160
160
|
# further dependencies, 38 of them `locked` — precisely the population
|
|
161
|
-
# a Stage
|
|
161
|
+
# a Stage 9 agreement gate exists to check — none of which this gate could see.
|
|
162
162
|
#
|
|
163
163
|
# A source that the catalogue reads and the gate does not is a coverage gap by
|
|
164
164
|
# construction, so the gate now reads both.
|
|
@@ -180,7 +180,7 @@ PLATFORM_SERVICES_CSV="$PLATFORM_ROOT/catalogues/services.csv"
|
|
|
180
180
|
# offer (instances app-dependency-stability-vocabulary-forward and -reverse).
|
|
181
181
|
VALID_STABILITY_VALUES=(
|
|
182
182
|
"provisional" # contract may still change; the app tolerates it
|
|
183
|
-
"
|
|
183
|
+
"stable" # contract is fixed; check 3 requires a resolvable contract_path
|
|
184
184
|
"unknown" # expectation not determined; no contract_path required
|
|
185
185
|
)
|
|
186
186
|
|
|
@@ -353,6 +353,13 @@ validate_dependency() {
|
|
|
353
353
|
service_id="$(yq e ".platform_dependencies[$index].service_id // \"\"" "$source_file")"
|
|
354
354
|
contract_type="$(yq e ".platform_dependencies[$index].contract_type // \"\"" "$source_file")"
|
|
355
355
|
required_stability="$(yq e ".platform_dependencies[$index].required_stability // \"\"" "$source_file")"
|
|
356
|
+
# vocabulary-alias: locked -> stable
|
|
357
|
+
# The fixed-contract stability class was `locked` (M-ADR 0222 §4.1; docs/method/foundations/vocabulary-renames.yaml).
|
|
358
|
+
# Read as `stable` for one major release and reported; from sdd-cli 3.0.0 it is invalid.
|
|
359
|
+
if [[ "$required_stability" == "locked" ]]; then
|
|
360
|
+
log_warn "$source_file: platform_dependencies[$index] uses the former required_stability 'locked', read as 'stable' (M-ADR 0222 §4.1). Run 'sdd-cli migrate vocabulary'; from sdd-cli 3.0.0 the former value is invalid."
|
|
361
|
+
required_stability="stable"
|
|
362
|
+
fi
|
|
356
363
|
contract_path="$(yq e ".platform_dependencies[$index].contract_path // \"\"" "$source_file")"
|
|
357
364
|
|
|
358
365
|
local dep_label="${service_id:-dep[$index]}"
|
|
@@ -403,7 +410,7 @@ validate_dependency() {
|
|
|
403
410
|
done
|
|
404
411
|
|
|
405
412
|
if [[ "$stability_deprecated" -eq 1 ]]; then
|
|
406
|
-
log_fail "$dep_label: required_stability '$required_stability' is not a stability value (M-ADR 0204 §4.4). Declare target_locus: '$required_stability' on the entry and give required_stability a real value (${VALID_STABILITY_VALUES[*]}) — a third-party contract can be
|
|
413
|
+
log_fail "$dep_label: required_stability '$required_stability' is not a stability value (M-ADR 0204 §4.4). Declare target_locus: '$required_stability' on the entry and give required_stability a real value (${VALID_STABILITY_VALUES[*]}) — a third-party contract can be stable."
|
|
407
414
|
((dep_errors++))
|
|
408
415
|
else
|
|
409
416
|
log_fail "$dep_label: invalid required_stability '$required_stability' (allowed: ${VALID_STABILITY_VALUES[*]})"
|
|
@@ -490,26 +497,26 @@ validate_dependency() {
|
|
|
490
497
|
((WARNINGS++))
|
|
491
498
|
fi
|
|
492
499
|
|
|
493
|
-
# Check 3: a
|
|
494
|
-
# resolves to a file (3b, needs the platform). Same split, same reason: "
|
|
500
|
+
# Check 3: a stable dependency declares a contract_path (3a, local) and that path
|
|
501
|
+
# resolves to a file (3b, needs the platform). Same split, same reason: "stable
|
|
495
502
|
# with no path at all" is an app-repo defect that needs nothing external to catch.
|
|
496
|
-
if [[ "$required_stability" == "
|
|
503
|
+
if [[ "$required_stability" == "stable" ]]; then
|
|
497
504
|
if [[ -z "$contract_path" || "$contract_path" == "null" ]]; then
|
|
498
|
-
log_fail "$dep_label: required_stability is '
|
|
505
|
+
log_fail "$dep_label: required_stability is 'stable' but contract_path is empty"
|
|
499
506
|
((dep_errors++))
|
|
500
507
|
elif [[ "$PLATFORM_AVAILABLE" -eq 0 ]]; then
|
|
501
508
|
((UNRESOLVED_CONTRACT_PATHS++))
|
|
502
509
|
else
|
|
503
510
|
local full_contract_path="$PLATFORM_ROOT/$contract_path"
|
|
504
511
|
if [[ ! -f "$full_contract_path" ]]; then
|
|
505
|
-
log_fail "$dep_label:
|
|
512
|
+
log_fail "$dep_label: stable contract_path '$contract_path' does not exist in platform repo"
|
|
506
513
|
((dep_errors++))
|
|
507
514
|
fi
|
|
508
515
|
fi
|
|
509
516
|
elif [[ "$required_stability" == "provisional" || "$required_stability" == "unknown" ]]; then
|
|
510
517
|
# Neither requires a contract_path. If one is declared it is still worth
|
|
511
518
|
# reporting when it does not resolve — silently accepting a path that
|
|
512
|
-
# points at nothing is how a
|
|
519
|
+
# points at nothing is how a stable dependency later inherits a dead path.
|
|
513
520
|
if [[ -n "$contract_path" && "$contract_path" != "null" && "$PLATFORM_AVAILABLE" -eq 1 ]]; then
|
|
514
521
|
local full_contract_path="$PLATFORM_ROOT/$contract_path"
|
|
515
522
|
if [[ ! -f "$full_contract_path" ]]; then
|
|
@@ -552,21 +559,22 @@ print_status_table() {
|
|
|
552
559
|
local service_id required_stability contract_type contract_path dep_status
|
|
553
560
|
service_id="$(yq e ".platform_dependencies[$i].service_id // \"(missing)\"" "$source_file")"
|
|
554
561
|
required_stability="$(yq e ".platform_dependencies[$i].required_stability // \"(missing)\"" "$source_file")"
|
|
562
|
+
if [[ "$required_stability" == "locked" ]]; then required_stability="stable"; fi # the former name, reported above
|
|
555
563
|
contract_type="$(yq e ".platform_dependencies[$i].contract_type // \"(missing)\"" "$source_file")"
|
|
556
564
|
contract_path="$(yq e ".platform_dependencies[$i].contract_path // \"\"" "$source_file")"
|
|
557
565
|
|
|
558
566
|
# Determine display status
|
|
559
|
-
if [[ "$required_stability" == "
|
|
567
|
+
if [[ "$required_stability" == "stable" ]]; then
|
|
560
568
|
if [[ -z "$contract_path" || "$contract_path" == "null" ]]; then
|
|
561
|
-
dep_status="${RED}
|
|
569
|
+
dep_status="${RED}STABLE UNMET${NC}"
|
|
562
570
|
elif [[ "$PLATFORM_AVAILABLE" -eq 0 ]]; then
|
|
563
571
|
# A declared path that was never resolved is not "OK" and not "UNMET".
|
|
564
572
|
# Reporting either would be a claim the run cannot support.
|
|
565
|
-
dep_status="${YELLOW}
|
|
573
|
+
dep_status="${YELLOW}STABLE UNRESOLVED${NC}"
|
|
566
574
|
elif [[ -f "$PLATFORM_ROOT/$contract_path" ]]; then
|
|
567
|
-
dep_status="${GREEN}
|
|
575
|
+
dep_status="${GREEN}STABLE OK${NC}"
|
|
568
576
|
else
|
|
569
|
-
dep_status="${RED}
|
|
577
|
+
dep_status="${RED}STABLE UNMET${NC}"
|
|
570
578
|
fi
|
|
571
579
|
elif [[ "$required_stability" == "provisional" ]]; then
|
|
572
580
|
dep_status="${YELLOW}PROVISIONAL${NC}"
|
|
@@ -637,7 +645,7 @@ main() {
|
|
|
637
645
|
fi
|
|
638
646
|
|
|
639
647
|
if [[ "$FAILURES" -gt 0 ]]; then
|
|
640
|
-
log_fail "$FAILURES dependency check(s) failed. Stage
|
|
648
|
+
log_fail "$FAILURES dependency check(s) failed. Stage 9 agreement gate NOT met."
|
|
641
649
|
exit 1
|
|
642
650
|
fi
|
|
643
651
|
|
|
@@ -648,7 +656,7 @@ main() {
|
|
|
648
656
|
# while never executing (M-ADR 0200 §4.3).
|
|
649
657
|
if [[ "$PLATFORM_AVAILABLE" -eq 0 ]]; then
|
|
650
658
|
log_warn "Ran check 1 (stability vocabulary) and the local halves of checks 2-3 over $TOTAL_DEPS dependency(ies): $FAILURES failure(s), $WARNINGS warning(s)."
|
|
651
|
-
log_warn "NOT RUN, for want of --platform-root: $UNRESOLVED_SERVICE_IDS service_id resolution(s) and $UNRESOLVED_CONTRACT_PATHS
|
|
659
|
+
log_warn "NOT RUN, for want of --platform-root: $UNRESOLVED_SERVICE_IDS service_id resolution(s) and $UNRESOLVED_CONTRACT_PATHS stable contract_path resolution(s)."
|
|
652
660
|
log_info "This is a partial run, not a met gate — pass --platform-root to complete it."
|
|
653
661
|
exit 0
|
|
654
662
|
fi
|
|
@@ -656,7 +664,7 @@ main() {
|
|
|
656
664
|
if [[ "$WARNINGS" -gt 0 ]]; then
|
|
657
665
|
log_warn "All required checks passed with $WARNINGS warning(s)."
|
|
658
666
|
else
|
|
659
|
-
log_pass "All dependency checks passed. Stage
|
|
667
|
+
log_pass "All dependency checks passed. Stage 9 agreement gate met."
|
|
660
668
|
fi
|
|
661
669
|
exit 0
|
|
662
670
|
}
|