Commit 28859c9
Phase 2 of honest content authorship (extrachill-events#207).
EventUpsert::resolvePostAuthor() now resolves genuine automation (no
submission context, no explicit author config) to the network bot account
via ec_get_network_bot_user_id() instead of falling through to
WordPressSettingsResolver's first-administrator fallback — the fallback that
historically misattributed ~3k automated events (and 153 wire posts) to uid 1.
Resolution order:
1. submission user_id (human submitter, incl. Phase 1 anon-resolved) — highest
2. explicit config (system default_author_id, then per-handler post_author)
3. network bot account via ec_get_network_bot_user_id() — the honest default
4. WordPressSettingsResolver (last resort, only if the helper is unavailable)
This is config-driven (no magic 32 literal) and layer-pure: data-machine-events
is the EC integration layer, so it owns the EC bot-id default rather than
punting the decision into the generic data-machine resolver. The existing
extrachill/create-user helper lives in extrachill-users (sibling PR).
Existing per-flow post_author=32 handler configs continue to work (explicit
config still wins); this hardens the no-config case so automation can never
again default to a human admin.
Backfill of the existing ~3k uid-1 event rows + 153 wire rows is handled by
the extrachill-events backfill-authorship CLI (Phase 3).
Co-authored-by: homeboy-ci[bot] <266378653+homeboy-ci[bot]@users.noreply.github.com>
1 parent 3360e72 commit 28859c9
1 file changed
Lines changed: 56 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
1085 | 1086 | | |
1086 | 1087 | | |
1087 | 1088 | | |
1088 | | - | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
1092 | 1093 | | |
1093 | | - | |
1094 | | - | |
1095 | | - | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
1096 | 1105 | | |
1097 | 1106 | | |
1098 | 1107 | | |
1099 | 1108 | | |
1100 | 1109 | | |
1101 | 1110 | | |
| 1111 | + | |
1102 | 1112 | | |
1103 | 1113 | | |
1104 | 1114 | | |
| |||
1108 | 1118 | | |
1109 | 1119 | | |
1110 | 1120 | | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
1111 | 1138 | | |
1112 | 1139 | | |
1113 | 1140 | | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1114 | 1163 | | |
1115 | 1164 | | |
1116 | 1165 | | |
| |||
0 commit comments