From bbecaaec56c77316291badc303b69ade00d46859 Mon Sep 17 00:00:00 2001 From: Mark Randall Havens Date: Fri, 6 Jun 2025 05:49:35 -0500 Subject: [PATCH] Post-Local sync at 2025-06-06 05:49:34 --- .gitfield/push_log.json | 6 ++ .gitfield/pushed.log | 1 + bin/gitfield-sync | 148 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 154 insertions(+), 1 deletion(-) diff --git a/.gitfield/push_log.json b/.gitfield/push_log.json index e7e3ec9..c42e7c8 100644 --- a/.gitfield/push_log.json +++ b/.gitfield/push_log.json @@ -44,6 +44,12 @@ "branch": "master", "commit": "3222c337b0ae430c302f9e9ee2580c2778331b75", "message": "Post-GitHub sync at 2025-06-06 05:35:23" + }, + { + "timestamp": "2025-06-06 05:49:34", + "branch": "master", + "commit": "93f0452706d5798d3277ceb258853dc055cb0536", + "message": "Forgejo metadata link commit at 2025-06-06 05:49:12 โ€” https://remember.thefoldwithin.earth/mrhavens/git-sigil/commit/a35070b118e6087edabaa546859dc89eec3044c7" } ] } diff --git a/.gitfield/pushed.log b/.gitfield/pushed.log index 99ea9e2..b478b56 100644 --- a/.gitfield/pushed.log +++ b/.gitfield/pushed.log @@ -43,3 +43,4 @@ [2025-06-06 05:37:57] GitLab: https://gitlab.com/mrhavens/git-sigil [2025-06-06 05:38:16] Bitbucket: https://bitbucket.org/thefoldwithin/git-sigil [2025-06-06 05:38:31] GitHub: https://github.com/mrhavens/git-sigil +[2025-06-06 05:49:35] Local: diff --git a/bin/gitfield-sync b/bin/gitfield-sync index 94cfd0c..ef0da39 100755 --- a/bin/gitfield-sync +++ b/bin/gitfield-sync @@ -95,5 +95,151 @@ The following platforms host the \`$REPO_NAME\` repository, each chosen for its - **Purpose**: Radicle is a decentralized, peer-to-peer git platform that ensures sovereignty and censorship resistance. It hosts the repository in a distributed network, independent of centralized servers. - **Value**: Protects against deplatforming by eliminating reliance on centralized infrastructure, ensuring the project remains accessible in a decentralized ecosystem. - **Access Details**: To view project details, run: - ```bash + \`\`\`bash rad inspect $RADICLE_RID + \`\`\` + To view the file structure, run: + \`\`\`bash + rad ls $RADICLE_RID + \`\`\` + Alternatively, use Git to list files at the current HEAD: + \`\`\`bash + git ls-tree -r --name-only HEAD + \`\`\` + +### 2. Forgejo +- **URL**: [$FORGEJO_URL]($FORGEJO_URL) +- **Purpose**: Forgejo is a self-hosted, open-source git platform running on \`remember.thefoldwithin.earth\` (user: \`mrhavens\`, SSH port: 222). It provides full control over the repository, ensuring sovereignty and independence from third-party providers. +- **Value**: Enhances resilience by hosting the repository on a sovereign, redundant system with automated backups and deployment strategies, reducing risks of external interference or service disruptions. +- **Access Details**: SSH access uses port 222: + \`\`\`bash + ssh -T -p 222 git@remember.thefoldwithin.earth + \`\`\` + +### 3. GitLab +- **URL**: [$GITLAB_URL]($GITLAB_URL) +- **Purpose**: GitLab offers a comprehensive DevOps platform with advanced CI/CD capabilities, private repository options, and robust access controls. It serves as a reliable backup and a platform for advanced automation workflows. +- **Value**: Enhances project resilience with its integrated CI/CD pipelines and independent infrastructure, reducing reliance on a single provider. + +### 4. Bitbucket +- **URL**: [$BITBUCKET_URL]($BITBUCKET_URL) +- **Purpose**: Bitbucket provides a secure environment for repository hosting with strong integration into Atlassianโ€™s ecosystem (e.g., Jira, Trello). It serves as an additional layer of redundancy and a professional-grade hosting option. +- **Value**: Offers enterprise-grade security and integration capabilities, ensuring the project remains accessible even if other platforms face disruptions. + +### 5. GitHub +- **URL**: [$GITHUB_URL]($GITHUB_URL) +- **Purpose**: GitHub serves as the primary platform for visibility, collaboration, and community engagement. Its widespread adoption and robust tooling make it ideal for public-facing development, issue tracking, and integration with CI/CD pipelines. +- **Value**: Provides a centralized hub for open-source contributions, pull requests, and project management, ensuring broad accessibility and developer familiarity. + +--- + +## ๐Ÿ›ก๏ธ Rationale for Redundancy + +The decision to maintain multiple repositories stems from the need to safeguard the project against **deplatforming attempts** and **search engine delistings** and ensure its **long-term availability**. Past incidents involving **Mr. Joel Johnson**, **Dr. Peter Gaied**, and **Andrew LeCody** have highlighted the vulnerability of relying on a single platform or search engine. By distributing the repository across GitHub, GitLab, Bitbucket, Radicle, and a self-hosted Forgejo instance, we achieve: + +- **Resilience**: If one platform removes or restricts access, or if search engines like Google delist content, the project remains accessible on other platforms and discoverable via alternative search engines such as Bing, DuckDuckGo, and Yahoo. +- **Sovereignty**: Radicleโ€™s decentralized nature and Forgejoโ€™s self-hosted infrastructure ensure the project cannot be fully censored or controlled by any single entity. +- **Diversity**: Each platformโ€™s unique features (e.g., GitHubโ€™s community, GitLabโ€™s CI/CD, Bitbucketโ€™s integrations, Radicleโ€™s decentralization, Forgejoโ€™s self-hosting) enhance the projectโ€™s functionality and reach. +- **Transparency**: Metadata snapshots in the \`.gitfield\` directory provide a verifiable record of the projectโ€™s state across all platforms. + +This multi-repository approach, bolstered by Forgejoโ€™s sovereign hosting, reflects a commitment to preserving the integrity, accessibility, and independence of \`$REPO_NAME\`, ensuring it remains available to contributors and users regardless of external pressures. + +--- + +## ๐Ÿ“œ Metadata and Logs + +- **Metadata Files**: Each platform generates a metadata snapshot in the \`.gitfield\` directory (e.g., \`github.sigil.md\`, \`gitlab.sigil.md\`, \`remember.sigil.md\`, etc.), capturing commit details, environment information, and hardware fingerprints. +- **Push Log**: The \`.gitfield/pushed.log\` file records the date, time, and RID/URL of every push operation across all platforms, providing a transparent audit trail. +- **Recursive Sync**: The repository is synchronized across all platforms in a recursive loop (three cycles) to ensure interconnected metadata captures the latest state of the project. +- **Push Order**: The repository is synchronized in the following order: **Radicle โ†’ Forgejo โ†’ GitLab โ†’ Bitbucket โ†’ GitHub**. This prioritizes Radicleโ€™s decentralized, censorship-resistant network as the primary anchor, followed by Forgejoโ€™s sovereign, self-hosted infrastructure, GitLabโ€™s robust DevOps features, Bitbucketโ€™s enterprise redundancy, and GitHubโ€™s broad visibility, ensuring a resilient and accessible metadata chain. + +--- + +_Auto-generated by \`gitfield-sync\` at $TIMESTAMP (v$SCRIPT_VERSION)._ +EOF + + git -C "$REPO_PATH" add "$GITFIELD_MD" + git -C "$REPO_PATH" commit -m "Generated GITFIELD.md at $TIMESTAMP" || warn "No changes to commit for $GITFIELD_MD" + info "Generated and committed $GITFIELD_MD" +} + +# โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +# โ”‚ LOG URL FUNCTION โ”‚ +# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +log_url() { + local platform=$1 + local url=$2 + local rid=$3 + local peer_id=$4 + local timestamp=$(date '+%Y-%m-%d %H:%M:%S') + if [ "$platform" = "Radicle" ]; then + echo "[$timestamp] $platform: RID=$rid, Peer ID=$peer_id" >> "$LOG_FILE" + echo " CLI: rad inspect $rid # View project details" >> "$LOG_FILE" + echo " CLI: git ls-tree -r --name-only HEAD # View file structure" >> "$LOG_FILE" + info "Logged push to $LOG_FILE: [$timestamp] $platform: RID=$rid, Peer ID=$peer_id" + else + echo "[$timestamp] $platform: $url" >> "$LOG_FILE" + info "Logged push to $LOG_FILE: [$timestamp] $platform: $url" + fi +} + +# โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +# โ”‚ EXECUTE PUSH SCRIPT โ”‚ +# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +execute_push() { + local script_name=$1 + local platform=$2 + local url=$3 + local rid=$4 + local peer_id=$5 + local script_path + script_path=$(find_script "$script_name") || error "Failed to find $script_name" + info "Executing $platform push with script: $script_path" + if [ -x "$script_path" ]; then + pushd "$REPO_PATH" >/dev/null + "$script_path" || warn "Execution of $script_path failed, continuing..." + log_url "$platform" "$url" "$rid" "$peer_id" + git add . || warn "Nothing to add after $script_path" + git commit -m "Post-$platform sync at $TIMESTAMP" || warn "No changes to commit after $script_path" + popd >/dev/null + else + error "Script $script_path is not executable" + fi +} + +# โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +# โ”‚ RECURSIVE PUSH LOOP โ”‚ +# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +run_push_cycle() { + local cycle_number=$1 + info "Starting push cycle $cycle_number..." + + execute_push "gitfield-local" "Local" "" "" "" + execute_push "gitfield-radicle" "Radicle" "" "$RADICLE_RID" "$RADICLE_PEER_ID" + execute_push "gitfield-remember" "Forgejo" "$FORGEJO_URL" "" "" + execute_push "gitfield-gitlab" "GitLab" "$GITLAB_URL" "" "" + execute_push "gitfield-bitbucket" "Bitbucket" "$BITBUCKET_URL" "" "" + execute_push "gitfield-github" "GitHub" "$GITHUB_URL" "" "" +} + +# โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +# โ”‚ MAIN EXECUTION โ”‚ +# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +info "Starting gitfield-sync for $REPO_NAME..." + +if [ ! -d "$REPO_PATH/.git" ]; then + pushd "$REPO_PATH" >/dev/null + git init + git add . + git commit -m "Initial commit" || warn "Nothing to commit" + popd >/dev/null +fi + +run_push_cycle 1 +generate_gitfield_md +run_push_cycle 2 +run_push_cycle 3 + +info "โœ… gitfield-sync completed successfully." +info "๐Ÿ”— View logs: $LOG_FILE" +info "๐Ÿ”— View multi-repo manifest: $GITFIELD_MD"