Skip to content

🐞 Allow archived file links without blocking builds - #78

Merged
JFWooten4 merged 5 commits into
mainfrom
g4-lyra-heartstrings-archive-links
Nov 11, 2026
Merged

JFWooten4 merged 5 commits into
mainfrom
g4-lyra-heartstrings-archive-links

Conversation

@JFWooten4

Copy link
Copy Markdown
Member

Summary

  • Register a beforeDefaultRemarkPlugins transformer that applies only to files compiled from versioned_docs/version-*/.
  • Convert historical Markdown asset references (such as /files/taxes/2024.pdf) to Docusaurus pathname:// URLs before Webpack turns them into required imports. A removed historical file may return 404 without breaking the site build.
  • Preserve normal link processing and strict validation for current documentation, leaving onBrokenLinks: 'throw' unchanged.
  • Add regression tests for archived asset links, Windows paths, already-prefixed links, and untouched live-document or external links.
  • Make no modifications to any versions/ archive sources or their sidebars.

Context

  • PR 🖋️ Update tax and records pages for relocated files #71 relocated documents from static/files/ to static/ref/. Archived versions intentionally retain their historical links, but the Docusaurus bundler attempted to import missing files and failed the Netlify build.
  • PR 🖋️ Update tax and records pages for relocated files #71 was already merged and its head branch removed before this follow-up was opened. This is the next PR on top of those merged changes, targeting main rather than a deleted stacking branch.
  • The current finance and tax pages were updated on main separately, so this PR does not repeat those changes.

Verification

  • node --test scripts/remark-archived-assets.test.cjs: 3 tests pass in local Node.
  • Checked the tree against its parent: only docusaurus.config.ts, package.json, and the two new transformer/test files change.
  • Archived source files under versions/ remain byte-for-byte identical.
  • Netlify deploy preview will verify the complete Docusaurus build; no preview result is claimed here.

References

Write PR descriptions automatically.

Apply an early Remark transform only to historical versioned_docs files, converting static asset URLs to Docusaurus pathname:// links before Webpack can require missing files. Keep current docs on their normal link validation settings and preserve all archive source files byte-for-byte.

Register the transformer in Docusaurus and add Node regression tests for archives, current documents, Windows paths, and ignored external/document links.

Co-authored-by: ChatGPT 6 <noreply@openai.com>
@netlify

netlify Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for org-docs ready!

Name Link
🔨 Latest commit 1542cb2
🔍 Latest deploy log https://app.netlify.com/projects/org-docs/deploys/6af47540bcea2be0fa0fa33c
😎 Deploy Preview https://deploy-preview-78--org-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Revert the unnecessary package.json test-script addition. Run the regression tests directly with node --test scripts/remark-archived-assets.test.cjs instead, avoiding an unrelated protected-file review requirement while preserving the scoped historical-link fix.

Co-authored-by: ChatGPT 6 <noreply@openai.com>
@JFWooten4

Copy link
Copy Markdown
Member Author

Unfortunately, the site is just not going to deploy with broken links in the previous versions, which is my intended behavior. I think it's okay to have old file URL schemes invalidated, especially in this early stage where we're figuring out the whole structure of organizing the organization. I want to rework the spreadsheets anyway in #73, so we are going to have historical links that eventually 404 after everything's migrated so that it can improve over time.

Netlify production build failure — November 11, 2026 (8:39 AM)
8:39:02 AM: build-image version: ea8920232ffbe23506ef69aa99aa2258559fbd91 (noble-new-builds)
8:39:02 AM: buildbot version: 38b21e45e384b753157f7018594a388bd12e2dce
8:39:02 AM: Building with cache
8:39:02 AM: Starting to prepare the repo for build
8:39:02 AM: Preparing Git Reference refs/heads/main
8:39:04 AM: Installing dependencies
8:39:05 AM: mise by @jdx – installing 1 tool
8:39:05 AM: mise ⇢ python@3.14.3  23ms · already installed
8:39:05 AM: mise ████████████████ 1/1 · installed 0 tools · 1 already installed in 25ms
8:39:05 AM: mise ~/.config/mise/config.toml tools: python@3.14.3
8:39:05 AM: mise by @jdx – installing 1 tool
8:39:05 AM: mise ⇢ ruby@3.4.8  2ms · already installed
8:39:05 AM: mise ████████████████ 1/1 · installed 0 tools · 1 already installed in 3ms
8:39:05 AM: mise ~/.config/mise/config.toml tools: ruby@3.4.8
8:39:05 AM: mise by @jdx – installing 1 tool
8:39:05 AM: mise ⇢ go@1.26.2  1ms · already installed
8:39:05 AM: mise ████████████████ 1/1 · installed 0 tools · 1 already installed in 2ms
8:39:05 AM: mise ~/.config/mise/config.toml tools: go@1.26.2
8:39:05 AM: v22.23.4 is already installed.
8:39:06 AM: Now using node v22.23.4 (npm v10.9.9)
8:39:06 AM: Enabling Node.js Corepack
8:39:06 AM: No npm workspaces detected
8:39:06 AM: Installing npm packages using npm version 10.9.9
8:39:08 AM: up to date in 2s
8:39:08 AM: npm packages installed
8:39:08 AM: Successfully installed dependencies
8:39:09 AM: Detected 1 framework(s)
8:39:09 AM: "docusaurus" at version "3.10.1"
8:39:09 AM: Starting build script
8:39:10 AM: Section completed: initializing
8:39:12 AM: ​
8:39:12 AM: Netlify Build                                                 
8:39:12 AM: ────────────────────────────────────────────────────────────────
8:39:12 AM: ​
8:39:12 AM: ❯ Version
8:39:12 AM:   @netlify/build 37.7.6
8:39:12 AM: ​
8:39:12 AM: ❯ Flags
8:39:12 AM:   accountId: 61106e5b1ec726fd02b9c465
8:39:12 AM:   baseRelDir: true
8:39:12 AM:   buildId: 6af46ff5116f6d30b8173609
8:39:12 AM:   deployId: 6af46ff5116f6d30b817360b
8:39:12 AM:   serverDistDir: /tmp/server-6af46ff5116f6d30b817360b
8:39:12 AM: ​
8:39:12 AM: ❯ Current directory
8:39:12 AM:   /opt/build/repo
8:39:12 AM: ​
8:39:12 AM: ❯ Config file
8:39:12 AM:   No config file was defined: using default values.
8:39:12 AM: ​
8:39:12 AM: ❯ Context
8:39:12 AM:   production
8:39:12 AM: ​
8:39:12 AM: Build command from Netlify app                                
8:39:12 AM: ────────────────────────────────────────────────────────────────
8:39:12 AM: ​
8:39:12 AM: $ npm run build
8:39:12 AM: > org-docs@0.0.0 build
8:39:12 AM: > node scripts/build-docusaurus.cjs
8:39:14 AM: [INFO] [en] Creating an optimized production build...
8:39:16 AM: [info] [webpackbar] Compiling Client
8:39:16 AM: [info] [webpackbar] Compiling Server
8:39:19 AM: [success] [webpackbar] Server: Compiled with some errors in 2.95s
8:39:23 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
8:39:23 AM: [success] [webpackbar] Client: Compiled with some errors in 7.04s
8:39:23 AM: [ERROR] Client bundle compiled with errors therefore further build is impossible.
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2025/Balance Sheet.xlsx' in '/opt/build/repo/docs/finance'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2025/Income Statement.xlsx' in '/opt/build/repo/docs/finance'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2025/xlm-deposits.csv' in '/opt/build/repo/docs/finance'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2024/Balance Sheet.xlsx' in '/opt/build/repo/docs/finance'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2024/Income Statement.xlsx' in '/opt/build/repo/docs/finance'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2025/Balance Sheet.xlsx' in '/opt/build/repo/docs/finance'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2025/Income Statement.xlsx' in '/opt/build/repo/docs/finance'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2025/xlm-deposits.csv' in '/opt/build/repo/docs/finance'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/taxes/2025.pdf' in '/opt/build/repo/docs/finance'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../../static/files/taxes/2025.pdf' in '/opt/build/repo/docs/taxes/cash'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../../static/files/financials/2025/Balance Sheet.xlsx' in '/opt/build/repo/docs/taxes/cash'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../../static/files/financials/2025/Income Statement.xlsx' in '/opt/build/repo/docs/taxes/cash'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../../static/files/financials/2025/xlm-deposits.csv' in '/opt/build/repo/docs/taxes/cash'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/taxes/2024.pdf' in '/opt/build/repo/versioned_docs/version-0.1.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/taxes/2025.pdf' in '/opt/build/repo/versioned_docs/version-0.1.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2024/Balance Sheet.xlsx' in '/opt/build/repo/versioned_docs/version-0.1.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2024/Income Statement.xlsx' in '/opt/build/repo/versioned_docs/version-0.1.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2025/Balance Sheet.xlsx' in '/opt/build/repo/versioned_docs/version-0.1.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2025/Income Statement.xlsx' in '/opt/build/repo/versioned_docs/version-0.1.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2025/xlm-deposits.csv' in '/opt/build/repo/versioned_docs/version-0.1.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/onboarding/Private Client Application.pdf' in '/opt/build/repo/versioned_docs/version-0.1.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../../static/files/taxes/2024.pdf' in '/opt/build/repo/versioned_docs/version-0.1.0/taxes'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../../static/files/taxes/2025.pdf' in '/opt/build/repo/versioned_docs/version-0.1.0/taxes'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/taxes/2024.pdf' in '/opt/build/repo/versioned_docs/version-0.2.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/taxes/2025.pdf' in '/opt/build/repo/versioned_docs/version-0.2.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2024/Balance Sheet.xlsx' in '/opt/build/repo/versioned_docs/version-0.2.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2024/Income Statement.xlsx' in '/opt/build/repo/versioned_docs/version-0.2.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2025/Balance Sheet.xlsx' in '/opt/build/repo/versioned_docs/version-0.2.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2025/Income Statement.xlsx' in '/opt/build/repo/versioned_docs/version-0.2.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/financials/2025/xlm-deposits.csv' in '/opt/build/repo/versioned_docs/version-0.2.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../static/files/onboarding/Private Client Application.pdf' in '/opt/build/repo/versioned_docs/version-0.2.0'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../../static/files/taxes/2024.pdf' in '/opt/build/repo/versioned_docs/version-0.2.0/taxes'
8:39:23 AM: 
8:39:23 AM: --------------------------
8:39:23 AM: 
8:39:23 AM: Module not found: Error: Can't resolve './../../../static/files/taxes/2025.pdf' in '/opt/build/repo/versioned_docs/version-0.2.0/taxes'
8:39:23 AM: ​
8:39:23 AM: "build.command" failed                                        
8:39:23 AM: ────────────────────────────────────────────────────────────────
8:39:23 AM: ​
8:39:23 AM:   Error message
8:39:23 AM:   Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
8:39:23 AM: ​
8:39:23 AM:   Error location
8:39:23 AM:   In Build command from Netlify app:
8:39:23 AM:   npm run build
8:39:23 AM: ​
8:39:23 AM:   Resolved config
8:39:23 AM:   build:
8:39:23 AM:     command: npm run build
8:39:23 AM:     commandOrigin: ui
8:39:23 AM:     publish: /opt/build/repo/build
8:39:23 AM:     publishOrigin: ui
8:39:23 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
8:39:23 AM: Failing build: Failed to build site
8:39:24 AM: Finished processing build request in 21.57s

JFWooten4 and others added 3 commits November 11, 2026 08:51
Run both version archive and historical asset link regression tests in a read-only GitHub Actions workflow on pull requests and pushes to main, without altering protected configuration or archive sources.

Co-authored-by: ChatGPT 6 <noreply@openai.com>
Relocate the CI-only archived-asset test from scripts/ to .github/scripts/, update its production-transformer import path, and point the documentation workflow at the new location. Keep the actual Docusaurus transformer in scripts/ and do not modify archived document sources.

Co-authored-by: ChatGPT 6 <noreply@openai.com>
Customize the Docusaurus not-found page to display the missing URL, link directly to GitHub commit history filtered to the corresponding static asset or documentation source path, and explain that file paths in archived documentation may no longer be supported. Keep a repository-history fallback for unknown paths and avoid SSR hydration differences with client-only URL detection.

Add regression coverage for static and versioned URL mappings, fallback handling, and unsafe paths in .github/scripts. Do not alter any archived document sources.

Co-authored-by: ChatGPT 6 <noreply@openai.com>
@JFWooten4
JFWooten4 merged commit 8b32927 into main Nov 11, 2026
7 checks passed
@JFWooten4
JFWooten4 deleted the g4-lyra-heartstrings-archive-links branch November 11, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant