Topics created before July 2024 don't have createdBy or createdAt stored in the Evolver state. In ExportToNebulaCommand::extractMembersFromEvents(), the creator is only added to the members list when $createdBy is truthy:
$createdBy = $topicState['createdBy'] ?? null; // null for pre-July-2024 topics
// Add creator as owner (always active)
if ($createdBy) { // ← skipped when null
$membersList[$createdBy] = [ ... ];
}Since the topic creator was never explicitly added via a topic:add-user event (they were implicitly a member by creating the topic), they are completely absent from the exported _members.yaml. Nebula's topic:import only creates TopicMember records from that file — so the creator is lost.
In extractMembersFromEvents(), add a fallback that recovers the creator from the topic:create raw event when topicState['createdBy'] is null.
Before (line 345–347):
$membersList = [];
$createdBy = $topicState['createdBy'] ?? null;
$createdAt = $topicState['createdAt'] ?? null;$membersList = [];
$createdBy = $topicState['createdBy'] ?? null;
$createdAt = $topicState['createdAt'] ?? null;
// Fallback: extract creator from topic:create event for pre-July-2024 topics
if (!$createdBy) {
foreach ($rawEvents as $rawEvent) {
if (($rawEvent['type'] ?? '') === 'topic:create') {
$createdBy = $rawEvent['payload']['user'] ?? $rawEvent['meta']['createdBy'] ?? null;
if (!$createdAt) {
$createdAt = $rawEvent['meta']['createdAt'] ?? null;
}
break;
}
}
}This also recovers createdAt from the same event, which fixes the related issue where pre-July-2024 topics show today's date as their creation date.
extractTopicMetadata() has the same gap — created_by_username and created_at fall back to null/$now respectively. The same topic:create event fallback could be applied there.
- Run export with
--validateon a pre-July-2024 topic - Check the
_members.yaml— creator should now be listed - Check the
_topic.yaml—created_atandcreated_by_usernameshould be populated