Commit ea86691
authored
scripts/check-openapi-settings-parity.ts diffed the top-level KEY SETS of
RepositorySettingsSchema/RepoSettingsPreviewSchema against the two TS types by re-parsing
src/types.ts and src/signals/settings-preview.ts with brace-and-indent heuristics. It could
not see a field's optionality, nullability, or value type, and any reformatting of either
type would have silently broken its extraction.
test/unit/openapi-settings-schema-parity.test.ts replaces it with an exact-equality type
assertion in both directions, compared per key so a failure still names the drifted field.
Three published-spec defects the key-set diff had been structurally unable to see turned up
the moment it compiled:
- autonomy advertised "suggest"/"propose", removed from AutonomyLevel by #4620 and dropped
on persist ever since;
- contributorBlacklist omitted the immutable githubId the API has returned since #9125;
- moderationRules omitted "copycat", a real ModerationRuleType since #1969.
Also: expectedCiContexts is declared and read as nullable but the schema never said so, and
the settings-preview's aiReviewConfirmedContributorsOnly advertised a null the builder's
`?? false` makes unreachable.
Reaching parity required the types to state what the read paths already guarantee. The
thirteen config-as-code fields both getRepositorySettings paths always populate become
required; the no-row defaults move into defaultRepositorySettings() so there is one home for
them, and upsertRepositorySettings echoes linkedIssueHardRules/synchronizeClosePolicy so
PUT's response matches GET's shape. resolveEffectiveSettings now skips undefined-valued
manifest keys before the spread, so config-as-code can no longer punch a hole in a resolved
DB value -- "not overridden" is what an absent value means at every other layer.
1 parent 643383c commit ea86691
29 files changed
Lines changed: 329 additions & 305 deletions
File tree
- .github/workflows
- apps/loopover-ui/public
- scripts
- src
- db
- openapi
- signals
- test/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | 793 | | |
800 | 794 | | |
801 | 795 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9206 | 9206 | | |
9207 | 9207 | | |
9208 | 9208 | | |
9209 | | - | |
| 9209 | + | |
| 9210 | + | |
9210 | 9211 | | |
9211 | 9212 | | |
9212 | 9213 | | |
| |||
9690 | 9691 | | |
9691 | 9692 | | |
9692 | 9693 | | |
| 9694 | + | |
| 9695 | + | |
| 9696 | + | |
9693 | 9697 | | |
9694 | 9698 | | |
9695 | 9699 | | |
| |||
9704 | 9708 | | |
9705 | 9709 | | |
9706 | 9710 | | |
9707 | | - | |
9708 | | - | |
9709 | 9711 | | |
9710 | 9712 | | |
9711 | 9713 | | |
| |||
9714 | 9716 | | |
9715 | 9717 | | |
9716 | 9718 | | |
9717 | | - | |
9718 | | - | |
9719 | 9719 | | |
9720 | 9720 | | |
9721 | 9721 | | |
| |||
9724 | 9724 | | |
9725 | 9725 | | |
9726 | 9726 | | |
9727 | | - | |
9728 | | - | |
9729 | 9727 | | |
9730 | 9728 | | |
9731 | 9729 | | |
| |||
9734 | 9732 | | |
9735 | 9733 | | |
9736 | 9734 | | |
9737 | | - | |
9738 | | - | |
9739 | 9735 | | |
9740 | 9736 | | |
9741 | 9737 | | |
| |||
9744 | 9740 | | |
9745 | 9741 | | |
9746 | 9742 | | |
9747 | | - | |
9748 | | - | |
9749 | 9743 | | |
9750 | 9744 | | |
9751 | 9745 | | |
| |||
9754 | 9748 | | |
9755 | 9749 | | |
9756 | 9750 | | |
9757 | | - | |
9758 | | - | |
9759 | 9751 | | |
9760 | 9752 | | |
9761 | 9753 | | |
| |||
9764 | 9756 | | |
9765 | 9757 | | |
9766 | 9758 | | |
9767 | | - | |
9768 | | - | |
9769 | 9759 | | |
9770 | 9760 | | |
9771 | 9761 | | |
| |||
9774 | 9764 | | |
9775 | 9765 | | |
9776 | 9766 | | |
9777 | | - | |
9778 | | - | |
9779 | 9767 | | |
9780 | 9768 | | |
9781 | 9769 | | |
| |||
9784 | 9772 | | |
9785 | 9773 | | |
9786 | 9774 | | |
9787 | | - | |
9788 | | - | |
9789 | 9775 | | |
9790 | 9776 | | |
9791 | 9777 | | |
| |||
9954 | 9940 | | |
9955 | 9941 | | |
9956 | 9942 | | |
9957 | | - | |
| 9943 | + | |
| 9944 | + | |
9958 | 9945 | | |
9959 | 9946 | | |
9960 | 9947 | | |
| |||
10133 | 10120 | | |
10134 | 10121 | | |
10135 | 10122 | | |
| 10123 | + | |
| 10124 | + | |
10136 | 10125 | | |
10137 | 10126 | | |
10138 | 10127 | | |
10139 | 10128 | | |
10140 | 10129 | | |
10141 | 10130 | | |
10142 | 10131 | | |
10143 | | - | |
| 10132 | + | |
| 10133 | + | |
| 10134 | + | |
| 10135 | + | |
| 10136 | + | |
| 10137 | + | |
| 10138 | + | |
| 10139 | + | |
| 10140 | + | |
10144 | 10141 | | |
10145 | 10142 | | |
10146 | 10143 | | |
| |||
10991 | 10988 | | |
10992 | 10989 | | |
10993 | 10990 | | |
10994 | | - | |
10995 | | - | |
| 10991 | + | |
10996 | 10992 | | |
10997 | 10993 | | |
10998 | 10994 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
| |||
122 | 121 | | |
123 | 122 | | |
124 | 123 | | |
125 | | - | |
| 124 | + | |
126 | 125 | | |
127 | 126 | | |
128 | 127 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
720 | 725 | | |
721 | 726 | | |
722 | 727 | | |
| |||
805 | 810 | | |
806 | 811 | | |
807 | 812 | | |
808 | | - | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
809 | 820 | | |
810 | 821 | | |
811 | 822 | | |
| |||
1055 | 1066 | | |
1056 | 1067 | | |
1057 | 1068 | | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
1058 | 1074 | | |
1059 | 1075 | | |
1060 | 1076 | | |
| |||
0 commit comments