Summary
3 of 4 tests in tests/pages_export_test.rs fail when the git remote origin is not a standard GitHub URL (e.g., a local proxy, CI mirror, or non-GitHub host).
Failing Tests
test_export_pages_creates_json_and_html
test_export_pages_html_redirects_to_reader
test_pages_json_has_metadata_wrapper
Root Cause
All three tests run lattice export --format pages --output <tmpdir> against the real working directory. The pages export format calls into REQ-CLI-016 (Git Remote URL Parsing) to derive the GitHub Pages base URL. When the origin remote isn't a recognized GitHub URL, it fails with:
Error: Could not derive GitHub Pages URL from git remote. Ensure a GitHub origin is configured.
This happens in any environment where the remote is proxied or non-GitHub, including some CI setups and Claude Code web sessions.
Expected Behavior
Tests should either:
- Mock the git remote — set up a temp repo with a GitHub-style remote, or
- Accept a
--base-url override — so the test can pass an explicit URL instead of relying on remote parsing, or
- Skip gracefully — detect the non-GitHub remote and mark the test as skipped rather than failing
Environment
git remote -v shows a local proxy URL: http://local_proxy@127.0.0.1:41421/git/forkzero/lattice
- The 4th test (
test_json_export_has_metadata_wrapper) passes because it tests JSON export, not pages export
Related
REQ-CLI-016 — Git Remote URL Parsing for GitHub Pages
REQ-CLI-015 — GitHub Pages Export Format
Summary
3 of 4 tests in
tests/pages_export_test.rsfail when the git remote origin is not a standard GitHub URL (e.g., a local proxy, CI mirror, or non-GitHub host).Failing Tests
test_export_pages_creates_json_and_htmltest_export_pages_html_redirects_to_readertest_pages_json_has_metadata_wrapperRoot Cause
All three tests run
lattice export --format pages --output <tmpdir>against the real working directory. Thepagesexport format calls intoREQ-CLI-016(Git Remote URL Parsing) to derive the GitHub Pages base URL. When the origin remote isn't a recognized GitHub URL, it fails with:This happens in any environment where the remote is proxied or non-GitHub, including some CI setups and Claude Code web sessions.
Expected Behavior
Tests should either:
--base-urloverride — so the test can pass an explicit URL instead of relying on remote parsing, orEnvironment
git remote -vshows a local proxy URL:http://local_proxy@127.0.0.1:41421/git/forkzero/latticetest_json_export_has_metadata_wrapper) passes because it tests JSON export, not pages exportRelated
REQ-CLI-016— Git Remote URL Parsing for GitHub PagesREQ-CLI-015— GitHub Pages Export Format